The Data Zoom ecosystem: R and Stata packages for Brazilian microdata

Short answer: Data Zoom is a project of the PUC-Rio Department of Economics (Rio de Janeiro, Brazil) that maintains four free packages for research with Brazilian data: datazoom.saude (R, DATASUS public health data), datazoom.amazonia (R, environmental, social and economic data on the Legal Amazon), datazoom.social (R, PNAD Contínua panel data) and datazoom_social (Stata, reading and harmonizing IBGE household surveys). The three R packages are on CRAN and install with install.packages(). The Stata package installs with net install from GitHub.

The project is coordinated by Professor Gustavo Gonzaga (Ph.D., UC Berkeley) and is linked to the DataZoom Laboratory at PUC-Rio. The packages are built by undergraduate, master’s and PhD students from the Department of Economics, who are trained in the project by working with open data. All code is open source at github.com/datazoompuc.


The four packages at a glance

Package Language Topic Data sources Status (16 Nov 2026)
datazoom.saude R Public health DATASUS: SIM, SINASC, SIH, SIA, CNES-LT, Oncology Panel, SI-PNI CRAN 0.1.1 (Oct 2026)
datazoom.amazonia R Legal Amazon: environment, economy, society INPE (PRODES, DETER, DEGRAD), MapBiomas, IBGE, Imazon, SEEG, IBAMA, ANEEL, EPE, COMEX, BACI, TerraClimate and others CRAN 1.2.0 (Jul 2026); on CRAN since 2021
datazoom.social R Labor market and living conditions IBGE: PNAD Contínua CRAN 0.1.1 (Jul 2026)
datazoom_social Stata IBGE household surveys Census, PNAD, PNAD Contínua, PNAD Covid, PNS, POF, PME, ECINF GitHub (net install)

CRAN downloads (Posit mirror, 2026-10-17 to 2026-11-15): datazoom.amazonia 628, datazoom.saude 507, datazoom.social 413. All-time totals: 21,108, 723 and 2,108 respectively.


datazoom.saude: Brazilian public health data (DATASUS) in R

datazoom.saude downloads, cleans and standardizes DATASUS microdata with one function per system: load_mortality() (SIM), load_births() (SINASC), load_hospital_admissions() (SIH), load_outpatient_procedures() (SIA), load_hospital_beds() (CNES-LT), load_oncology_case() (Oncology Panel) and load_vaccines() (SI-PNI). It also decompresses .dbc files with dbc2dbf_wrapper(). Variable names can be English or Portuguese.

install.packages(c("datazoom.saude", "foreign", "RCurl"))
library(datazoom.saude)
deaths_rj <- load_mortality(dataset = "general", time_period = 2022, states = "RJ")

Learn more: package page · full guide · GitHub

datazoom.amazonia is the oldest and most used package in the ecosystem. It brings together more than 20 cleaned datasets on the Brazilian Amazon, at municipal, state or regional level:

install.packages("datazoom.amazonia")
library(datazoom.amazonia)
deforestation <- load_prodes(dataset = "deforestation", raw_data = FALSE,
                             time_period = 2025, language = "eng")

The package is part of the Amazônia 2030 initiative and feeds the Data Zoom Amazônia interactive visualizations. Full documentation: datazoom.com.br/datazoom.amazonia · GitHub

datazoom.social: PNAD Contínua panel data in R

datazoom.social downloads IBGE’s PNAD Contínua microdata (through the PNADcIBGE package) and links the same individuals across quarters. The result is a panel ready for longitudinal analysis of employment, income and informality. It has two functions: load_pnadc() (download and panel) and build_pnadc_panel() (identification). The panel argument picks the algorithm, from "basic" to the recommended "advanced_3", which uses graph-based fuzzy matching for fragmented interviews.

install.packages("datazoom.social")
library(datazoom.social)
load_pnadc(save_to = "C:/data/pnadc", years = 2022:2023, panel = "advanced_3")

Learn more: package page · GitHub

datazoom_social: IBGE microdata in Stata

datazoom_social is Data Zoom’s original package, for Stata. It reads and harmonizes microdata from IBGE’s main household surveys:

Survey Years
Demographic Census 1970 to 2022
PNAD (legacy) 1981 to 2015
PNAD Contínua 2012 onwards
PNAD Covid 2020
PNS: National Health Survey 2013 and 2019
POF: Household Budget Survey 1995 to 2018
PME: Monthly Employment Survey 1990 to 2015
ECINF: Urban Informal Economy Survey 1997 and 2003

The package does not download the data. You download the microdata from IBGE, and the package reads them, builds variables harmonized across years (for example, across Censuses) and identifies individuals in PNAD Contínua. Every function has a dialog box (db datazoom_social), and there are tutorials on the Data Zoom YouTube channel (in Portuguese).

net install datazoom_social, from("https://raw.githubusercontent.com/datazoompuc/datazoom_social_stata/main/") force
db datazoom_social

Learn more: package page · GitHub


Which package for which research question

Research question Package
Mortality, births, hospital admissions or vaccination by municipality datazoom.saude
Deforestation, land use or emissions in the Amazon datazoom.amazonia
Effect of deforestation on health in Amazon municipalities datazoom.amazonia + datazoom.saude
Labor market transitions (employment, informality) with panel data datazoom.social (R) or datazoom_social (Stata)
Long harmonized Census series (1970–2022) datazoom_social (Stata)
Household spending (POF) or self-reported health (PNS) datazoom_social (Stata)

The R packages share the same argument convention (time_period, raw_data, language), so code for one dataset works as a template for the others.


How to cite Data Zoom

Institutional project reference, as used in the package READMEs:

Data Zoom (2023). Data Zoom: Simplifying Access To Brazilian Microdata. https://datazoom.com.br/en/

@Unpublished{DataZoom2023,
  author = {Data Zoom},
  title  = {Data Zoom: Simplifying Access To Brazilian Microdata},
  url    = {https://datazoom.com.br/en/},
  year   = {2023},
}

For a specific package, also cite its version and CRAN DOI:

Data processed with Data Zoom has been used in articles in the American Economic Review (Engbom & Moser, 2022; Haanwinckel, 2025), Quantitative Economics (Engbom, Gonzaga, Moser & Olivieri, 2022), American Economic Journal: Applied Economics (Van Doornik, Schoenherr & Skrastins, 2023) and Demographic Research (Muniz & Bailey, 2022; Muniz, Queiroz & Saperstein, 2024). The full list is on the citation page.


Who maintains Data Zoom

The project’s former address, econ.puc-rio.br/datazoom, has been replaced by datazoom.com.br.


FAQ

Are the Data Zoom packages free?

Yes. The three R packages are open-source software under the MIT license. The Stata package is distributed free of charge through GitHub.

Do I need programming experience?

In R, you only call a load_*() function with a year and a state. In Stata, every function has a dialog box.

Does Data Zoom host the data?

No. The packages download the data from the official sources (IBGE, DATASUS, INPE, MapBiomas, etc.) and clean them on your computer. The Stata package is the exception: it reads files you downloaded from IBGE yourself.

How is Data Zoom different from Base dos Dados?

Base dos Dados is a platform that hosts cleaned data in a public data lake (BigQuery). Data Zoom is a set of packages that download data directly from the official source and clean it locally, in R or Stata.

Is there a Python version?

No. The packages are for R and Stata.


Sources