All Questions
41
questions
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"....
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 ...
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 ...
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 ...
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,...
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 ...
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 ...
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 ...
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 <- ...
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 ...
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 ...
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()...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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/...
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....
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 ...
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 ...
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 ...
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)
...
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 ...
1
vote
0
answers
131
views
Map (with geojson) instead of Leaflet map
I am doing a poster for class. Everything was ok, I created a descent map for showing some data in New York, using Leaflet.
jpal <- colorRampPalette(c("#03B9FF", "#801515"))
# qpal <- ...
1
vote
1
answer
624
views
How different colors to different sections of a route on leaflet map? [R Studio]
I have a JSON file of a long route. The file contains the lat and long of of this route.
I'm trying to mark different sections of this route based on a set of criteria (which I've compiled in a ...
0
votes
0
answers
301
views
How to add line not connected in a sequence using leaflet
It seems polyline will connect all the start end points in sequence together like an unfilled polygon. Is there a way to add each line separately on an interactive map in R?
This earlier thread ...
2
votes
1
answer
2k
views
R Shiny leaflet addPolygons (colors are not showing)
I hope you can help me. I have created a choropleth Map with Leaflet. I merged my (dataframe with countries and a random score) and a Shapefile with the Polygon data. So far it is working, however if ...
4
votes
1
answer
3k
views
R Leaflet Legend: colorBin- removing decimals in between breaks
I am creating an interactive HTML map in R using the Leaflet library.
The legend employs the colorBin method for creating the 6 categories to break the data into.
Using the min(values) and max(...
1
vote
1
answer
1k
views
Advanced Popups in R Shiny Leaflet
I have a dataset as follows
itemcat country item Price date_today lat lng
Clothes Bangkok Shoes $5 2016-04-27 13.75 100.51
Clothes Bangkok Tshirt $5 2016-04-27 13.75 100.51
Clothes Bangkok Skirt $5 ...
1
vote
2
answers
2k
views
Interactive Map in R using leaflet/Shiny
I want to create a map with a sidebar where you can select the range of a time period. The idea is that the map shows marks only for hotels which opened during the period. I had no clue to do that so ...
0
votes
1
answer
796
views
OpenStreetMap doesn't display in RStudio (with R 3.2.1)
I am using code from here
library(leaflet)
m <- leaflet() %>%
addTiles() %>%
addMarkers(lng=174.768, lat=-36.852, popup="The birthplace of R")
m
A point appears in the middle of ...
9
votes
1
answer
2k
views
How to create an interactive plot of GTFS data in R using Leaflet?
I would like to create an interactive map showing the public transport lines of a city. I am trying to do this using Leaflet in R (but I'm open to alternatives, suggestions?)
Data: The data of the ...
1
vote
1
answer
383
views
Geo mapping in R
I have a transaction data at country level.
Data Sample:
TransID CountryOrigin(CO) CountryDestination(CD) COLat COLong CDLat CDLong
1 India Australia ...
2
votes
2
answers
3k
views
Is it possible to use rMaps to draw a route on a map in R?
I'm trying to use rmaps http://rmaps.github.io/ to draw the route a vehicle follows onto a map. In my ideal world, the map should:
* be interactive (i.e. zoomable, scrollable)
* store and display ...