Questions tagged [r-leaflet]
This R package makes it easy to integrate and control the open-source JavaScript Leaflet software in R.
r-leaflet
703
questions
1
vote
1
answer
26
views
How to update fillColor to selected input in shiny and leaflet map
I am having a difficult time transitioning my map from static to reactive so a user can select what data they want to look at. I am pretty new to R so please bare with me but I think I figured out how ...
1
vote
1
answer
193
views
How to update fillColor palette to selected input in shiny map?
I am having trouble transitioning my map from static to reactive so a user can select what data they want to look at. Somehow I'm not successfully connecting the input to the dataframe. My data is ...
1
vote
0
answers
347
views
leafletProxy to change map with fixed fillOpacity in addPolygons
I made a Shiny app with Year slider so that the map could update the value by Year with leafletProxy.
However, if I set fillOpacity less than 1 in addPolygons. The opacity from the next Year would ...
0
votes
1
answer
92
views
How to color a leaflet map by a categorical variable?
Using leaflet, how can I color the different areas based on 'NAME_ASCI' and show colors on a legend?
This works:
library(leaflet)
library(mapview)
m <- leaflet(franconia) %>%
addProviderTiles(&...
1
vote
1
answer
82
views
Script does not run in Rstudio but runs well line by line
I tried the most basic code for leaflet in rstudio:
library(leaflet)
m <- leaflet()
m <- addTiles(m)
m <- addMarkers(m, lng=174.768, lat=-36.852, popup="The birthplace of R")
m
...
0
votes
1
answer
34
views
Color not appearing on legend
I am creating a very simple map, using this code:
library(dplyr)
library(leaflet)
Rwanda$Quartile<-cut(Rwanda$lpro12x,quantile(Rwanda$lpro12x),include.lowest=TRUE,labels=FALSE)
color_function <-...
14
votes
3
answers
8k
views
Reverse order in R leaflet continuous legend
I am trying to reverse the value display of my leaflet legend in R. This post covers categorical data, but I am working with continuous data. Here's a toy example:
map <- leaflet() %>% ...
0
votes
1
answer
658
views
How to build a dynamic Leaflet Map in R Shiny?
I am trying to build a shiny app where a user can select State location from drop down and then based on those the lat & long should be plotted on the leaflet map.
I have looked at several SO post ...
0
votes
1
answer
335
views
Is it possible to refer to namespace from another module?
I want to refer to the namespace ns("map") from second server module mod_btn_server2. This module is nested in first server module mod_btn_server1. When I click 'Button 2' points should show ...
0
votes
1
answer
689
views
Creating Shiny App of a Map using Reactive Date Input in Leaflet
I have created a shiny app where the user can select from a date range to show crimes that occurred in Chicago by Longitude and Latitude.
The problem I am having is to make the dateRangeInput reactive ...
1
vote
2
answers
173
views
Plotting native-land.ca json in R
I am new to working with JSON files so not sure how to go about this. I am trying to plot from the json file for the indigenous territories available from native-lands.ca. I can read the file as JSON ...
3
votes
2
answers
985
views
Can't get Leaflet.Spin plugin working in R Shiny
I have a shiny app which involves drawing a large number of lines on a map. I would like to use a spinner to show the user that rendering is underway. Most shiny approaches don't work because they ...
3
votes
1
answer
160
views
Creating a Leaflet map in code workbook in Foundry
Anyone created a leaflet map in Code Workbook using r-Leaflet? I have a functioning script that runs (also double checked in R) but how do I get it to visualise and then use in a Report etc. I have ...
4
votes
1
answer
475
views
Filter map by proximity to location
I have some postcode data alongside longitude and latitude data which I am using to plot certain types of crimes across the UK using the Leaflet package. I am trying to do this using Rshiny
I have ...
0
votes
1
answer
323
views
Heatmap wont change based on time values on Leaflet
I am planning on the make a heatmap that shows the change in activity of a depth over a selected period of time on R shiny. The problem I am currently running into is that the heatmap does not change ...