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

All Questions

Tagged with
1 vote
1 answer
576 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 ...
1 vote
1 answer
197 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....
4 votes
1 answer
827 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
1 answer
71 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 ...
3 votes
2 answers
740 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
27 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
375 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
187 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
175 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
696 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:...
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&...
1 vote
1 answer
993 views

R: Making More "Noticeable" Labels in R Leaflet map

I made the following map in R (from a data frame with 5 points ordered from "1" to "5"): library(dplyr) library(leaflet) map_data <- data.frame("Lat" = c(43.6426, 43....
1 vote
1 answer
350 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) ...
1 vote
1 answer
124 views

Map vector group in specific order - R leaflet

I have a shapefile with polylines of routes in different years. Here is an example data shapefile with routes in the year 2000 and year 2013. I would like the map to show the older routes at the top ...

15 30 50 per page