Skip to main content

All Questions

Tagged with
0 votes
0 answers
55 views

Why are my leaflet points stuck to the map edge?

I try to plot transit stops on a leaflet map, indicating local clustering ("LISA"), based on Moran's I. The map is embedded in an R markdown file. I've successfully done that with polygon ...
fluegelrad's user avatar
0 votes
0 answers
43 views

Interactive R maps that work well on mobile, with inset AK and HI?

Issue: I need an interactive choropleth map of the US that will work well on mobile (ideally pinch-zoom), has a pop-up on tap/click, and has AK and HI set below. Plotly isn't it as you have to tap the ...
Rine's user avatar
  • 11
1 vote
1 answer
154 views

Displaying two different datasets on one map

I want to visualize two distinct datasets on a common map for comparison purposes (so they should have different Icons). So far, I've been using the following code, but it only allows me to display ...
Weiss's user avatar
  • 283
0 votes
1 answer
477 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 ...
Ant's user avatar
  • 323
2 votes
1 answer
513 views

Leaflet - Calculate zoom level from radius in meters

I'm trying to find a way to calculate zoom level given a radius in meters. For example, I want to show 100km radius within point x,y, how do I calculate the proper zoom level for that point?
Mojimi's user avatar
  • 2,971
0 votes
1 answer
292 views

"Leaflet" map showing blue background

I am trying to create a leaflet map in R studio but the map appears to have blue background. Although it is showing the markers but not the actual map. Initially I thought it is due to slow processing ...
Siddharth Gupta's user avatar
0 votes
1 answer
1k views

How to render a leaflet choropleth map in shiny?

I have successfully created an interactive choropleth map using Leaflet in R that projects a single variable across a set of polygons. library(RSocrata) library(rgdal) library(leaflet) library(sp) ...
user3334472's user avatar
3 votes
1 answer
1k views

Adding a 'click' event to leaflet polygons via R

How can I add a mouse 'click' event to each polygon plotted on a leaflet map? I want to do this so I can then filter a separate widget based on data from the features (in this case WD21CD). --- ...
Chris's user avatar
  • 1,503
1 vote
0 answers
319 views

Leaflet polygon fillColor argument always produces error

I've been trying to produce a basic leaflet map of low income benefits in australia. library(leaflet) library(sf) library(downloader) library(dplyr) library(RColorBrewer) url <- "https://data....
aStarIsCorn's user avatar
0 votes
1 answer
864 views

simplify my us state shapefile with rmapshaper::ms_simplify gives error

I'm making chloropleth us state map on my shiny app using leaflet package. I found rendering the map is very slow. After googling , it seems like maybe the shapefile is too complex and simplifying ...
zesla's user avatar
  • 11.5k
0 votes
0 answers
155 views

Calculating a new lat/long co-ordinate by adding a distance to a starting co-ordinate?

I have an ascii grid of elevation data in 100M cells. I have a lat/long for a starting point and I need to add up these 100m increments and get new lat/long co-ordinate to draw a colored box around. ...
Lawrence's user avatar
0 votes
1 answer
2k views

How to use shiny range slider to filter points on leaflet point map

I'm trying to use shiny and leaflet to filter the points on a point map on/off depending on the value of a numeric variable ('Population') I load libraries and data #load libraries library(shiny) ...
RHinks's user avatar
  • 41
1 vote
2 answers
1k views

Creating bordering polygons from spatial point data for plotting

I have had a good hunt around and can't find a solution to what seems to be a tricky problem. I have basic XY (coordinate) data: What I want to do is create neighbouring polygons based on the ...
Jim's user avatar
  • 568
1 vote
1 answer
50 views

leaflet() draws shapefile as giant rectangle

I'm running into a problem with leaflet where it is drawing a giant rectangle instead of the shapes. I'm certain there is some issue with the format of the shapefile, but I can't determine what's ...
jzadra's user avatar
  • 4,194
16 votes
1 answer
3k views

Optimising Shiny + Leaflet performance for detailed maps with many 'layers'

I want to make a Shiny app where the colouring of a choropleth is based on a numeric value of one of many possible quantitative variables that a user can select from. In simple cases, this is ...
dcl's user avatar
  • 929

15 30 50 per page