Package {brpop}


Title: Brazilian Population Estimates
Version: 0.7.0
Description: Provides Brazilian municipality population estimates from official and research sources, with functions to aggregate the data by state, health region, sex, and age group.
License: MIT + file LICENSE
Encoding: UTF-8
Depends: R (≥ 3.5)
LazyData: true
LazyDataCompression: xz
Suggests: testthat (≥ 3.0.0), ggplot2, scales
Config/testthat/edition: 3
Imports: checkmate, data.table, dplyr, dtplyr, magrittr, rlang, tibble, zendown
URL: https://rfsaldanha.github.io/brpop/, https://github.com/rfsaldanha/brpop
BugReports: https://github.com/rfsaldanha/brpop/issues
Config/Needs/website: rmarkdown
Config/roxygen2/version: 8.0.0
NeedsCompilation: no
Packaged: 2026-07-29 15:18:10 UTC; raphaelsaldanha
Author: Raphael Saldanha ORCID iD [aut, cre]
Maintainer: Raphael Saldanha <raphael.saldanha@fiocruz.br>
Repository: CRAN
Date/Publication: 2026-07-29 21:50:15 UTC

brpop: Brazilian Population Estimates

Description

Provides Brazilian municipality population estimates from official and research sources, with functions to aggregate the data by state, health region, sex, and age group.

Author(s)

Maintainer: Raphael Saldanha raphael.saldanha@fiocruz.br (ORCID)

Authors:

See Also

Useful links:


Municipality yearly female population estimates per age group from 2000 to 2024

Description

A dataset containing female population estimates for Brazilian municipalities by age group from 2000 to 2024.

Usage

datasus2024_mun_female_pop()

Details

The estimates were computed by DataSUS (Brazilian Ministry of Health), manually downloaded from DataSUS website, and organized as a tibble.

code_muni

municipality 7 digits code

year

year of the estimate

age_group

age group

pop

population estimate


Municipality yearly male population estimates per age group from 2000 to 2024

Description

A dataset containing male population estimates for Brazilian municipalities by age group from 2000 to 2024.

Usage

datasus2024_mun_male_pop()

Details

The estimates were computed by DataSUS (Brazilian Ministry of Health), manually downloaded from DataSUS website, and organized as a tibble.

code_muni

municipality 7 digits code

year

year of the estimate

age_group

age group

pop

population estimate


Municipality yearly female population estimates per age group from 2000 to 2021

Description

A dataset containing female population estimates for Brazilian municipalities by age group from 2000 to 2021.

Usage

datasus_mun_female_pop()

Details

The estimates were computed by DataSUS (Brazilian Ministry of Health), manually downloaded from DataSUS website, and organized as a tibble.

code_muni

municipality 6 digits code

year

year of the estimate

age_group

age group

pop

population estimate


Municipality yearly male population estimates per age group from 2000 to 2021

Description

A dataset containing male population estimates for Brazilian municipalities by age group from 2000 to 2021.

Usage

datasus_mun_male_pop()

Details

The estimates were computed by DataSUS (Brazilian Ministry of Health), manually downloaded from DataSUS website, and organized as a tibble.

code_muni

municipality 6 digits code

year

year of the estimate

age_group

age group

pop

population estimate


Municipality population from IBGE, 2000 to 2025

Description

Municipal total population from the Brazilian Institute of Geography and Statistics (IBGE), combining censuses, the 2007 population count, and annual population estimates. The data do not contain age or sex breakdowns.

Usage

ibge_pop()

Details

Census values for 2000 and 2010 come from SIDRA table 202, and 2022 values come from SIDRA table 9514. The 2007 population count comes from SIDRA table 793.

Annual estimates for 2001–2006, 2008–2009, and 2011–2021 come from SIDRA table 6579, as updated on 2024-06-24. Values for 2023 are the population figures sent to the TCU using the 2022 Census and 2023 territorial grid, available from the IBGE 2023 download directory. Values for 2024 come from the estimates published in the DOU. Values for 2025 use the revised estimates sent to the TCU on 2026-01-13. The source workbooks are available from the IBGE download directories for 2024 and 2025.

ibge_pop() is bundled with the package and does not require Internet access. Its return structure remains compatible with previous releases.

Value

A tibble with one row per municipality and year.

code_muni

numeric municipality code with seven digits

year

numeric reference year

pop

numeric population; NA when the source reports no value


