Download and read the public, non-identified microdata of the 'RAIS' (Relação Anual de Informações Sociais), the annual census of formal employment relationships and establishments published by the Brazilian Ministry of Labour and Employment through the 'PDET' FTP server <ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/>. Lists the years and archives available on the server, resolves which regional or state archive holds a given state, downloads it with an idempotent local cache, and reads the '7z' archives as a stream, filtering by state and selecting columns before anything is kept in memory, so that a single state can be extracted from a regional file of tens of millions of records. Handles the two header generations of the files (up to the 'RAIS' 2022 and from the 'RAIS' 2023 onwards) with the same normalized column names, provides the official record layout and a helper to consolidate the employment stock, admissions, separations and December payroll.
| Version: | 0.1.0 |
| Depends: | R (≥ 4.1.0) |
| Imports: | archive (≥ 1.1.0), cli (≥ 3.6.0), curl (≥ 5.0.0), readr (≥ 2.1.0), rlang (≥ 1.1.0), stringi (≥ 1.7.0), tibble (≥ 3.2.0) |
| Suggests: | dplyr, knitr, rmarkdown, testthat (≥ 3.0.0), withr |
| Published: | 2026-09-29 |
| DOI: | 10.32614/CRAN.package.raisr (may not be active yet) |
| Author: | Andre Leite |
| Maintainer: | Andre Leite <leite at castlab.org> |
| BugReports: | https://github.com/StrategicProjects/raisr/issues |
| License: | MIT + file LICENSE |
| URL: | https://github.com/StrategicProjects/raisr, https://strategicprojects.github.io/raisr/ |
| NeedsCompilation: | no |
| SystemRequirements: | libarchive (via the 'archive' package) |
| Language: | en-US |
| Materials: | README, NEWS |
| CRAN checks: | raisr results |
| Reference manual: | raisr.html , raisr.pdf |
| Vignettes: |
Getting started with raisr (source, R code) Streaming, cache and file generations (source, R code) |
| Package source: | raisr_0.1.0.tar.gz |
| Windows binaries: | r-devel: not available, r-release: not available, r-oldrel: not available |
| macOS binaries: | r-release (arm64): not available, r-oldrel (arm64): not available, r-release (x86_64): not available, r-oldrel (x86_64): not available |
Please use the canonical form https://CRAN.R-project.org/package=raisr to link to this page.