Spatial distribution of population
Download population data
# download aop data
df <- read_population(city='Fortaleza',
year=2010,
geometry = TRUE,
showProgress = FALSE)
Map Population Spatial distribution of the population
ggplot() +
geom_sf(data=subset(df, P001>0), aes(fill=P001), color=NA, alpha=.8) +
scale_fill_distiller(palette = "YlOrRd", direction = 1)+
labs(title='Population distribution', fill="Total population") +
theme_void()
Map income levels Spatial distribution population by income decile
ggplot() +
geom_sf(data=subset(df, !is.na(R002)), aes(fill=factor(R003)), color=NA, alpha=.8) +
scale_fill_brewer(palette = "RdBu") +
labs(title='Average household income per capita', fill="Income decile") +
theme_void()
Map racial groups Spatial distribution population black population