Municipality yearly female population estimate totals

Description

This function provides a tibble containing female population estimates for Brazilian municipalities totals.

Usage

mun_female_pop_totals(source = "datasus")

Arguments

source

character. datasus for Brazilian Health Ministry old estimates (2000 to 2021), datasus2024 for Brazilian Health Ministry new estimates (2000 to 2024), or ufrn for UFRN-DEM-LEPP estimates (2010 to 2030).

Value

A tibble.

See Also

datasus_mun_female_pop, ufrn_mun_female_pop.


Municipality yearly male population estimate totals

Description

This function provides a tibble containing male population estimates for Brazilian municipalities totals.

Usage

mun_male_pop_totals(source = "datasus")

Arguments

source

character. datasus for Brazilian Health Ministry old estimates (2000 to 2021), datasus2024 for Brazilian Health Ministry new estimates (2000 to 2024), or ufrn for UFRN-DEM-LEPP estimates (2010 to 2030).

Value

A tibble.

See Also

datasus_mun_male_pop, ufrn_mun_male_pop.


Municipality yearly population estimates per age group

Description

This function provides a tibble containing population estimates for Brazilian municipalities by age group.

Usage

mun_pop_age(source = "datasus", sex = "all")

Arguments

source

character. datasus for Brazilian Health Ministry old estimates (2000 to 2021), datasus2024 for Brazilian Health Ministry new estimates (2000 to 2024), or ufrn for UFRN-DEM-LEPP estimates (2010 to 2030).

sex

character. all for all population, male for male population, female for female population. Defaults to all.

Value

A tibble.

See Also

datasus_mun_male_pop, datasus_mun_female_pop, ufrn_mun_male_pop, ufrn_mun_female_pop.


Municipality yearly population totals

Description

This function provides a tibble containing total population estimates for Brazilian municipalities.

Usage

mun_pop_totals(source = "datasus")

Arguments

source

character. datasus for Brazilian Health Ministry old estimates (2000 to 2021), datasus2024 for Brazilian Health Ministry new estimates (2000 to 2024), ufrn for UFRN-DEM-LEPP estimates (2010 to 2030), or ibge for IBGE data (2000 to 2025).

Value

A tibble.

See Also

datasus_mun_male_pop, datasus_mun_female_pop, ufrn_mun_male_pop, ufrn_mun_female_pop, ibge_pop.


Municipality and health region code table

Description

A dataset containing municipality and health regions codes.

Usage

mun_reg_saude

Format

A tibble with 5,592 rows and 2 variables:

code_muni

municipality 6 digits code

codi_reg_saude

health region 4 digits code

Source

The 2025 assignment of Boa Esperança do Norte to the Teles Pires health region is documented by the Mato Grosso State Health Department, CIB/MT Resolution No. 143 of 22 May 2025.


Municipality and health region (449) code table

Description

A dataset containing municipality and health regions codes, following the 449 units specification.

Usage

mun_reg_saude_449

Format

A tibble with 5,571 rows and 2 variables:

code_muni

municipality 6 digits code

codi_reg_saude

health region 5 digits code

Source

The 2025 assignment of Boa Esperança do Norte to the Teles Pires health region is documented by the Mato Grosso State Health Department, CIB/MT Resolution No. 143 of 22 May 2025.


Municipality yearly population estimates per age group and sex

Description

This function binds municipality male and female estimates and includes a new variable called 'sex'.

Usage

mun_sex_pop(source = "datasus")

Arguments

source

character. datasus for Brazilian Health Ministry old estimates (2000 to 2021), datasus2024 for Brazilian Health Ministry new estimates (2000 to 2024), or ufrn for UFRN-DEM-LEPP estimates (2010 to 2030).

Value

A tibble.

See Also

datasus_mun_male_pop, datasus_mun_female_pop, ufrn_mun_male_pop, ufrn_mun_female_pop.


Pipe operator

Description

See magrittr::%>% for details.

Usage

lhs %>% rhs

Arguments

lhs

A value or the magrittr placeholder.

rhs

A function call using the magrittr semantics.

Value

The result of calling rhs(lhs).


Health region yearly female population estimates per age group

Description

This function provides a tibble containing female population estimates for Brazilian health regions by age group.

Usage

regsaude_female_pop(type = "standard", source = "datasus")

Arguments

type

character. 'standard' or 'reg_saude_449'

source

