All Questions
26
questions
1
vote
1
answer
548
views
Leaflet in R - Highlight Polygon on Click
Using the leaflet package in R, I'm looking to highlight / change fillColor of polygon upon click instead of hover.
This is in a Shiny app, so I have access to the reactive values, and knowledge of ...
4
votes
1
answer
816
views
Customizing Leaflet Map Icons in R
I started to learn how to use the search features in leaflet maps - below is a leaflet map which allows you to search for a city (i.e. single search term):
library(leaflet)
library(leaflet.extras)
...
1
vote
3
answers
412
views
Removing Colors on a Map in R
Using the following link as a guide (https://github.com/r-spatial/leafgl/issues/18), I made this map that I really like in R:
library(sf)
library(leaflet)
library(leafgl)
library(colourvalues)
...
1
vote
1
answer
70
views
Replacing "rdgal" with a Data Frame in R?
I found this R code (Search button for Leaflet R map?) and was able to make a interactive map in R:
library(inlmisc)
city <- rgdal::readOGR(system.file("extdata/city.geojson",
...
0
votes
0
answers
68
views
Saving Multiple HTML files in R
I am following this R tutorial here (towards the end of the page) : https://glin.github.io/reactable/articles/examples.html. I would like to make an interactive map that allows you to filter points on ...
-1
votes
2
answers
493
views
Forcing Visualizations in R to Have Only 2 Decimal Points
I am trying to make an interactive Leaflet map in R. I have a shapefile that looks something like this:
# my_shapefile
Simple feature collection with 6 features and 5 fields
geometry type: ...
1
vote
1
answer
195
views
Adding "Breaks" in "htmlescape"
I am following this tutorial here (https://rstudio.github.io/leaflet/popups.html):
library(htmltools)
library(leaflet)
df <- read.csv(textConnection(
"Name,Lat,Long
Samurai Noodle,47....
3
votes
2
answers
719
views
Combing Leaflet Maps Together
I generated these 2 random dataset about geographical coordinates (e.g. each point represents an imaginary restaurant in France):
id = 1:1000
long = 2.2945 + rnorm( 1000, 0.1085246 , 0.1)
...
1
vote
1
answer
26
views
Is "knitr" required for certain outputs in R?
I am trying to follow this post on stackoverflow (R Leaflet: Add a Range Slider to Filter Markers without Shiny). I copy and pasted the code below:
library( crosstalk )
library( leaflet )
library( ...
1
vote
1
answer
366
views
Simulating Geographical Points Around the Eiffel Tower
The coordinates of the Eiffel Tower are (Longitude: 48.8584° N, Latitude: 2.2945° E). I am interested in randomly generating 100 points that are located within a 12 KM radius of the Eiffel Tower. In ...
2
votes
0
answers
184
views
Restricting Zoom Options in Leaflet Maps
I followed the tutorial here (https://rstudio.github.io/leaflet/) and made this map:
library(leaflet)
m <- leaflet() %>%
addTiles() %>% # Add default OpenStreetMap map tiles
addMarkers(...
0
votes
0
answers
173
views
Merging Information into a Shapefile
I have a shapefile ("my_shapefile") in R.
Part 1: If I try inspecting this shapefile and check its contents by adding a "$" - there appears to be 3 parts:
head(my_shapefile$var1)
...
1
vote
0
answers
690
views
Learning How to Use Shapefiles in R
I am trying to learn more about "shapefiles" and how to plot them in R. Ideally, I would like to make a "leaflet map" (interactive or static) that looks something like this: https:...
1
vote
1
answer
345
views
R: Joining Maps Together
I am working with the R programming language.
Using the "leaflet" library, I made the following 3 maps:
#load libraries
library(dplyr)
library(leaflet)
library(geosphere)
library(leafsync)
...
5
votes
2
answers
1k
views
R: Connecting Dots on a Map
I am working with the R programming language.
Using the "leaflet" library, I made the following map for these 5 cities:
library(dplyr)
library(leaflet)
map_data <- data.frame("Lat&...