In February 2024, IBGE released CNEFE data from the 2022 Census showing that Brazil has more religious temples (579,800) than educational establishments (264,400) and health facilities (247,500) combined. This finding sparked widespread media coverage and public debate (see Agência Brasil).
However, these figures represent national or state-level aggregates.
What about the intra-urban distribution? Are there
neighborhoods with a particularly high concentration of religious
establishments relative to educational establishments?
cnefe_counts() allows us to answer these questions by
aggregating CNEFE address counts to H3 hexagonal cells or user-provided
polygons such as neighborhoods.
In this article, we compute an Index of Concentration at the Extremes (ICE) comparing educational and religious establishments for the municipality of Porto Alegre, using both H3 resolution 8 hexagons and official neighborhood boundaries.
Before computing ICE, let’s read the CNEFE data for Porto Alegre as point geometries and visualize the spatial distribution of educational and religious establishments:
Reading CNEFE data to visualize educational and religious establishments:
poa_cnefe <- read_cnefe(
code_muni = 4314902, # IBGE code for Porto Alegre)
cache = T,
output = 'sf',
verbose = F
)
poa_cnefe_edurel <- poa_cnefe |>
filter(COD_ESPECIE %in% c(4,8)) |> # Select only educational (4) and religious (8) facilities
mutate(
est_type = factor(ifelse(COD_ESPECIE == 4,'Educational','Religious'))
)
mapview(
poa_cnefe_edurel,
zcol = 'est_type',
layer.name = 'Establishment type',
col.regions = c("blue","red"), # Blue (educational) and Red (religious)
cex = 2,
burst = T
)