Submitted:
16 October 2026
Posted:
19 October 2026
You are already at the latest version
Abstract
Brazilian public data relevant to health and the environment are dispersed across heterogeneous official systems - FTP servers (DATASUS), REST APIs (OpenDataSUS/DEMAS), and web portals (gov.br) - and published in legacy, often compressed formats (e.g., DBC/DBF) with schemas that change across years and topics, which makes integrated, reproducible reuse costly. Guaraci is an open-source (MIT), Docker-first orchestrator that acquires such data directly from the primary official sources, decodes legacy formats, harmonizes heterogeneous schemas, records full provenance, and delivers the result to a downstream data lake. It integrates 90+ sources spanning public health (DATASUS microdata such as hospital and mortality information system; OpenDataSUS arbovirus and immunization data; gov.br sanitation indicators) and the environment (NASA POWER climate series, FIRMS active-fire detections and GPM IMERG precipitation), behind a single asynchronous job engine exposed through a command-line interface and a REST API. Data are decoded to records with pyreaddbc/dbfread, harmonized by taking the union of all historical columns (null-padding missing fields) and exported to CSV, Parquet and SQLite with a machine-readable file capturing source, request filters and output paths. By abstracting unstable FTP servers, paginated APIs and legacy encodings behind one reproducible mechanism, Guaraci lowers the technical barrier to Brazilian public data and continuously supplies analysis-ready inputs for spatio-temporal epidemiological modelling, machine-learning applications and cross-source studies.
Keywords:
Brazil
; public health data
; open government data
; reproducible data engineering
; data lake
Value of the Data
- The data are acquired directly from the primary official publishers (no third-party mirrors), preserving provenance and avoiding curation lag - each record’s origin, request filters and collection are captured in a single file.
- They remove a high technical barrier: DATASUS microdata is published in legacy .dbc/.dbf formats over unstable FTP servers, and environmental data in separate NASA products; here they are decoded, harmonized and exported in analysis-ready formats (Parquet/CSV/SQLite). Also, has a graphical interface for non-experts.
- The collection is reproducible: a Docker-first runtime and an open orchestrator let other researchers regenerate or extend the data with identical methodology.
- The coverage spans health, environmental, and infrastructure data sources (DATASUS/OpenDataSUS/gov.br and NASA), enabling spatio-temporal and machine-learning studies that integrate these domains to support early-warning systems, epidemiological forecasting, climate-health impact assessments, and investigations of health inequalities and environmental determinants of disease.
- It is directly relevant to under-resourced public-health research in the Global South, where data-engineering effort is often the main bottleneck.
Background
Data analysis aimed at developing strategies to mitigate the occurrence and spread of diseases and other events harmful to human health has been a major obstacle for healthcare professionals and policy makers, due to the great difficulty in acquiring and organizing data systematically [1,2]. In this context, Guaraci is an initiative that seeks to democratize access to environmental and health public data, to facilitate and expand the development of interdisciplinary analyses focused on research and public policy development.
Interrelating these heterogeneous sources is particularly important to observe how the social determinants of health affects a specific region or population by integrating socioeconomic, environmental and public health data. Such datasets support studies to evaluate the impact of climate variability on infectious diseases, the effects of environmental exposures on mortality, health inequalities across regions, and the development of predictive and early-warning models for epidemics and other public-health emergencies [3,4].
Within the AutoAI-Pandemics ecosystem [5], Guaraci is the layer that continuously supplies our data lake (Sábia): it materializes the raw, traceable bronze tier of a bronze/silver/gold medallion architecture [6], on which curation, integration and modelling are built. Source coverage has grown incrementally to 90 registered sources and is designed to keep expanding.
Data Description
Guaraci produces flat, analysis-ready tables (Parquet, CSV or SQLite), one per source and collection window, each accompanied by a machine-readable manifest.json (source, request filters, materialized and exported paths, warnings, and - for APIs - query parameters) and a data dictionary. The orchestrator currently catalogs 90+ sources; for each source, the user-facing filter parameters and the real output field names are documented in the machine-readable data dictionary shipped with it (human-readable in the repository documentation, and available at runtime through the ‘fetch fields’ command). The complete and detailed list of the databases that compose the Guaraci can be found on the project’s official website [7]. Table 1 categorizes the original data sources that provide data to Guaraci into groups.
Experimental Design, Materials and Methods
Data was acquired with Guaraci v0.6.0, the open-source orchestrator that is the instrument for this work.
Software and runtime
Guaraci is implemented in Python (3.11/3.12) using Polars and PyArrow for out-of-core processing, Pydantic for parameter contracts, and Click/Rich for the command-line interface; the REST layer uses FastAPI. The officially supported workflow is Docker-first, which encapsulates the runtime and removes environment-dependent failures, ensuring that data extracted today is extracted the same way on another machine. The architecture is layered: source-specific data sources, a DownloadService that registers each source’s declarative schema (SourceParameterSpec) and validates parameters (rejecting unknown ones), and an asynchronous DownloadJobService (queued jobs, progress, retry, cancellation, disk persistence). The supported interfaces are the command-line interface and the REST API; every source returns a normalized result object.
Development and evolution
Guaraci evolved over five release lines from an experimental prototype into the current orchestrator (Table 2). Versions 0.1.x-0.2.0 established the Docker-first policy and the first DATASUS integration (SINAN); 0.3.0 added SIM and SIH and standardized CSV/Parquet/SQLite export; 0.4.0 introduced the asynchronous job engine (DownloadService/DownloadJobService) and moved the legacy SNIS BigQuery path to legacy in favour of a gov.br crawler; 0.4.1-0.5.x added the OpenDataSUS REST integration and the auto-generated DEMAS source registry; and 0.6.0 made direct DATASUS FTP the default backend (replacing PySUS), added eleven further FTP systems and the NASA environmental sources, and introduced the generic schema-driven command-line interface and the per-source data dictionary.
Acquisition by transport
Guaraci abstracts four acquisition mechanisms behind the same schema/validation/result contract:
- HTML crawler (gov.br): SNIS and SINISA sanitation indicators - collect links, download raw files, optionally extract archives, write a manifest.
- REST API (OpenDataSUS / DEMAS): an isolated HTTP client (Python standard-library urllib) with native year filters, optional local refinement (date/UF), internal pagination, and an error taxonomy distinguishing connectivity, timeout, HTTP and response-format failures; generated DEMAS sources substitute path parameters and pass only declared query parameters.
- Direct DATASUS FTP: an anonymous ftplib connection to ftp.datasus.gov.br; .dbc microdata are decoded via pyreaddbc (to .dbf) and dbfread (to records, then Polars), and plain .dbf directly (PNI). Talking to the official FTP directly - the same server that third-party libraries such as PySUS wrap internally - removed a transitive dependency and gave direct control over discovery, filtering and decoding, while keeping the same primary source. It covers SIH/SIM/SINAN plus eleven additional systems (SINASC, SIA, CNES, PNI, CIHA, CIH, SISCAN, SISPRENATAL, RESP, PCE, oncology panel).
- NASA APIs (environment): keyless POWER (climate); FIRMS active-fire CSV (free MAP_KEY); GPM IMERG daily precipitation via GES DISC OPeNDAP point subsetting (Earthdata token). All three are implemented with no additional runtime dependency.
A discovery preflight returns the file count broken down by group/UF and, optionally, the total download size, without downloading - recommended before pulling large systems.
Decoding and schema harmonization
Legacy microdata is decoded to Polars data frames (.dbc -> .dbf -> records). Heterogeneous historical schemas, which vary across years and, for notifications, across diseases, are harmonized conservatively by taking the union of all historical columns and null-padding missing fields, so that every variable ever published is preserved rather than discarded by an intersection. Types are standardized.
Export and provenance
Outputs are written as CSV, Parquet or SQLite, alongside a manifest.json (v1.1) recording source, request filters, materialized and exported paths, warnings and (for APIs) query parameters. Collection is idempotent and delta-aware: re-runs skip files already materialized, and the FTP discovery preflight compares volumetry (file count/size) to fetch only what is new or changed.
Reproducibility and integrity
Reproducibility is treated as a requirement: Docker-first execution, few pinned dependencies (the ‘datasus’ extra installs only pyreaddbc and dbfread), and credentials supplied only via environment variables - never persisted to disk or written to manifests. The orchestrator ships an automated test suite plus opt-in live smoke tests that validate decoding against the real servers.
Reproducing a collection
Any collection can be reproduced from the source code.
Figure 1.
Representative commands examples.

