Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
0 answers
211 views

Issue add icon and legend with leaflet in r

I try to reduplicate the below code in r markdown, but meet: "Error in htmltools::tags$polygon(id = "diamond", points = draw_diamond(width = width, : attempt to apply non-function"....
Feixiang Sun's user avatar
0 votes
1 answer
36 views

is it possible to add OCHA icon to leaflet map in r?

I am working on a leaflet map for humanitarian purposes, therefore I need to use the OCHA icons for objects on my map. but I couldn't find any library to insert OCHA icons to the R environment. any ...
Jawad's user avatar
  • 31
1 vote
0 answers
271 views

How to make control polygon layers using check box inputs in r shiny

I have an interactive map containing several polygon layers. To turn on/off those layers, we can use addLayersControl() function. However, I'd like to have my own checkbox table out of the map. I ...
Morteza's user avatar
  • 51
0 votes
2 answers
271 views

Deal with missing regions which provoke NAs in choropleth map

I have the dataframe below for which I want to create a chorpleth map. I downloaded the germany shapefile from here and then I use this code to create the map. As you can see the map is created but ...
firmo23's user avatar
  • 8,276
0 votes
0 answers
43 views

Shiny - mapping

I am very new to shiny and the mapping function. Based on the code of the link bellow, I did a simple one, which does not work. Can someone tell me why is not working? There is no error shown. However,...
icatalan's user avatar
  • 101
0 votes
1 answer
835 views

Leaflet map with R shows country completely grey

I am starting to become familiar with leaflet in R although I am experiencing some issues. Data works properly when I am plotting the map with ggplot2. However, I was asked to switch to a more dynamic ...
Nicola Caravaggio's user avatar
1 vote
0 answers
108 views

Leaflet not generating properly in dynamic R markdown document

