Interactive maps in R using d3-carto-map
JavaScript R CSS HTML
Failed to load latest commit information.
R Option to open in browser Mar 5, 2015
data-raw Fix non-ASCII characters in data Dec 23, 2014
inst Generated vignettes should not be added Jan 14, 2015
man Option to open in browser Mar 5, 2015
.Rbuildignore Merge remote Mar 24, 2015
.gitignore Include gitignore Jan 14, 2015
.travis.yml Add rmarkdown to Travis config Jan 16, 2016
DESCRIPTION Require lower version of rgdal Mar 16, 2015
NAMESPACE Implement converter to GeoJSON Dec 24, 2014
NEWS Travis badge to README Mar 16, 2015
bower.json Specify js dependencies Mar 6, 2015
cartographer.Rproj Roxygen for vignettes Mar 6, 2015

Build Status

Cartographer: Interactive Maps for Data Exploration

Cartographer provides interactive maps in R Markdown documents or at the R console. These maps are suitable for data exploration. This package is an R wrapper around Elijah Meeks's d3-carto-map and d3.js, using htmlwidgets for R.

Cartographer is under very early development and the API is unstable.

The leaflet package offers similar functionality.


To install the development version from GitHub, first install devtools. Then install Cartographer:

# install.packages("devtools")
devtools::install_github("ropensci/cartographer", build_vignettes = TRUE)

Basic use

Cartographer maps are composed using a series of functions that add point, tile, or polygon layers and control map options like colors, sizes, and zoom. For more explanation, see the package vignette online or in R by running vignette("cartographer"). Below is the code for and a screenshot of a sample map.

cartographer(region = "united states") %>%
  tile_layer() %>%
  points_layer(data = dioceses, color = "green", size = 4,
                label = "Dioceses") %>%
  points_layer(data = archdioceses, color = "purple", size = 8, opacity = 1,
                label = "Archdioceses")

Screenshot of cartographer map


This code is released under the MIT License. The included JavaScript libraries are used under the terms of their own licenses. See the directories in inst/htmlwidgets/lib/ for their licenses.

rOpenSCi logo