library(tidyverse)
library(tmap)
library(tmaptools)
Overview
A 5-minute map made with {tmap} package to visualize the Estimate Population change 1950-2030.
data("World")
data("metro")
<- metro%>%
dat mutate(pop_change=(pop2030-pop1950)/pop1950)%>%
select(pop_change)
<- tm_shape(World, projection = 8857) +
maptm_polygons()+
tm_shape(dat) +
tm_bubbles(size = "pop_change") +
tm_style("col_blind") +
tm_format("World")+
tm_layout(title= '1950-2030')+
tm_credits("{tmap} | @fgazzelloni",position = c(0.8,0.05))
# save map
tmap_mode("plot")
tmap_save(map, "day19_5-minute-map.png",
scale = 0.7,
width = 5.125,
outer.margins = 0)