Skip to content

raisr

0.1.0Package record

Access 'RAIS' Microdata from the Brazilian Ministry of Labour

0packages depend
395downloads / year
91.5%test coverage
13/13flavors OK

Overview

About

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.

Changes in 0.1.0

Initial release.

  • rais_available() lists every archive published on the PDET/MTE FTP server, with size, modification date and edition (final, partial, legacy).
  • rais_files() resolves offline which archive holds a state in a year (one file per state up to 2017, regional files from 2018) and rais_ufs() gives the state table behind it.
  • rais_download() fetches the archives into an idempotent local cache that mirrors the server layout (rais_cache_dir(), rais_cache_list(), rais_cache_clear()).
  • rais_read() stream-reads a .7z archive, filtering by state and selecting columns chunk by chunk, detecting the file generation (; with decimal comma up to the RAIS 2022, , with decimal point from the RAIS 2023) and mapping both to the same normalized column names; rais_fetch() combines download and read for several years.
Show all changes in 0.1.0Hide the rest of the changes in 0.1.0
  • rais_stock() consolidates the stock on 31 December, admissions, separations and December payroll by any grouping.
  • rais_layout() documents the columns of the employment and establishment files, with the two header spellings of each.
  • Sample archives in inst/extdata (both generations, employment and establishments, plus a pre-2018 state file) allow every reading function to be tried offline.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 2.3 min · r-oldrel-macos-x86_64
Status changes
  • OK13 OKNow
  • OK6 OK2026-09-30
Advisories

none known

Documentation

In release 0.1.0
READMEYes · 638 wordsVignettesYes · 2 · dynamicNEWSYes · 67% structured · mentions 0.1.0Citation fileNoWebsiteYes · pkgdown
Help pages
12 (1 internal)includes a package overview page
Examples that run
82%9 run in a plain check · 1 only when donttest examples are enabled (R CMD check --as-cran) · 1 never run
Exported functions with examples
100%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
0%

Downloads

395
CRAN downloads in the past year
Rank #25,223 · ~1/day · ~33/mo
Daily download trend is not available in this view yet.
39530 days
39590 days
3951 year
Compare downloads with other packages →
Also on4 r2u

Repository

0Stars
0Forks
0Open issues
0Open PRs
0Releases
Last activity 2026-09-29
Responsiveness
not measured
PracticesBeta

9 development-tooling and community-health practices detected across 5 families in the upstream repository

Checks run against github.com/strategicprojects/raisr on 2026-10-22.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (3)
pkgdown

GitHub Pages site last deployed 2026-09-29 · The repository has a site deploy workflow

pkgdown site last built 2026-09-29

Reproducibility and dev environment (1)
data-raw/
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Show all practicesHide 1 practice
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v4 (2026-10-20)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen 2026-09-18
    Named in .Rbuildignore: CLAUDE.md
    Named in .gitignore: .claude, CLAUDE.md
    Commits: at least 5 crediting it in the message
Models named in its commits
  • Claude Fable 5.13 commits · Sep 2026
  • Claude Opus 5.52 commits · Sep 2026
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
12 external dependencies (excludes base and recommended)

Installing raisr adds 27 packages (16 with compiled code, 19 MB of source tarballs). Heaviest: stringi 11 MB, vctrs 1.0 MB, rlang 766 KB.

Depends (1)
R >= 4.1.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (6)
Author, Maintainer since 0.1.0 (2026)
Releases (1)
  • 0.1.0Latest
    2026-09-29 · current release
  • R
    R 4.6.0 released · 2026-04-24

Package metadata

First published
2026-09-29
Total releases
1 / 1 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 4.1.0
Download size
64 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("raisr")
Leite, A., Amorim, C., Bezerra, D., Nascimento Barreto, J., Vasconcelos, H., & Wasiliew, M. (2026). raisr: Access 'RAIS' Microdata from the Brazilian Ministry of Labour (Version 0.1.0) [Computer software]. https://doi.org/10.32614/CRAN.package.raisr

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for raisr version 0.1.0 [Data set]. HJJB, LLC. Data release v2026-10-25. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy