Leaflet Mapping in RStudio - Adding Markers
HTML-код
- Опубликовано: 10 фев 2025
- This video will show you how to add markers to your map from your own data table in RStudio using the leaflet package.
PATREON SUPPORT: / geomatechs
Check out the rest of this series here: • Leaflet Mapping in R/R...
detailed explanation is never enough, especially for beginners. Thanks very much
Bro these tutorials are fire! These deserve way more likes! Thank you so much!
man i was literally looking for a video on how to do a basic interactive leaflet map with points and popups. you delivered exactly that, thanks so much!
Thanks a ton for uploading such videos. This is direct contribution to society. I learned a lot from this tutorial series for my upcoming weather app in shiny. Thank you once again.
This video was just what I needed, thanks a lot mate!
awesome video man, very clear and concise!
Great Video, easy to follow, keep up the good work
Very helpful quick start, thank you!
Thanks Brent, great tutorial, man!
great video thanks
This was awesome. Thank you.
Thanks
Thanks!
This is amazing!!!! I love u!
Any ideas on how to draw the routes between points in the map?? Similarly to how google maps does it.
Hi great video, how to give separate colors clusterwise/groupwise?
what if i want to do markers only on the map of egypt ? what should I write to display only egypt map? thanks
Hi - great videos. Thanks for sharing. Do you know when you will be posting how to make custom pop-ups in Leaflet in R Studio? Thanks!
Many thanks Abigail ! The good news is we are working on that video currently and it should be posted soon! Until then you can use this link to a reference page on the leaflet/ RStudio package (created by the leaflet team):
rstudio.github.io/leaflet/popups.html
Great! I did read through those instructions and I'm trying to integrate your pop up instructions in this video with their first example so that I can get multiple pop-up boxes that are more cleanly formatted and include data from more than one column in the csv. I'll look out for your video.
ruclips.net/video/mTTuUGisxDk/видео.html hopefully this helps!
hi! thanks for the video it has helped me a lot but i have a problem, when i execute these two lines "my_data$lat
Hi Brent,
is it possible to get inputboxes for lat and long and a button to get a marker on the map?
Hey, The problem I face while loading the markers 1000+, can you give. A solution for that
Thank you for your videos ! The information provided here is invaluable. I do have a question, however. Is the Spatial data frame function required ? Where and how is it essential ?
Not essential for leaflet maps if the data has lat and long data that is already projected in WSG 84. Otherwise you would benefit from using a spatial data frame to properly convert it !
Great video! I was just curious if it was possible to do this without any longitude and latitude points. For an example, I want to create a map of the US using data that has the city and state.
To my knowledge you will need to have coordinates for your own dataset. However you could try pulling country or city data from an on-line source and matching it to your data frame. For example a quick USA Cities search on google gave me a link to this geojson file on github: gist.github.com/Miserlou/c5cd8364bf9b2420bb29
I'm sure there are plenty of options like this one available even as R packages themselves.
Hello, first thanks for your videos, they are excellent, secondly I need help, I want to add a condition to the markers that I will plot ; In my project, I need to plot some car collisions that occured in New york, but I don't want to plot them all, I want only to plot those on which there were 1 death or more. PS : I have longitude, latitude columns and also a column with the deaths, for example : 0 , 1 , 2... Thanks!
great video.
couldnt use the popups...
Thank you for this video I really needed it! Unfortunately it does not work for me.
The scripts reports this error:
Error in UseMethod("metaData") :
no applicable method for 'metaData' applied to an object of class "function"
I cannot understand what does it mean, could you help me?
Thank you so much!
Best,
Giovanni
Data.sp was redundant?
sir, i wanna ask a question, is there any possibility to map the municipality? for example only i want to create an interactive map with my own town only with dataofcourse
Hello John, yes you can map only a municipality in a few different ways depending on what data you have.
Option 1 - If you know the lat and long bounds of the municipality you want to map then you can set those to be the limit of your leaflet map and simply add your other data over the basemap/ custom map tiles.
Option 2 - You can hold off from adding map tiles when you create the leaflet map object and just add in your region's boundary data if you have it. This will only display the data you have so you may need to be sure your data is up to date (ie new roads or buidlings). Again if you don't want the user to be scrolling around in other areas of the world map then you can set the bounds of the map to restrict that feature.
Hope this helps, if you neeed more clarification let us know and maybe we can put up a video on it in the future!
Cheers.
How can we reduce the size of icon?