All Questions
1,955
questions
0
votes
1
answer
49
views
Combine units in a shapefile while keeping others granular in R
I have a 5-digit postcode shapefile for Germany. Big number 1-digits postcodes are similar to German states. I read shapefile data with rgdal thus having a SpatialPolygonsDataFrame. I have only data ...
0
votes
0
answers
57
views
Posit session failing when I open a script with mapping code?
Why would a posit workbench session fail when I just open a script that contains code that has maps being created and run? (Spatial analysis code).
The script does not include the packages being ...
0
votes
0
answers
113
views
R Shiny Leaflet map doesn't center properly after expanding the container
I have a Shiny app that correctly collapses the datatable beneath a leaflet map, extends the map and then also brings back the datatable with a button click. The problem is something happens to the ...
0
votes
1
answer
58
views
Selectively load parts of a map
Suppose I have the following shapefile:
library(sf)
library(leaflet)
library(leafgl)
library(colourvalues)
library(leaflet.extras)
nc <- st_read(system.file("gpkg/nc.gpkg", package=&...
0
votes
0
answers
40
views
Connect polyLines by marker, rather than coordinates, in R Leaflet Shiny App
I have a shiny app, using r leaflet, that is a map of the world with markers indicating scientific researchers. the markers are circle markers, and they show the researcher name and the text "...
-1
votes
1
answer
291
views
R leaflet in Shiny, layer opacity controled by sliderInput
I am developing a shiny app with leaflet and several added polygons, and I want to control the polygons opacity with a sliderInput().
I have a working solution that restart addPolygons() when the ...
0
votes
0
answers
96
views
Select marker by clicking on a map and update selected input
I am currently working on a Shiny app and I encountered some problems. My objective is to display temperature graphs for specific weather stations and selected years. Users can choose a station name ...
1
vote
1
answer
548
views
Leaflet in R - Highlight Polygon on Click
Using the leaflet package in R, I'm looking to highlight / change fillColor of polygon upon click instead of hover.
This is in a Shiny app, so I have access to the reactive values, and knowledge of ...
0
votes
1
answer
258
views
Adding multiple row table in leaflet map
I am trying to add multiple row table in leaflet map R for each polygon, which should popup while clicking the polygon. PopupTable() only allows single row to popup.
Please suggest me a better option ...
0
votes
1
answer
110
views
Only render leaflet map when zoom passes a threshold in Shiny
I have built a leaflet map in a Shiny application that shows different layers depending on what zoom you have.
I have built this combining leafletProxy with observeEvent and leaflet's input$MAPID_zoom....
1
vote
1
answer
121
views
Customize the legend of bubble map by using leaflet
So far I could plot the bubble map as below:
library(leaflet)
library(leafletCN)
library(plyr)
dat = data.frame(name = regionNames("china"),
value = 1)
data=data.frame(...
0
votes
1
answer
459
views
Convert geometry column and retain other columns
I have imported a shapefile (.shp) into R to define a set of polygons. The shapefile takes the form of a grouped dataframe with ageometry column containing a MULTIPOLYGON list of XY coordinates. I ...
0
votes
1
answer
133
views
Click on a polygon of a leaflet map and subset the same dataset which is displayed in table
I have the shiny app below with this sf object and I want to use the leaflet package to create an interactive map with clickable polygons. When a user clicks on a polygon, the app will save and ...
3
votes
0
answers
4k
views
R shiny Warning: Error in &&: 'length = 3' in coercion to 'logical(1)'
Update:
The error is occuring specifically when the shiny app tries to add the shinyalert pop-up, which has three elements (this is what the length = 3 refers to in the error). If I remove the HTML ...
0
votes
1
answer
86
views
In R leaflet interactive map, all my values get incorrectly displayed (while values inside data frames are all correct)
For some reason, despite the fact Syria in the dataframe has Value = 1, when I plot the map it shows up as 0.038 and is called Belarus... and all the other countries also get some crazy values and ...