Skip to content

Latest commit

 

History

History
24 lines (13 loc) · 1.26 KB

README.md

File metadata and controls

24 lines (13 loc) · 1.26 KB

datamaps for R and shiny

The rdatamaps package is an R interface to the datamaps library, based on d3.js. It provides facilites for visualize great choropleths.

See datamaps for examples and magnificent choropleth!

Installation

The rdatamaps package depends on the development version of the htmlwidgets package so you need to install both packages. You can do this using the devtools package as follows:

devtools::install_github(c("ramnathv/htmlwidgets", "smartinsightsfromdata/rdatamaps"))

Usage

The process of creating a choropleth for any geographical area is actually quite simple. Mark Di Marco, the creator of datamaps has a nice tutorial here.

To start to use this library I suggest to study the examples. I plan to prepare a blog as soon as I'll have time -:)

This library in shiny has the really cool feature that passes back to the server the name of the country (or postcode, county etc.) you click in the UI. This allows then to display dynamically customer properties for that element in tables (or graphs, pie charts etc.)

See the examples in ./inst/examples.