Omnigraph
그래프 엔진으로 컨텍스트를 조립하고, 객체 저장소 기반에서 에이전트가 코드처럼 그래프 데이터를 분기·타입·검토·병합·감사·거버넌스합니다
브라질 공공보건 데이터를 VIGITEL, PNS, PNAD 등 여러 출처에서 손쉽게 이용할 수 있게 합니다
Provides easy access to Brazilian public health data from multiple sources including VIGITEL (Surveillance of Risk Factors for Chronic Diseases by Telephone Survey), PNS (National Health Survey), PNAD
데이터R · CGitHub @SidneyBissoli온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기Access Brazilian Public Health Data
저장소 README에서 가져옴
README 전체를 불러오는 중입니다.
README 전문 보기 ↗healthbR provides easy access to Brazilian public health data directly from R: the DATASUS microdata systems (SIM mortality, SINASC live births, SIH hospital admissions, SIA outpatient production, SINAN notifiable diseases, CNES facilities, SI-PNI vaccination), the IBGE and Ministry of Health surveys (VIGITEL, PNS, PNAD Continua, POF, Censo) and the regulatory agencies (ANS, ANVISA). The package downloads, caches, and processes data from official sources, returning clean, analysis-ready tibbles following tidyverse conventions.
If you already use microdatasus or read.dbc (or PySUS in Python) for DATASUS, see healthbR, microdatasus and read.dbc -- a measured comparison of the three on the same files: what each returns, how fast, the same tasks side by side, and the Parquet mirror read with no package at all.
| Module | Description | Years |
|---|---|---|
| VIGITEL | Surveillance of Risk Factors for Chronic Diseases by Telephone Survey | 2006--2024 |
| PNS | National Health Survey (microdata + SIDRA API) | 2013, 2019 |
| PNAD Continua | Continuous National Household Sample Survey | 2012--2024 |
| POF | Household Budget Survey (food security, consumption, anthropometry) | 2002--2018 |
| Censo | Population denominators via SIDRA API | 1970--2022 |
| Module | Description | Granularity | Years |
|---|---|---|---|
| SIM | Mortality Information System (deaths) | Annual/UF | 1996--2024 |
| SINASC | Live Birth Information System | Annual/UF | 1996--2024 |
| SIH | Hospital Information System (admissions) | Monthly/UF | 1992--2026 |
| SIA | Outpatient Information System (13 file types) | Monthly/UF | 2008--2026 |
| SINAN | Notifiable Diseases Surveillance (31 diseases) | Annual/UF | 2007--2026 |
| CNES | National Health Facility Registry (13 file types) | Monthly/UF | 2005--2026 |
| SI-PNI | National Immunization Program (aggregates 1994--2019, microdata 2020+; served from the healthbr-data R2 mirror with automatic DATASUS fallback) | Annual or Monthly/UF | 1994--2026 |
DATASUS modules download .dbc files (compressed DBF) and decompress them internally using vendored C code -- no external dependencies required. SIH and SI-PNI read by default from the healthbr-data Parquet mirror (byte-identical to the Ministry's files, with per-file provenance: source URL, MD5, timestamp) and fall back to the FTP.
| Module | Source | Description | Years |
|---|---|---|---|
| SISAB | Ministry of Health REST API | Primary Care coverage indicators (APS, oral health, community agents, PNS) | 2007--present |
| ANS | ANS Open Data Portal | Supplementary health beneficiaries, consumer complaints, financial statements | 2007--present |
| ANVISA | ANVISA Open Data Portal | Product registrations, pharmacovigilance, hemovigilance, technovigilance, SNGPC | snapshot + 2014--present |
Three R routes read DATASUS microdata, at different layers: read.dbc reads a .dbc file you downloaded, microdatasus downloads and labels, healthbR downloads, caches and types. Measured on 2026-10-14 (healthbR 0.4.0.9000, microdatasus 3.0.0, read.dbc 1.2.0) and detailed in the vignette healthbR, microdatasus and read.dbc:
| healthbR | microdatasus | read.dbc | |
|---|---|---|---|
| DATASUS systems | SIM, SINASC, SIH, SIA, SINAN (31 diseases), CNES, SI-PNI | SIM, SINASC, SIH, SIA, SINAN (8 diseases), CNES | any .dbc you download |
| Beyond DATASUS | VIGITEL, PNS, PNAD Continua, POF, Censo, SISAB, ANS, ANVISA | SIGTAP, CADGER and municipality tables | -- |
.dbc reader | vendored C (blast) | the same code, adapted from healthbR in 3.0.0 | its own C; also writes .dbc |
| Codes | kept as codes; typed (Date, integer, double); labels via *_dictionary() | replaced by labels by process_*(); all columns character | as the DBF declares them |
| Source | healthbr-data Parquet mirror with provenance (SIH, SI-PNI), FTP otherwise | DATASUS FTP | -- |
| Lazy / cache | lazy = TRUE (arrow or duckdb), local Parquet cache | none | none |
| On CRAN | yes | yes | archived 2025-12-14 |
| SIH-SP 2023-01, from nothing | 7.7 s (mirror) | 18.0 s | 9.7 s (with the download) |
Same rows and records in all three on every file compared. Each fits a different workflow; the vignette says which.
From CRAN (0.2.0):
install.packages("healthbR")
The development version, with the SIH mirror and the newest year coverage, from GitHub:
# install.packages("pak")
pak::pak("SidneyBissoli/healthbR")
library(healthbR)
# see all available data sources
list_sources()
All DATASUS modules follow a consistent API: *_years(), *_info(), *_variables(), *_dictionary(), *_data(), *_cache_status(), *_clear_cache().
# mortality data -- deaths in Acre, 2022
obitos <- sim_data(year = 2022, uf = "AC")
# filter by cause of death (CID-10 prefix)
obitos_cardio <- sim_data(year = 2022, uf = "AC", cause = "I")
# live births in Acre, 2022
nascimentos <- sinasc_data(year = 2022, uf = "AC")
# hospital admissions in Acre, January 2022
internacoes <- sih_data(year = 2022, month = 1, uf = "AC")
# filter by diagnosis (CID-10 prefix)
intern_resp <- sih_data(year = 2022, month = 1, uf = "AC", diagnosis = "J")
# outpatient production in Acre, January 2022
ambulatorial <- sia_data(year = 2022, month = 1, uf = "AC")
# different file type (e.g., high-cost medications)
medicamentos <- sia_data(year = 2022, month = 1, uf = "AC", type = "AM")
# disease notifications -- dengue, 2022
dengue <- sinan_data(year = 2022, disease = "DENG")
# health facilities in Acre, January 2023
cnes <- cnes_data(year = 2023, month = 1, uf = "AC")
# vaccination data -- Acre (R2 mirror by default, DATASUS fallback)
vacinas <- sipni_data(year = 2019, uf = "AC")
micro <- sipni_data(year = 2024, uf = "AC", month = 1)
# VIGITEL telephone survey
vigitel <- vigitel_data(year = 2024)
# PNS national health survey
pns <- pns_data(year = 2019)
# PNAD Continua
pnadc <- pnadc_data(year = 2023, quarter = 1)
# POF household budget survey
pof <- pof_data(year = 2018, register = "morador")
# Census population
pop <- censo_populacao(year = 2022, territorial_level = "state")
# SISAB -- primary care coverage by state, January 2024
sisab <- sisab_data(year = 2024, month = 1)
# ANS -- health plan beneficiaries in Acre, December 2023
ans <- ans_data(year = 2023, month = 12, uf = "AC")
# ANVISA -- registered medicines
med <- anvisa_data(type = "medicines")
# list variables for any module
sim_variables()
sia_variables(search = "sexo")
sinan_diseases(search = "dengue")
# data dictionary with category labels
sim_dictionary("SEXO")
sia_dictionary("PA_RACACOR")
When downloading multiple files (e.g., several years, months, or states), you
can speed up downloads by enabling parallel processing. Install furrr and
future, then set a parallel plan before calling any *_data() function:
install.packages(c("furrr", "future"))
library(future)
plan(multisession, workers = 4)
# downloads 4 states in parallel
df <- sih_data(year = 2022, month = 1:6, uf = c("SP", "RJ", "MG", "BA"))
# reset to sequential when done
plan(sequential)
All 12 download-based modules support parallel downloads: SIM, SINASC, SIH, SIA, SINAN, CNES, SI-PNI, SISAB, ANS, ANVISA, PNS, and PNADC.
All modules cache downloaded data automatically. Install arrow for optimized Parquet caching:
install.packages("arrow")
Each module provides cache management functions:
# check what is cached
sim_cache_status()
sih_cache_status()
sia_cache_status()
# clear cache for a module
sim_clear_cache()
All data is downloaded from official Brazilian government repositories (DATASUS, IBGE, ANS, ANVISA):
If you use healthbR in your research, please cite it:
citation("healthbR")
Please see CONTRIBUTING.md for guidelines on how to contribute to this project.
Please note that the healthbR project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
MIT © Sidney da Silva Pereira Bissoli