R interface to Deck.gl
Clone or download
Latest commit d04682d Nov 15, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R fixing tests Nov 16, 2018
data-raw legend options Oct 25, 2018
data geojson Aug 5, 2018
inst tidying Nov 13, 2018
man fixing tests Nov 16, 2018
src MULTI support - closes #3 Nov 12, 2018
tests fixing tests Nov 16, 2018
vignettes encoded and lite Nov 7, 2018
.Rbuildignore testing legends Nov 8, 2018
.gitattributes attributes Sep 30, 2018
.gitignore gitignore Oct 5, 2018
.travis.yml sf on travis Aug 2, 2018
DESCRIPTION arguments, na_colour and deprecating function palette Nov 14, 2018
NAMESPACE removing old functions Nov 13, 2018
NEWS.md MULTI support - closes #3 Nov 12, 2018
README.Rmd PRs and Readme updates Nov 13, 2018
README.md PRs and Readme updates Nov 13, 2018
codecov.yml travis and ci Jul 31, 2018
cran-comments.md patches for #29 and #27 Aug 14, 2018
mapdeck.Rproj scatter Jul 18, 2018

README.md

mapdeck

CRAN_Status_Badge downloads CRAN RStudio mirror downloads Github Stars Build Status Coverage Status

Interactive maps using Mapbox GL and Deck.gl

Installation

From cran

install.packages("mapdeck")

Development version

Version v0.1.006+ sees quite a lot of changes, so I need users to test their functions and report any errors.

To use the development version you need some other development dependant libraries

## install dependent libraries first
devtools::install_github("SymbolixAU/geojsonsf", force = T)
devtools::install_github("SymbolixAU/spatialwidget", force = T)
devtools::install_github("SymbolixAU/googlePolylines", force = T)

## then mapdeck
devtools::install_github("SymbolixAU/mapdeck")

Getting Started

Mapdeck uses Mapbox maps, and to use Mapbox you need an access token.

Once you’ve generate a token you can use their maps.

Call mapdeck(token = 'your_token') to generate a basic map. Then start adding layers by using one of the various add_*() functions.

url <- 'https://raw.githubusercontent.com/plotly/datasets/master/2011_february_aa_flight_paths.csv'
flights <- read.csv(url)
flights$info <- paste0("<b>",flights$airport1, " - ", flights$airport2, "</b>")

mapdeck(token = key, style = mapdeck_style('dark')) %>%
  add_arc(
    data = flights
    , origin = c("start_lon", "start_lat")
    , destination = c("end_lon", "end_lat")
    , stroke_from = "airport1"
    , stroke_to = "airport2"
    , tooltip = "info"
    , layer_id = 'arclayer'
  )

Arcs

Available Layers

  • arc
  • geojson
  • grid
  • hexagon
  • line
  • path
  • pointcloud
  • polygon
  • scatterplot
  • screengrid
  • text

Shiny

Mapdeck is also an htmlwidget, so will work in a shiny application.

Examples of all plots and shiny can be found in the vignette