Skip to main content

All Questions

Tagged with
1 vote
1 answer
73 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 ...
Salvador's user avatar
  • 1,467
0 votes
1 answer
92 views

How to color a leaflet map by a categorical variable?

Using leaflet, 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(&...
Salvador's user avatar
  • 1,467
0 votes
1 answer
89 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 ...
user165426's user avatar
1 vote
1 answer
599 views

Calculate average distance between all points in radius and reference point

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 ...
user2813606's user avatar
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 ...
ASHooper93's user avatar
4 votes
1 answer
475 views

Filter map by proximity to location

I have some postcode data alongside longitude and latitude data which I am using to plot certain types of crimes across the UK using the Leaflet package. I am trying to do this using Rshiny I have ...
awz1's user avatar
  • 439
0 votes
0 answers
504 views

Add axis to leaflet map

How can you add an x and y axis to a leaflet map figure -- in the case of a map how to add the longitude and latitude? For the figure below, how can axis be added please? library(leaflet) leaflet() %&...
user2957945's user avatar
  • 2,393
0 votes
0 answers
238 views

How to Create Senate Roll Call Voting Map in R

I am looking to ultimately render a map in Leaflet that shows the roll call voting results for a specific vote from the Senate. This obviously involves coloring a state polygon based on the unique ...
Jared's user avatar
  • 81
1 vote
1 answer
569 views

R+Shiny+leaflet: aggregate values on map according to zoom level

Please consider the small example at the end of the post. I simply put a lot of markers on a geographical map. I would like to be able to do two things: associate a value (simply a number) to each ...
larry77's user avatar
  • 1,461
0 votes
1 answer
487 views

R-Leaflet : Merged Shapefile and Excel appeared successful, but highlight label reveals that the 31 polygons are only filled w/ 4 repeating values

I am working on a map for my internship. I have the shapefile of the city of Villeneuve d'Ascq's subdivisions (referred to as "IRIS" in France) that I am mapping, and separate CSVs with various ...
lowwasteluau's user avatar
13 votes
1 answer
10k views

Plotting sf-type object in leaflet [r]

I would like to ask how to plot sf object in leaflet from leaflet package I am aware about mapview package that can plot it however I prefer using lealfet package. I provided example down below: ...
Petr's user avatar
  • 1,757
0 votes
1 answer
1k views

Custom palette with 2 colors and custom breakpoints in R leaflet - continuous variable

I am trying to create a custom palette with 2 colors(Red and Green) and custom breakpoints for my leaflet map. Currently I am using a single reds color palette.Mymap Which I have generated using ...
user12907431's user avatar
12 votes
2 answers
10k views

How can I plot individual data points in a map using R/ leaflet?

I am trying to show the individual points in a given place, like a map equivalent of dot plot. I tried with leaflet library in R, but I am only able to map the size of the marker to the continuous ...
karthik2k2's user avatar
0 votes
0 answers
2k views

R: adding title to a leaflet map and Saving as PDF

What is please the simples way to add title to a leaflet map object? I would like to add title to a leaflet map that I have and also wanted to ask about saving as pdf. When saving as pdf (in example)...
Petr's user avatar
  • 1,757
1 vote
0 answers
541 views

leaflet minichars group argument

I would like to ask, Is there a group arguments for function from (leaflet.minicharts)? I am using function addFlows function and I am tryng to insert it into layer control, however since it doesnt ...
Petr's user avatar
  • 1,757

15 30 50 per page