Coder Social home page Coder Social logo

mapdeck's Introduction

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

## Until googlePolylines 0.7.2+ is on CRAN you'll need 
devtools::install_github("SymbolixAU/googlePolylines")

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

Basic Use

mapdeck(token = 'your_token') will give you a map. You 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

Access Token

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

Available Layers

  • Arc
  • GeoJSON
  • Grid
  • Line
  • Path
  • Point cloud
  • Polygon
  • Scatter plot
  • Screen grid
  • 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

mapdeck's People

Contributors

batpigandme avatar michaelchirico avatar nowosad avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.