Getting Started

Sarah Cassie Burnett

August 26, 2025

Example: Make a map!

Leaflet guide: R Charts

Official documentation

Example: Make a map!


library(leaflet)
leaflet() %>% 
  addTiles() %>%   # Add default OpenStreetMap map tiles
  addMarkers(lat = 38.89983070991697, lng = -77.04626947544378, 
             label = "School of Media & Public Affairs")

Make groups of 2-3 people. Introduce yourselves and then create your own map around a different location. Share with the group your map. Then open the google sheet and add your group member’s name and the location from the map.

05:00

Example: Make a map!


library(leaflet)
addMarkers(
  addTiles(
    leaflet()
  ),
  lat = 38.89983070991697, 
  lng = -77.04626947544378, 
  label = "School of Media & Public Affairs"
)

Example: Make a map!


library(leaflet)
leaflet::addMarkers(
  leaflet::addTiles(
    leaflet::leaflet()
  ),
  lat = 38.89983070991697, 
  lng = -77.04626947544378, 
  label = "School of Media & Public Affairs"
)