I have asked this question before here. Initially the focus was on a point map, which the answer fixed. However looking at clustered and heatmaps, the issue persists. Point generates fine (fixed via ...
Jonathan West's user avatar
1 vote
0 answers
45 views

Is there anyone who can figure out why popups in my map function are not coming up on the map on click in R? Using leaflet

I'm creating a map with leaflet with zip code and county polygons. I would like for the values for columns "GEOID10" and "percent" from data set df to popup when I click on their ...
divinew99's user avatar
1 vote
1 answer
360 views

Want to add 10 different types of icons to a leaflet map

Look at my R code, here I am able to mark two different types of marker icon but I want to mark for all the 10 values of quakes$mag column with 10 different types of marker icons. quakes1 <- ...
Rakesh Nain's user avatar
1 vote
1 answer
875 views

Issue with R Shiny, Leaflet --> SelectInput to Change Selection in Drop Down Menu

I am a new R Shiny user and I'm trying to map out all the destinations one can fly to from an origin airport. I've successfully created a map that displays all the airports of a country when I hard ...
user2813606's user avatar
0 votes
1 answer
147 views

Multiple Select All buttons causing problems with interactivity in Shiny map

I'm coding an interactive map in R with Shiny and Leaflet. I programmed 1 select all button for the months (checkGroup) and it worked fine, but adding the select all button for the other inputs has ...
softsoap's user avatar
1 vote
1 answer
911 views

How can I add a download button on a map made with leaflet in R?

I tried adding several scripts in Java to create this button, but they have not worked. Could you help me? I show you the last thing I've tried. sp %>% leaflet() %>% addTiles()...
NoSe's user avatar
  • 109
1 vote
1 answer
653 views

Leaflet map not rendering in shiny app but rendering in console

I am creating a Shiny App dashboard which involves plotting a map using Latitudes and Longitudes using Leaflet in one of the tabs. I need Leaflet for Zoom and the popup option. However, the map is not ...
user2735443's user avatar
0 votes
0 answers
170 views

R - Leaflet map isn't loading in RStudio or Rshiny App - Proxy Authentication Problem

This is my code: map <- mapLeaflet <- leaflet() %>% addTiles() And this is the error: Failed to load resource: the server responded with a status of 407 (Proxy Authentication ...
Jole's user avatar
  • 1
0 votes
1 answer
647 views

Set more specific zoom layer for png export of leaflet map?

I have to create and export multiple maps that zoom to particular areas of my county. The issue I'm having is that zoom level 12 is too far away, and zoom level 13 is too close. Is there a way to set ...
Abby's user avatar
  • 53
3 votes
1 answer
3k views

Vary label color in R Leaflet

I have a data frame with a binary variable and xy coordinates. I can map the data with Leaflet and vary the color of the markers for each variable, but I want to know if I can also vary the label ...
Abby's user avatar
  • 53
0 votes
0 answers
45 views

Why unexpected bubble shows in my R leaflet map (leaflet.minicharts)?

I plan to make a map which can show the transition of entities and their capacity by years by using R leaflet. In this small example, 2017 only have few entities and lower NameplateCapacityMW. In ...
Suzanne Clement's user avatar
7 votes
2 answers
3k views

How can I remove attribution in leaflet map in R

I am working on a shiny application in R which involves maps generated with the leaflet package. I would like to remove the attribution from the map, or at least reduce the visible text. I tried to ...
francimilano's user avatar
2 votes
1 answer
324 views

display map just once (leaflet and shiny)

I am new to Shiny, I have gps data and would like to display it nicely on a map. I need to do an animation that depends on time - basically, track an individual over time on a map. The problem that I ...
Maja's user avatar
  • 171
1 vote
0 answers
221 views

Choropleth change polygon colour based on layer in R leaflet

I have a large number of polygons (>5000 to cover the UK) that even simplified cause quite a large map file. I also have a set of information about each of these polygons with a value per week over a ...
Ryan Hill's user avatar
  • 136
2 votes
0 answers
2k views

Export/Download leaflet map in shiny in various formats?

I created a shiny dashboard to analysis the crimes in chicago. Therefore I also built a leaflet map of chicago where we can see based on markers how many crimes happened in which area of chicago. I ...
S002's user avatar
  • 31
1 vote
2 answers
373 views

How to plot the whole data of dataframe in leafletProxy()?

I am working with R in RStudio and created a shiny dashboard. Within the dashboard I am using the leaflet() function to plot a map. Now I am trying to put markers on the map which shows the crimes in ...
S002's user avatar
  • 31
1 vote
0 answers
72 views

Different colour markers or ID numbers for different coordinates with legend in leaflet

I have a data set on 44 health facility locations (Longitude and Latitude), facility name, type and ID. The task I need to execute are: 1a) I want to map the facility locations each having different ...
Justice's user avatar
  • 11
0 votes
1 answer
482 views

Remove gray/grey shadow from Leaflet map in R

Folks, I have a problem. My map has an unusual gray shadow. I use shapefiles countries <- readOGR(".","ne_50m_admin_0_countries") or geojson url <- "https://raw.githubusercontent.com/...
Anakin Skywalker's user avatar
1 vote
0 answers
1k views

How to plot a large rasterfile quickly in R leaflet with shiny

I obtianed a large rasterfile (.asc file), which I can import in R and plot on a leaflet map. Because the file is pretty big, it takes about 40 seconds before the rasterimage is plotted on the basemap....
Younes's user avatar
  • 129
2 votes
0 answers
656 views

How to select superimposed circles in R leaflet::addCircles?

I am using the leaflet package for R to plot circles in sizes and colors that are determined by a set of variables. It works well, but not all circles can be selected with the cursor. I cannot show ...
Blab's user avatar
  • 33
0 votes
2 answers
814 views

leaflet map of the world - exclude Antarctica

The code below is reproducible - it builds the map of the world using leaflet. I am really not interested in Antarctica and I am more interested in Scandinavia :) Any way to cut Antarctica or at least ...
user2323534's user avatar
2 votes
2 answers
4k views

Custom markers on Shiny leaflet map

I need to map on Shiny leaflet map points based on their type - four types in total with the same marker of a different color. I checked this: https://rstudio.github.io/leaflet/markers.html This ...
Anakin Skywalker's user avatar
1 vote
1 answer
2k views

Leaflet and Shiny - formal argument "selected" matched by multiple actual arguments

Folks, I almost completed my first Shiny app ever, but stumbled. Checked all here https://stackoverflow.com/search?q=shiny+map+r My code: # Packages library(shiny) library(dplyr) library(leaflet) ...
Anakin Skywalker's user avatar
0 votes
2 answers
2k views

how to draw tilegram/hexagon map in R

I'm referring to this article on US tilegram in R. However, I don't know what pre-processing is needed on the df in order to turn it into a hexagon map or tilegram. The sf_NPR1to1 passed to leaflet in ...
santoku's user avatar
  • 3,417

15 30 50 per page