How to Create an Interactive Map in R Shiny with Toggle Layer Function

preview_player
Показать описание
Learn how to create an interactive leaflet map in a Shiny app using R Programming! In this step-by-step guide, you'll discover how to add a layer of rectangle shapes, representing harbor boundaries, and enable users to toggle the layer on and off. You'll learn the complete process, from setting up the Shiny app to adding and customizing map elements using the leaflet package. You'll be able to build interactive maps with dynamic layers and controls for your own projects. Perfect for R Shiny beginners or anyone looking to enhance their mapping skills!

🕒 Timings:
00:00 Intro - Rshiny with leaflet map layers
00:15 Project created
00:30 Set up new R Shiny app
02:40 Add Leaflet map
07:05 Add a harbour boundary to map
09:15 Set up layer toggle
10:40 Additional - add second boundary area to map

Note: as this is a demonstration video, the harbour boundaries shown are not exact. The locations of the rectangles are merely there to indicate a potential use case for adding a layer to a map.

🔔 Like and subscribe to the channel for more R Programming tutorials!

💥 For more R programming tutorials check out the playlist:

🎬SUGGESTED VIDEOS TO LEARN R:
Don't forget to watch 📽 My other videos. Please check them out:

#rprogramming #rshiny #datavisualization #rshinymap #data #datavisualisation #leaflet #maps #shiny #shinyrstudio #rprogrammingforbeginners #geospatialanalysis #codingtutorial #dataanalysis #rlanguage
Рекомендации по теме
Комментарии
Автор

Hi, this was a great easy to follow tutorial on using leaflet with Shiny. I am particularly interested in placing shapes on maps.

Could you please give me a recommendation on this scenario:
1. I have a set of points (latitudes, longitudes) that cover a large area.
2. In this area I will place a small circle with a specified radius.
3. I want to ONLY plot those points that are within that area surrounded by the circle.

How would recommend that I determine which points are only within that circle?

Any recommendations, hints, comments, suggestions, etc., would be appreciated?

Thanks in advance.

gecarter