This is a week 2 project for the coursera class of developing data products. In this project we will create a map with leaflet that will show the size of population of few of Polands larger cities: Warsaw, Cracow, Gdańsk and Wrocław.
library(leaflet)
## Warning: package 'leaflet' was built under R version 4.3.2
Cities_info<- data.frame(
name = c("Warsaw", "Cracow", "Wrocław", "Gdańsk"),
pop = c(1800000, 770000, 640000, 470000),
lat = c(52.2297, 50.0647, 51.1079, 54.3520),
lng = c(21.0122, 19.9450, 17.0385, 18.6466)
)
Cities_info %>%
leaflet() %>%
addTiles() %>%
addCircles(weight = 2, radius = sqrt(Cities_info$pop)*30)
## Assuming "lng" and "lat" are longitude and latitude, respectively