Questions tagged [r-leaflet]

This R package makes it easy to integrate and control the open-source JavaScript Leaflet software in R.

499 questions
0
votes
0 answers

How to set boundaries with leaflet and export to pdf with mapshot?

I have been trying for the whole day now to create a map an export it to a pdf. The problem is that I don't really understand how to either set "width" and "height" or use "fitBounds". Also I would like to crop this "Leaflet" logo at the bottom…
titeuf
  • 133
  • 1
  • 10
0
votes
0 answers

Circles Marker Blinking when Clicked in Leaflet R

I couldn't tell you when, but recently I've noticed that the AddCircles output on a leaflet map seems to be blinking quite a bit when clicked on. The transition is not smooth, which wasn't the case before. There are no errors, so its very hard to…
piyuw
  • 61
  • 1
  • 6
0
votes
0 answers

Can I create an embed code for an interactive choropleth map made using the leaflet package in R?

I'm new to R. I've just made a basic interactive choropleth map using the leaflet package in R: leaflet() %>% addProviderTiles("CartoDB.Positron") %>% setView(-2, 55, zoom = 5) %>% addPolygons(data = shapes_funding_merge , …
TL_13
  • 1
0
votes
1 answer

R Shiny Leaflet Selector for shapefile to be displayed

New to R shiny, new to shapefiles, new to coding anything outside of data cleansing/analysis. I want to display where particular services are available in my state on a map. I have shapefiles for postcodes (zipcodes) for my state. I have a csv file…
0
votes
1 answer

tags$style applied to all Leaflet Maps in R shiny

I'm able to change the cursor in an R shiny app regarding r-leaflet but can't seem to figure out how to only do it for specific maps. It seems like the last tags$style is applied to all the previous maps? I've added a reprex with only two maps but…
Josh Erickson
  • 316
  • 2
  • 10
0
votes
0 answers

Assigning colours to each category and displaying the points in a Leaflet Map in R

I have a dataframe [df], just like this: id lat long category 1 -103.3671 43.0835 0 to 0.5 2 -103.3634 43.0855 0 to 0.5 3 -103.3684 43.0884 0.5 to 1 4 -103.3613 43.0835 1 to 1.5 I would like to know how to…
dloudtrain
  • 301
  • 2
  • 9
0
votes
0 answers

Crosstalk links broken by second Leaflet addCircleMarkers call

I am working with multivariant data linking Leaflet and d3scatter plots. It works well for one variable. If I try to include a second variable in Leaflet by a second addCircleMarkers and addLayersControl then the sharedData links break, the…
paulc
  • 1
  • 1
0
votes
1 answer

Create interactive map with R Leaflet that shows markers upon polygon click

Creating a leaflet map in R can be tricky if one wants to add reactive, or otherwise customized, features. My goal was to use my workflow in R to make a choropleth map that is then augmented by the ability to click a polygon and 'reveal' a set of…
al-obrien
  • 1,353
  • 11
  • 29
0
votes
1 answer

How to change circle marker color in leaflet when I select a row in the table in Shiny?

So I want to change the CircleMarker colour in Leaflet map when I select a row in the table. I didn't get any errors but nothing happens. I don't know how to create and apply the reactive function properly in my Shiny app. I tried to create a…
0
votes
1 answer

Leaflet in Shiny web application does not display the map

I was trying to create an interactive map that allows the user to select the states that they want to look for by subsetting the shapefile from census.gov with the following UI function and server…
Kaihua Hou
  • 89
  • 1
  • 9
0
votes
1 answer

leaflet seeminly plotting random colors when creating a map

I am trying to create a map of the UK with a colorscale indicating the yield for a particular crop in each region. I have got the plot to work and have even managed to get some marker data in there but for some reason leaflet is just randomly…
dezza
  • 15
  • 3
0
votes
1 answer

Misalignment between POSGAR94 polygons and WGS84 leaflet map

I need to draw a bunch of polygons from this dataset on a leaflet map on R: The coordinates are in POSGAR94, but I need them in WGS84 to plot on leaflet (over a OpenStreetMap layer) and to compare them with other data (already on…
0
votes
0 answers

Link map click event with plotly highlight feature

I want to be able to link my leaflet map with plotly charts such that when I click on a marker on the map, the input id corresponding to the clicked marker is highlighted on the plotly chart. So far I have already created a reactive function for the…
brian
  • 75
  • 1
  • 8
0
votes
1 answer

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 that might make it a lot faster. According to this…
zesla
  • 11,155
  • 16
  • 82
  • 147
0
votes
1 answer

R-Leaflet : Merged Shapefile and Excel appeared successful, but highlight label reveals that the 31 polygons are only filled w/ 4 repeating values

I am working on a map for my internship. I have the shapefile of the city of Villeneuve d'Ascq's subdivisions (referred to as "IRIS" in France) that I am mapping, and separate CSVs with various variables which I would like to fill the map with…