Skip to content

fxcebx/cartographer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Installation

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

devtools::install_github("lmullen/cartographer")

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

License

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.

About

Interactive maps in R using d3-carto-map

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 77.1%
  • R 21.1%
  • CSS 1.8%