library(leaflet)
## Warning: package 'leaflet' was built under R version 4.3.3
library(dplyr)
## Warning: package 'dplyr' was built under R version 4.3.2
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
##Get latitude, longtude and population of these cities
centralgeorgia_cities <- data.frame(name = c("Warner Robins", "Fort Valley", "Macon" ),
pop = c(80000,8000, 156554),
latitude = c(32.615692, 32.559334,32.838131),
longitude = c(-83.633667, -83.904587, -83.634705)
)
## Create the map using leaflet, an R Package
centralgeorgia_cities %>%
leaflet() %>%
addTiles() %>%
addCircles(weight = 5, radius = sqrt(centralgeorgia_cities$pop) * 10) %>%
addPopups(-83.904587, 32.559334, 'Here is where I work: <b>Fort Valley</b>') %>%
addPopups(-83.633667, 32.615692, 'Here is where I live: <b>Warner Robins</b>') %>%
addPopups(-83.634705, 32.838131, 'Here is where I shop: <b>Macon</b>')
## Assuming "longitude" and "latitude" are longitude and latitude, respectively
Thank you for coming this far and knocking!