Directions: Follow along with the slides and answer the questions in red font in your journal.
Rto create an interactive map of the
mtnsdata we scraped in Lab 3E.
load_lab(23)command, as an
leaflet()function and the
mtnsdata to create the
leafthat we can use for mapping.
mtns_leaf <- leaflet(____)
addTiles()function and assign the output the name
mtns_mapin the console to look at your basic map with no data displayed.
addMarkers(map = ____, lng = ~____, lat = ~____)
peakvariable, in a similar way as we supplied the
longvariables, to the
popupargument and include it in the code above.
mtns <- mutate(____, state_colors = colorize(____))
mtns_mapto use it.
mtns_mapas you did before.
addCircleMarkersand keep all of the arguments the same.
addCircleMarkerslike before but this time include
color = ~state_colorsas an argument.
addLegend(____, colors = ~unique(____), labels = ~unique(____))