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

Character encoding in R Leaflet

I have a dataframe with values in multiple languages. I'm trying to use it in a leaflet map, but I can't get the encoding to work right. I realize that the relevant encoding is "UTF-8". I tried the solution suggested here but it doesn't work for…
Yanir Mor
  • 581
  • 3
  • 15
0
votes
2 answers

Shiny/Leaflet: colors for choropleth map by user input

I'm trying to build an app which plot choropleth leaflet map based on variable inputed by user. For now I want to make it work with categorical variables, so I have tried using colorFactor() to create the palette. The polygons are plotted, but…
Bruno Pinheiro
  • 964
  • 8
  • 20
0
votes
0 answers

Links between points in leaflet

I have html file with map built in leaflet R`s package. One of layer contains points I need to visualize a links between points after clicking of any icon from group. Does anyone has any idea how I can do that?
0
votes
1 answer

adding blank legend in R leaflet package?

Is there any way to add a 'blank' legend with just a title to a leaflet map using the R leaflet pacakge? I was hoping to mimic a map title using a blank legend.
Ajjit Narayanan
  • 632
  • 2
  • 8
  • 18
0
votes
1 answer

R shiny checkboxGroup to plot data on map

I am very new to shiny, and I have a question. I have a simple dataset with observations (Number_Total) of species (Species), in a certain location (X,Y). I would like to generate a map, that enables you to select the species in a dropdown menu.…
jonas
  • 39
  • 5
0
votes
0 answers

renderLeaflet: legend is not rendered in shiny

Using the renderLeaflet (following codes), I am trying to create an interactive map within shiny. I want the map to be updated based on users selections of age group, sex, and year. When age group=60 and sex=both sexes and year= 2010 are selected,…
Nader Mehri
  • 514
  • 1
  • 5
  • 21
0
votes
1 answer

Leaflet Map Zooms Based on a dynamic selectInput

here is a dummy dataframe DF Location <- c("A","B","C","D","E") OwnBicycle <- c("Yes","Yes","Yes","No","No") Latitude <- c(-0.091702,-3.218834,-2.856487,-1.300799,0.498922) Longitude <- c(34.767958,40.116147,38.945562,36.785946,35.308054) DF <-…
andy
  • 1,947
  • 5
  • 27
  • 46
0
votes
1 answer

Change Leaflet Map Dynamically based on Multiple Reactive expressions

In the example Data Frame DF, I have the following columns. gender <- c("Male", "Female","Female", "Male") Location <- c("AB", "BC", "CD", "DE") hasTV <- c("Yes","Yes","No","No") Latitude <-…
andy
  • 1,947
  • 5
  • 27
  • 46
0
votes
0 answers

Leaflet with multiple polylines elements leads to huge HTML

I'm building a leaflet map on R having multiple layers that are controlled by addLayersControl. Every layer as the same spatial information, so only the data associated to each polylines changes. The idea is to have a basic map, where the user…
Bastien
  • 3,007
  • 20
  • 38
0
votes
1 answer

How to update shiny reactive only if threshold is crossed?

In the code below, the leaflet addCircles get drawn twice after a change in zoom. I think this double plotting occurs because the reactive to create a dataframe always updates with a change in zoom. However, I only want the reactive dataframe…
dca
  • 594
  • 4
  • 18
0
votes
1 answer

Shiny app doesn't work on shinyapps.io, but works in rstudio

The app is currently hosted on shinyapps here: https://njed.shinyapps.io/race_seg_gap_map/ There is no error message (I checked shinyapp logs) and memory usage doesn't go above 100mb. The points don't display and the map doesn't update when…
dca
  • 594
  • 4
  • 18
0
votes
1 answer

Place Popups in R Leaflet, from csv

I want to concatenate multiple columns from a csv and show the data in a popup for its respective point in R, using Leaflet. I have set the points from a csv, so that it is displayed in R, but from what I have read on the internet, the popups have…
user1905507
  • 27
  • 1
  • 7
0
votes
0 answers

Warning: Error in loadNamespace: there is no package called ‘leafletsector’

I am trying to reverse engineer an R code which is currently running on a Linux Server. I keep getting the following error: Warning: Error in loadNamespace: there is no package called ‘leafletsector’ 90: I tried installing the package…
0
votes
1 answer

Subsetting spatial polygon dataframe

I want to be able to subset my spatial polygon dataframe with both the data & polygons based on user input then do a color mapping based on the filtered data.Here is an example though it outputs: "Warning: Error in UseMethod: no applicable method…
brian
  • 75
  • 1
  • 8
0
votes
0 answers

purrr::walk not working as expected

UPDATE When I comment out the popup code the duplication goes away... When I add in the informaiton I want in the popup inside of the walk() function I get what I want without duplication, so I suppose it was taking the assigned Popup and running…
MCP_infiltrator
  • 3,961
  • 10
  • 45
  • 82