33  Interactive Map Layers

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 Shiny Server for Interactive Files
  2. Leaflet Basic.Rmd
  3. Leaflet Layers.Rmd
  4. (optional) Answer Key to Above Guided Instructions

You can recreate a previous map task, or find your own spatial data to display using leaflet. You must use layers to allow the user to control what is shown on the map.

  1. Choose an option:
    • Recreate a previous task visualization using layers on a leaflet plot using R OR
    • Find your own spatial data that interests you and build an interactive map using leaflet layers and control boxes (i.e. checking which boxes to use).
      • Layers is a great way to show progression of time. You could experiment with using the two different kinds of layers.
  2. Publish your visualization to Posit Connect at shiny.byui.edu
  3. (optional) Paste the link to your Posit Connect file in a readme.md file on GitHub

Submit

In I-learn submit the link to your Posit Connect file