31  Interactive Maps

Readings

In Leaflet for R read the following articles:

  • Using Basemaps
  • Choropleths
  • Add color to a leaflet
  • Markers
  • Popups and Labels
  • Lines and Shapes
  • Show/Hide Layers

A gallery of tiles to consider is the Leaflet Providers Preview

Guided Instruction

  1. Publishing to a Posit Server for Interactive Files
  2. Leaflet Basic.Rmd
  3. Leaflet Layers.Rmd
  4. (optional) Answer Key to Above Guided Instructions

You can recreate the previous map task, or find your own spatial data to display using leaflet. Consider using layers and control boxes to show time or other aspects of the data.

  1. Choose an option:
    • Recreate a previous task visualization using a simple leaflet plot using R OR
    • Find your own spatial data that interests you and build a simple interactive map using leaflet You could experiment with using one (or both) of the two different kinds of layers.
  2. Publish your visualization to Posit Connect at posit.byui.edu
  3. (optional) It’s a good idea to paste the link to your Posit Connect file in a readme.md file on GitHub so you have all your stuff in one place.

Submit

In I-learn submit the link to your Posit Connect file. Make sure the viewing permissions for the file are set such that the teacher and TA can have viewing access.