This is the interactive webmap for my maps and spatial reasoning course at UCSB. It displays a few memorable locations.
#declare variables
my.path = '../data/geog-w12-lab-7 - Sheet1.csv'
df = read.csv(my.path)
popup <- paste("<div class='leaflet-popup-scrolled' style='max-width:600px;max-height:300px'><b>",
'<a href=', df$info_url, ' target="_blank"> <h2 align="center"><strong>', df$name, "</strong></h2></a><br>",
"</b>", df$description, '<br><br><center><img src="', df$image_url, '" height="150px" width="200px" border="8"></center><br> </div>')
icons = awesomeIcons(icon = 'globe', markerColor = "#55fff2", library = 'fa', spin = TRUE)
map = leaflet() %>%
addTiles( ) %>%
addAwesomeMarkers(data = df, lat = df$latitude, lng = df$longitude, popup = popup , icon = icons, clusterOptions = markerClusterOptions()) %>%
# addAwesomeMarkers(icon = icons) %>%
addProviderTiles(providers$CartoDB.DarkMatter)
map
#htmlwidgets::saveWidget(map, file = paste0(dirname(my.path), "/map.html"))