Questions tagged [mapdeck]

For questions relating to the R package mapdeck

Mapdeck provides a mechanism to plot an interactive map using Mapbox GL, a javascript library for interactive maps, and Deck.gl, a javascript library which uses 'WebGL' for visualising large data sets.

https://cran.r-project.org/web/packages/mapdeck/index.html

https://github.com/SymbolixAU/mapdeck

32 questions
3
votes
1 answer

add_polygon in mapdeck zooms out the map

When I add a simple map to my shiny application, without adding polygons, the zoom argument works correctly, and the map initializes as it should. On the other hand, when I add polygons with add_polygon(), the map is initialized more zoomed out than…
somberlain
  • 69
  • 6
2
votes
1 answer

mapdeck R when using fill_colour the session crashes in Rstudio

As the title says when I use the fill_colour parameter my session crashes. For example if I take from the Colours section of the mapdeck site and run library(mapdeck) library(sf) sf <- spatialwidget::widget_melbourne mapdeck() %>% add_polygon( …
Dean MacGregor
  • 11,847
  • 9
  • 34
  • 72
2
votes
1 answer

What exactly does Mapdeck in R return during a click event with a add_scatterplot?

I've been trying to develop a few web apps using Mapdeck in R that revolve around building site maps. Right now I'm trying to develop an app that will return a value on click. My question, with the below sample, what exactly does Mapdeck return on…
rwjam
  • 163
  • 10
2
votes
1 answer

How can I create Italy map with mapdeck?

I've found this code about a map with road traffic casualties across the UK done with mapdeck. I would like to create something similar for Italy, but I don't understand how to modify the code to obtain italian…
ArTu
  • 431
  • 4
  • 20
2
votes
1 answer

Is is possible to color path by elevation?

I'm using mapdeck::add_path() to show aircraft flight paths. I would like to color the paths by elevation; is this possible? Here is a short example: library(mapdeck) library(sf) # From…
Kent Johnson
  • 3,320
  • 1
  • 22
  • 23
2
votes
1 answer

How can I make the color scale in mapdeck static

I am developing a shiny app which steps through time by each hour and shows the precipitation on a mapdeck map. I read in the weather data for the entire day and using reactivity filtering the data for the hour and plotting them as scatterplot using…
2
votes
1 answer

draw a bar based on a value of column in a map

I am using map deck to draw nearly 100K points, is it possible instead of a dot, show a bar based on a value of a column installed library(mapdeck) library(htmlwidgets) dataset =data.frame(stringsAsFactors=FALSE, x = c(143.4865219,…
Mim
  • 999
  • 10
  • 32
2
votes
1 answer

Mapdeck Package in R - add_grid Does Not Appear to Render Anything

Problem: The add_grid function in the R mapdeck package is very exciting. However, following the CRAN documentation, I cannot seem to get any data to actually plot on the returned map. In other words, the map returns, but no data is plotted. Is…
amormachine
  • 405
  • 4
  • 10
1
vote
0 answers

Mapdeck map will not load when called from a Shiny server over HTTP

I have created a Shiny app incorporating Mapdeck to visualize some pandemic-related data. When the app is run on my local machine using RStudio, it works just fine - the map, all layers, and all observer events work as expected. However, to make the…
wdbspe-phd
  • 11
  • 1
1
vote
1 answer

Clearing data while maintaining the same view in mapdeck/mapbox in R

I'm using mapdeck in conjunction with shiny to create an interactive map with various interactive filters for the data. One input that I want to include is an input that toggles on/off a certain layer of data (bus stations). This is the code I have…
nkt95
  • 65
  • 4
1
vote
0 answers

Adding popups in mapdeck/mapbox in R

Is there a way to add popups when the user clicks a feature using the mapdeck in R? I am plotting Origin-Destination arcs using add_arc m <- mapdeck(token = key, style = 'mapbox://styles/mapbox/dark-v9') %>% add_arc( data = lf , layer_id =…
nkt95
  • 65
  • 4
1
vote
1 answer

Showing Elevation Mapdeck

I require some help in getting my elevation to show in mapdeck. For some reason I cant seem to get the code to work. I can show the points on the map as 2D points using "add_scatterplot" but whenever I try and get it to use the elevation data it…
ANICS
  • 13
  • 3
1
vote
0 answers

Custom Marker with Mapdeck

I am trying to create custom Markers (e.g. a picture or symbol) for a scatter plot in mapdeck. Example: test <- st_as_sf(as.data.frame(list("lon" = 40, "lat" = 60)), coords = c("lon", "lat")) map <- mapdeck( style = mapdeck_style("light")) %>% …
Patrick
  • 125
  • 1
  • 7
1
vote
1 answer

How to use multiple data frame inputs for Mapdeck add_scatterplot within R Shiny?

I'm finding Mapdeck to be a really cool alternative mapping method when working with large datasets in r shiny. However I'm finding it difficult to pass in multiple datasets in order to expand the complexity of the resulting map. For Example: I'm…
rwjam
  • 163
  • 10
1
vote
1 answer

elevation argument not working when fill_color is supplied in add_column in mapdeck

Using mapdeck to plot elevated columns. Elevation happens when fill_colour is ommitted. However when it is supplied, elevation is ignored. In document or code, there is no such indication that both cannot be used together. library( mapdeck…
Soumya Boral
  • 1,191
  • 14
  • 28
1
2 3