This repository provides a reproducible pipeline for processing DATASUS annual population estimates by municipality, age, and sex in Brazil.
The report is available here.
If you find this project useful, please consider giving it a star! Â
The processed data are available in csv, rds, and parquet formats via a dedicated repository on the Open Science Framework (OSF), accessible here. Each dataset is accompanied by a metadata file describing its structure and contents.
You can also retrieve these files directly from R using the osfr package.
The pipeline was developed using the Quarto publishing system, along with the R programming language. To ensure consistent results, the renv package is used to manage and restore the R environment.
After installing the three dependencies mentioned above, follow these steps to reproduce the analyses:
- Clone this repository to your local machine.
- Open the project in your preferred IDE.
- Restore the R environment by running
renv::restore()in the R console. This will install all required software dependencies. - Open
index.qmdand run the code as described in the report.
After installing all the dependencies listed in the Usage, run the following command in your terminal from the root directory of the project to render the report:
quarto renderThese will activate the rendering process, which may take some time depending on your machine and internet connection speed. Once completed, the HTML report will be available in the docs folder.
Important
When using this data, you must also cite the original data sources.
To cite this work, please use the following format:
Vartanian, D., & Carvalho, A. M. (2025). A reproducible pipeline for processing DATASUS annual population estimates by municipality, age, and sex in Brazil [Computer software]. Sustentarea Research and Extension Group, University of São Paulo. https://sustentarea.github.io/population-estimates
A BibLaTeX entry for LaTeX users is:
@software{vartanian2025,
title = {A reproducible pipeline for processing DATASUS annual population estimates by municipality, age, and sex in Brazil},
author = {{Daniel Vartanian} and {Aline Martins de Carvalho}},
year = {2025},
address = {São Paulo},
institution = {Sustentarea Research and Extension Group, the University of São Paulo},
langid = {en},
url = {https://sustentarea.github.io/population-estimates}
}
Important
The original data sources may be subject to their own licensing terms and conditions.
The code in this repository is licensed under the GNU General Public License Version 3, while the report is available under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International.
Copyright (C) 2025 Sustentarea Research and Extension Group
The code in this report is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your option)
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <https://www.gnu.org/licenses/>.
|
|
This work is part of a research project by the Sustentarea Research and Extension Group of the University of São Paulo (USP) titled: Global syndemic: The impact of anthropogenic climate change on the health and nutrition of children under five years old attended by Brazil\'s public health system. |
|
|
This work was supported by the Department of Science and Technology of the Secretariat of Science, Technology, and Innovation and of the Health Economic-Industrial Complex (SECTICS) of the Ministry of Health of Brazil, and the National Council for Scientific and Technological Development (CNPq) (grant no. 444588/2023-0). |