Meeting 13 - Interactive Maps in R
Meeting Goals
This course meeting has an emphasis on the following goals:
- Review processes for creating interactive maps using
leaflet. - Create more complex interactive maps that include palettes, customized pop-ups, legends, and overlaid features.
- Identify options for sharing
htmldocuments with embedded maps.
Meeting Resources
- An overview of the meeting can be on the syllabus, but please keep in mind that we are switching up the content and ordering of these final two course meetings.
- The entry ticket is available on Blackboard
During Class
Agenda
- Exercise 1 - Adding Complexity to
leaflet - Exercise 2 - Sharing
leaftletMaps - Short Break
- Lab-13 and one-on-one meetings
Exercise 1 - Adding Complexity to leaflet
For our work in R today, we’ll dig into some additional options for leaflet maps after we review the processes for creating a basic map. The data and example notebook are available in this course meeting’s repository, named module-5-leaflet. You can find them in examples/meeting-examples.Rmd. You can also follow along with the completed code here.
Exercise 2 - Sharing leaflet Maps
It is easy to share leaflet maps. Once we have a completed .Rmd notebook, we’ll change the output type to html_document and also add two output options to the final chunk. The echo = FALSE option removes the code block, and the out.width = '100%' option makes the map take up the full-width of the document. When we knit it again, we get an html file that can be emailed or turned into a simple website.
Meeting Reminders
Please don’t forget about what due in May, which is listed on the syllabus. In addition to Lab-13, there is one final upcoming deadline in May I want to remind you of:
- May 17th - all final project materials must be submitted via GitHub. Link to your final StoryMap in your final project’s
README.mdfile.
Course Trajectory
This week’s content is strictly “bonus” material that is not a part of the final project.