Amit Bhatt (WRI) has written a very eloquent piece on why cities should focus on promoting accessibility, not mobility. Good read.
Using R
and the geobr package to plot Brazilian metropolitan areas in different years.
library(geobr)
library(dplyr)
library(ggplot2)
library(sf)
library(ggthemes)
# download sf of Brazilian states
states <- read_state(code_state = 'all')
# download metro areas sf and pille them up
download_metro <- function(y){
tmp <- read_metro_area(year = y) %>% select(name_metro, abbrev_state)
tmp$year <- y
return(tmp)
}
metros_sf <- lapply(X= c(1970, 2001, 2018), FUN=download_metro) %>% do.call('rbind', .)
# plot
temp_lot <- ggplot() +
geom_sf(data=states, color="gray90", fill="gray80", size=.4) +
geom_sf(data=metros_sf, aes(color=as.factor(name_metro), fill=as.factor(name_metro)), show.legend = FALSE) +
facet_wrap(~year, nrow = 1) +
theme_map() +
theme( strip.background = element_rect(colour = "white", fill = "white"),
strip.text.x = element_text(size = 8, face ="bold"))
# save plot
ggsave(temp_lot, file= "geobr_metros_1970-2001-2018.png", dpi = 300, width = 15, height = 6, units = "cm")