character. datasus for Brazilian Health Ministry old estimates (2000 to 2021), datasus2024 for Brazilian Health Ministry new estimates (2000 to 2024), or ufrn for UFRN-DEM-LEPP estimates (2010 to 2030).

Value

A tibble.

See Also

datasus_mun_female_pop, ufrn_mun_female_pop.


Health region yearly female population estimate totals

Description

This function provides a tibble containing female population estimates for Brazilian health regions totals.

Usage

regsaude_female_pop_totals(type = "standard", source = "datasus")

Arguments

type

character. 'standard' or 'reg_saude_449'

source

character. datasus for Brazilian Health Ministry old estimates (2000 to 2021), datasus2024 for Brazilian Health Ministry new estimates (2000 to 2024), or ufrn for UFRN-DEM-LEPP estimates (2010 to 2030).

Value

A tibble.

See Also

regsaude_female_pop.


Health region yearly male population estimates per age group

Description

This function provides a tibble containing male population estimates for Brazilian health regions by age group.

Usage

regsaude_male_pop(type = "standard", source = "datasus")

Arguments

type

character. 'standard' or 'reg_saude_449'

source

character. datasus for Brazilian Health Ministry old estimates (2000 to 2021), datasus2024 for Brazilian Health Ministry new estimates (2000 to 2024), or ufrn for UFRN-DEM-LEPP estimates (2010 to 2030).

Value

A tibble.

See Also

datasus_mun_male_pop, ufrn_mun_male_pop.


Health region yearly male population estimate totals

Description

This function provides a tibble containing male population estimates for Brazilian health regions totals.

Usage

regsaude_male_pop_totals(type = "standard", source = "datasus")

Arguments

type

character. 'standard' or 'reg_saude_449'

source

character. datasus for Brazilian Health Ministry old estimates (2000 to 2021), datasus2024 for Brazilian Health Ministry new estimates (2000 to 2024), or ufrn for UFRN-DEM-LEPP estimates (2010 to 2030).

Value

A tibble.

See Also

regsaude_male_pop.


Health region yearly population estimates per age group

Description

This function provides a tibble containing population estimates for Brazilian health regions by age group.

Usage

regsaude_pop_age(type = "standard", source = "datasus", sex = "all")

Arguments

type

character. 'standard' or 'reg_saude_449'

source

character. datasus for Brazilian Health Ministry old estimates (2000 to 2021), datasus2024 for Brazilian Health Ministry new estimates (2000 to 2024), or ufrn for UFRN-DEM-LEPP estimates (2010 to 2030).

sex

character. all for all population, male for male population, female for female population. Defaults to all.

Value

A tibble.

See Also

regsaude_male_pop, regsaude_female_pop.


Health region yearly total population estimates

Description

This function provides a tibble containing total population estimates for Brazilian health regions.

Usage

regsaude_pop_totals(type = "standard", source = "datasus")

Arguments

type

character. 'standard' or 'reg_saude_449'

source

character. datasus for Brazilian Health Ministry old estimates (2000 to 2021), datasus2024 for Brazilian Health Ministry new estimates (2000 to 2024), ufrn for UFRN-DEM-LEPP estimates (2010 to 2030), or ibge for IBGE data (2000 to 2025).

Value

A tibble.

See Also

regsaude_male_pop, regsaude_female_pop, ibge_pop.


Health regions yearly population estimates per age group and sex

Description

This function combines male and female health-region estimates and includes a variable named sex.

Usage

regsaude_sex_pop(type = "standard", source = "datasus")

Arguments

type

character. 'standard' or 'reg_saude_449'

source

character. datasus for Brazilian Health Ministry old estimates (2000 to 2021), datasus2024 for Brazilian Health Ministry new estimates (2000 to 2024), or ufrn for UFRN-DEM-LEPP estimates (2010 to 2030).

Value

A tibble.

See Also

regsaude_male_pop, regsaude_female_pop.


UF yearly female population estimate totals

Description

This function provides a tibble containing female population estimates for Brazilian UFs ("Unidades Federativas") totals.

Usage

uf_female_pop_totals(source = "datasus")

Arguments

source

character. datasus for Brazilian Health Ministry old estimates (2000 to 2021), datasus2024 for Brazilian Health Ministry new estimates (2000 to 2024), or ufrn for UFRN-DEM-LEPP estimates (2010 to 2030).

Value

A tibble.

See Also