Scope, ecosystem role and extensibility
Guaraci is the data-acquisition layer of the AutoAI-Pandemics [5] ecosystem: its purpose is to continuously feed the Sabiá data lake [8], materializing the raw, traceable bronze tier of a bronze/silver/gold medallion architecture on which downstream cleaning, integration, machine learning and dashboards are built. The orchestrator follows a primary-source-first principle - data are taken from the official publisher, never from curated third-party mirrors - and its scope is Brazil-focused, complemented by selected foreign sources that provide data relevant to Brazil (for example, NASA environmental products covering Brazilian territory). Because sources are integrated declaratively - each source contributes a parameter schema and an adapter validated by a shared contract, with no bespoke engine code - the catalog has grown incrementally to 90+ registered sources over the course of the project and is designed to expand progressively as additional Brazilian (and selected foreign) systems are onboarded, without changes to the core acquisition engine.
Limitations
Availability depends on the stability of the external official servers (DATASUS FTP, government APIs), which are intermittently unavailable, and historical coverage windows differ by system. Some environmental sources require free access credentials issued by the publisher (a FIRMS map key; an Earthdata token for GPM IMERG via NASA GES DISC). Notification-based health data may carry under-reporting or data-entry lag at the origin; these are properties of the official source rather than of the acquisition described here.
Credit Author Statement
Luis Felipe Vogel Lopes: Conceptualization, Methodology, Software, Data curation, Writing - original draft. Bruna Costa de Souza: Writing - original draft, Writing - Review & Editing Pedro Guilherme dos Reis Teixeira: Software (initial prototype). Marina Carvalho Arruda Barreto: Conceptualization, Writing - original draft. Bruno Rafael Florentino: Writing - original draft. Robson Parmezan Bonidia: Conceptualization, Supervision, Methodology, Software, Writing - Review & Editing, Resources, Funding acquisition. André Carlos Ponce de Leon Ferreira de Carvalho: Conceptualization, Supervision, Methodology, Software, Resources, Funding acquisition.
Ethics Statement
The authors have read and follow the ethical requirements for publication in Data in Brief and confirm that the current work does not involve human subjects, animal experiments, or any data collected from social media platforms. All health microdata used are publicly released and de-identified at the source by DATASUS/OpenDataSUS.
Declaration of Competing Interests
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Acknowledgments
This work has been funded by the Canadian International Development Research Center (IDRC) under Grant Agreement 109981, funded by IDRC and the Foreign, Commonwealth, and Development Office of the UK government. R.P.B. has been funded by the Araucária Foundation and the Government of Paraná through the Sabiá Data Lake Project/IPEC. B.R.F. has been funded by the São Paulo Research Foundation (FAPESP), grant 2024/00830-8. M.C.A.B acknowledges financial support from the Brazilian National Institute of Science and Technology for Artificial Intelligence for Social Good (INCT IAPROBEM), funded by the Brazilian National Council for Scientific and Technological Development (CNPq/MCTI), through grant 189487/2025-9. This study was financed in part by the Coordenação de Aperfeiçoamento de Pessoal de Nível Superior – Brasil (CAPES) – Finance Code 001.
References
- Nishan, N.H. Digital epidemiology: Utilizing big data for public health surveillance and disease outbreak prediction. J. Public Health Res. 2026, 15. [Google Scholar] [CrossRef]
- Jia, P.; Liu, S.; Yang, S. Innovations in Public Health Surveillance for Emerging Infections. Annu. Rev. Public Health 2023, 44, 55–74. [Google Scholar] [CrossRef]
- Haque, S.; Mengersen, K.; Barr, I.; Wang, L.; Yang, W.; Vardoulakis, S.; Bambrick, H.; Hu, W. Towards development of functional climate-driven early warning systems for climate-sensitive infectious diseases: Statistical models and recommendations. Environ. Res. 2024, 249, 118568. [Google Scholar] [CrossRef]
- Li, Z.; Meng, F.; Wu, B.; Kong, D.; Geng, M.; Qiu, X.; Cao, Z.; Li, T.; Su, Y.; Liu, S. Reviewing the progress of infectious disease early warning systems and planning for the future. BMC Public Health 2024, 24, 1–13. [Google Scholar] [CrossRef]
- AutoAI-Pandemics, Official website. 2023. Available online: https://autoaipandemics.icmc.usp.br (accessed on 11 August 2026).
- Adams, B.; Esteghamati, M.Z. A Semantic Modeling Approach to Transportation Asset Data. 2026 Intermountain Engineering, Technology and Computing (IETC), Provo, UT, USA, 2026; pp. 1–6. [Google Scholar] [CrossRef]
- Guaraci, Official website. 2026. Available online: https://sabiadatalake.com.br/guaraci/ (accessed on 11 August 2026).
- Sabiá Data Lake, Official website. 2026. Available online: https://sabiadatalake.com.br (accessed on 11 August 2026).
Table 1.
Categories, Data Sources and Data Examples.
| Category | Summarized Data Sources | Data Example |
|---|---|---|
| Epidemiology and Morbidity | SINAN, SISVAN, SISCAN, RESP, PCE, SISPRENATAL, SRAG | Data regarding infectious diseases, nutritional status, cancer, and other health-related information |
| Vital Statistics | SIM, SINASC | Live births and mortality |
| Environmental | SNIS, SINISA, SISAGUA, NASA | Water distribution and supply, basic sanitation, temperature, solar radiation, wind, fire hotspots |
| Demographic and Socioeconomic | IBGE | Population, gross domestic product... |
| Other Public Health Policies | CNES, SASISUS/SIASI, PNI, SIH, SIA, CIH, CIHA, ESAVI, PNI, PMMB, Previne Brasil, BPS, ApuraSUS, BNAFAR | Healthcare facility registry, indigenous health, National Immunization Program, hospitalization and ambulatory care, health system financing, medicine distribution... |
| Research, Science, and Technology | DGITS, Plataforma Brasil, CONITEC | Technologies, guidelines, and protocols; research projects registered in Brazil… |
Table 2.
Release timeline and milestones.
| Version | Milestone |
|---|---|
| 0.1.x | Experimental prototype; first DATASUS .dbc parsing; environment-dependent. |
| 0.2.0 | Docker-first policy; modular core; first SINAN integration; automated tests. |
| 0.3.0 | DATASUS SIM and SIH; dedicated CLIs; standardized CSV/Parquet/SQLite export. |
| 0.4.0 | Asynchronous job engine (DownloadService/DownloadJobService); legacy SNIS BigQuery moved to legacy; gov.br crawler. |
| 0.4.1-0.5.x | OpenDataSUS REST integration; auto-generated DEMAS source registry; manifest schema v1.1. |
| 0.6.0 | Direct DATASUS FTP as default (+11 systems); NASA POWER/FIRMS/GPM; generic schema-driven CLI; per-source data dictionary; BigQuery moved to an optional extra. |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.