Map created in R Studio using leaflet
1. Points of Interest in SFO: Golden Gate Bridge, UC Berkeley, Stanford University, and UC Davis
2. Three major Northern California Cities: Sacramento, San Francisco and San Jose. Circles are added using the addCircles() function in leaflet. Click circles to show city name and population.
cities <- read.csv(textConnection("
City,Lat,Long,Pop
Sacramento, 38.5816, -121.4944, 495234
San Francisco,37.78, -122.41,864816
San Jose,37.35,-121.85,1026938"))
leaflet(cities) %>%
addTiles() %>%
addCircles(lng = ~Long, lat = ~Lat, weight = 2, radius = ~sqrt(Pop)*10, popup=~paste(City, ", population=", Pop)
)