7 janvier 2017
Proportion of cross-border workers compared to the population
library(leaflet)
md_pop <- data.frame(name = c("Luxembourg population : 543 202", "French frontier workers : 88 779", "Belge frontier workers : 43088",
"Deutch frontier workers : 42 817"),
pop = c(543202, 88779, 43088, 42817),
latitude = c(49.59825029259904, 49.34302002016623, 49.67829252062253, 49.744006497666426),
longitude = c(6.123229879885912, 6.169921774417162, 5.799133200198412, 6.650573629885912),
col = c("red", "blue", "green","black"))
md_pop %>%
leaflet() %>%
addTiles() %>%
addCircles(weight = 1, radius = sqrt(md_pop$pop) * 10,color = md_pop$col,popup = md_pop$pop) %>%
addLegend(labels = md_pop$name,colors = c("red", "blue", "green","black"),position = "bottomright")
## Assuming 'longitude' and 'latitude' are longitude and latitude, respectively