This map shows the 20 most populated cities in the world.
# Open and unzip the dataset
temp <- tempfile()
url <- "https://simplemaps.com/static/data/world-cities/basic/simplemaps_worldcities_basicv1.73.zip"
download.file(url, temp)
file <- unz(temp, "worldcities.csv")
# Selecting the 20 most populated cities in the wolrd
df <- read.csv(file)
df <- df[1:20, ]
library(leaflet)
## Warning: package 'leaflet' was built under R version 4.0.4
df %>% leaflet() %>% addTiles() %>%
addCircles(weight = 1, radius = sqrt(df$population)*50)
## Assuming "lng" and "lat" are longitude and latitude, respectively