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

What is mapdeck?

An R library which lets you plot interactive maps using Mapbox GL and

What is mapbox?

Mapbox is the location data platform for mobile and web applications. We provide building blocks to add location features like maps, search, and navigation into any experience you create.

What is is a WebGL-powered framework for visual exploratory data analysis of large datasets.

How do I use it?

Everything you need to know to get you started is on the home page


From cran


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


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 <- ''
flights <- read.csv(url)
flights$info <- paste0("<b>",flights$airport1, " - ", flights$airport2, "</b>")

mapdeck(token = key, style = mapdeck_style('dark')) %>%
    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'