All Questions
93
questions
1
vote
1
answer
72
views
How to visualize single points in shiny app mapview leaflet
I have a large dataset but I am providing 3 records to make this example reproducible with the minimum amount of data. I am able to show on leaflet all the 3 sites at once but I would like to show one ...
0
votes
1
answer
87
views
How to color a leaflet map by a categorical variable?
Using leafleat, how can I color the different areas based on 'NAME_ASCI' and show colors on a legend?
This works:
library(leaflet)
library(mapview)
m <- leaflet(franconia) %>%
addProviderTiles(...
0
votes
1
answer
78
views
How to set an anchor and create polygons from shapefile
I am following up on the example here: How to make small polygons from shapefile and extract coordinates
I am trying to adapt that example to a different shapefile but I am getting errors. The new ...
1
vote
2
answers
223
views
How to make small polygons from shapefile and extract coordinates
I have a small shapefile here: https://login.filesanywhere.com/fs/v.aspx?v=8c6d62865c626fb4a2ab called bay.RDS
library(tmap)
library(leaflet)
library(mapview)
bay <- readRDS('bay.RDS')
mapview(...
1
vote
1
answer
535
views
Add a title to the Leaflet map
I have a simple question but still do not know how to find the answer to it. All I need is to add a title to the leaflet map. I do not need it to me on the map, just above it as in a usual ggplot map.
...
0
votes
0
answers
51
views
Show the aggregate value on markerClusterOptions in R
I want to do a map in R, that will show the points in clusters when you zoom in/zoom out and in the same time show a aggregate value.
Now I have this code:
m <- leaflet(acdt_1, width = "200%&...
0
votes
1
answer
170
views
RShiny display multiple leaflet maps on the same plot
I have a shiny app where the user can select to display a specific leaflet map (on 51 available), or all leaflet maps (the 51 on 11 columns and 5 rows).
To display multiple leaflet maps on the same ...
0
votes
0
answers
161
views
Add Polygon Layers to Leaflet Map (with labels and legends)
I am trying to combine 4 leaflet maps into one, where you can filter the layers using addLayerControl. Each layer has popups when you hover over the polygon with the corresponding variable (numeric) ...
0
votes
1
answer
86
views
In R leaflet interactive map, all my values get incorrectly displayed (while values inside data frames are all correct)
For some reason, despite the fact Syria in the dataframe has Value = 1, when I plot the map it shows up as 0.038 and is called Belarus... and all the other countries also get some crazy values and ...
1
vote
1
answer
229
views
Create a map in R and put some coordinates
I have a dataset with three variables related to coordinates: UTMX, UTMY and HUSO.
I'd like to create a map where all the points were shown.
Here an example of the dataframe:
x y huso
...
1
vote
1
answer
594
views
Calculate Average Distance Between All Points in Radius and Reference Point (R)
I have spatial data and would like to create a new column in my dataframe that calculates the average distance to neighboring coordinates within a radius of my choice.
I found this code that gets me ...
0
votes
0
answers
40
views
How to reduce incremental zooms in leaflet?
I am making maps in leaflet and cannot change the zoom increment for some reason.
I don't have the option to use
var map = L.map('map', {
zoomSnap: 0.25
});
I also don't have these functions ...
0
votes
2
answers
93
views
R Displaying Points Twice?
I have this code for an interactive map in R:
library(leaflet)
library(inlmisc)
Long = rnorm(1000, -71, 0.5)
Lat = rnorm(1000, 42.3, 0.5)
loc = rep("loc", 1000)
Name = rep("Location&...
0
votes
1
answer
2k
views
Error in UseMethod: no applicable method for 'metaData' applied to an object of class "NULL"
I'm trying to add different icon to the markers which I'm trying to show. I have different category like this
category <- data() %>%
dplyr::select(category) %>%
distinct()
and it looks ...
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:...