datasus_mun_female_pop, ufrn_mun_female_pop.


UF yearly male population estimate totals

Description

This function provides a tibble containing male population estimates for Brazilian UFs ("Unidades Federativas") totals.

Usage

uf_male_pop_totals(source = "datasus")

Arguments

source

character. datasus for Brazilian Health Ministry old estimates (2000 to 2021), datasus2024 for Brazilian Health Ministry new estimates (2000 to 2024), or ufrn for UFRN-DEM-LEPP estimates (2010 to 2030).

Value

A tibble.

See Also

datasus_mun_male_pop, ufrn_mun_male_pop.


UF yearly population estimates per age group

Description

This function provides a tibble containing population estimates for Brazilian UFs ("Unidades Federativas") by age group.

Usage

uf_pop_age(source = "datasus", sex = "all")

Arguments

source

character. datasus for Brazilian Health Ministry old estimates (2000 to 2021), datasus2024 for Brazilian Health Ministry new estimates (2000 to 2024), or ufrn for UFRN-DEM-LEPP estimates (2010 to 2030).

sex

character. all for all population, male for male population, female for female population. Defaults to all.

Value

A tibble.

See Also

datasus_mun_male_pop, datasus_mun_female_pop, ufrn_mun_male_pop, ufrn_mun_female_pop.


UF yearly population totals

Description

This function provides a tibble containing total population estimates for Brazilian UFs ("Unidades Federativas") totals.

Usage

uf_pop_totals(source = "datasus")

Arguments

source

character. datasus for Brazilian Health Ministry old estimates (2000 to 2021), datasus2024 for Brazilian Health Ministry new estimates (2000 to 2024), ufrn for UFRN-DEM-LEPP estimates (2010 to 2030), or ibge for IBGE data (2000 to 2025).

Value

A tibble.

See Also

datasus_mun_male_pop, datasus_mun_female_pop, ufrn_mun_male_pop, ufrn_mun_female_pop, ibge_pop.


UF yearly population estimates per age group and sex

Description

This function binds municipality male and female estimates and includes a new variable called 'sex'.

Usage

uf_sex_pop(source = "datasus")

Arguments

source

character. datasus for Brazilian Health Ministry old estimates (2000 to 2021), datasus2024 for Brazilian Health Ministry new estimates (2000 to 2024), or ufrn for UFRN-DEM-LEPP estimates (2010 to 2030).

Value

A tibble.

See Also

datasus_mun_male_pop, datasus_mun_female_pop, ufrn_mun_male_pop, ufrn_mun_female_pop.


Municipality yearly female population estimates per age group, from 2010 to 2030

Description

A dataset containing female population estimates for Brazilian municipalities by age group from 2010 to 2030.

Usage

ufrn_mun_female_pop()

Details

The estimates were computed by the LEPP laboratory from the Demography Department/UFRN.

code_muni

municipality 7 digits code

year

year of the estimate

age_group

age group

pop

population estimate

References

FREIRE, F.H.M.A; GONZAGA, M.R; QUEIROZ, B.L. Projeção populacional municipal com estimadores bayesianos, Brasil 2010 - 2030. In: Sawyer, D.O (coord.). Seguridade Social Municipais. Projeto Brasil 3 Tempos. Secretaria Especial de Assuntos Estratégicos da Presidência da República (SAE/SG/PR) , United Nations Development Programme, Brazil (UNDP) and International Policy Centre for Inclusive Growth. Brasília (IPC-IG), 2019.


Municipality yearly male population estimates per age group, from 2010 to 2030

Description

A dataset containing male population estimates for Brazilian municipalities by age group from 2010 to 2030.

Usage

ufrn_mun_male_pop()

Details

The estimates were computed by the LEPP laboratory from the Demography Department/UFRN.

code_muni

municipality 7 digits code

year

year of the estimate

age_group

age group

pop

population estimate

References

FREIRE, F.H.M.A; GONZAGA, M.R; QUEIROZ, B.L. Projeção populacional municipal com estimadores bayesianos, Brasil 2010 - 2030. In: Sawyer, D.O (coord.). Seguridade Social Municipais. Projeto Brasil 3 Tempos. Secretaria Especial de Assuntos Estratégicos da Presidência da República (SAE/SG/PR) , United Nations Development Programme, Brazil (UNDP) and International Policy Centre for Inclusive Growth. Brasília (IPC-IG), 2019.