The data set, Countries of the World (COW) was downloaded from Americas Open Geocode (AOG) database on 07.12.2016. The data set consists of 71 variables for 249 countries.
Column BGN_capital
contains the capital city names and columns BGNc_latitude
and BGNc_longitude
contain the coordinates of capital cities.
capitals <- read.csv("cow.txt", skip = 28, header = TRUE, sep = ";")
dim(capitals)
## [1] 249 71
capitals %>%
leaflet() %>%
addTiles() %>%
addCircles(lat = capitals$BGNc_latitude, lng = capitals$BGNc_longitude, color = "red", opacity = 0.5, popup = capitals$BGN_capital)