Access Novo CAGED Microdata from the Brazilian Ministry of Labour
Overview
Download and read the public, non-identified microdata of the Novo CAGED (Cadastro Geral de Empregados e Desempregados), the monthly registry of formal employment movements published by the Brazilian Ministry of Labour and Employment through the PDET FTP server <ftp://ftp.mtps.gov.br/pdet/microdados/>. Lists the reference months available on the server, downloads the three monthly files (movements declared on time, declared late, and exclusions) with an idempotent local cache, and reads the national 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 without loading the full national file. Also provides the official record layout and a helper to consolidate admissions, separations and net balance by reference month.
Initial release.
caged_available()lists the reference months published on the PDET/MTE FTP server, with folder modification dates.caged_download()fetches theMOV,FORandEXCarchives of one or more months into an idempotent local cache (caged_cache_dir(),caged_cache_list(),caged_cache_clear()).caged_read()stream-reads a national.7zarchive, filtering by state and selecting columns chunk by chunk, with normalised column names and typed codes;caged_fetch()combines download and read for several months.caged_balance()consolidates admissions, separations and net balance bycompetenciamov, inverting the sign of exclusion records.caged_layout()documents the 30 columns of the official record layout.
Show all changes in 0.1.0Hide the rest of the changes in 0.1.0
- Sample archives in
inst/extdataallow every reading function to be tried offline.
From NEWS.md in the release
Install
Health
- OK13 OKNow
- OK5 OK2026-10-01
Documentation
- Help pages
- 11 (1 internal)includes a package overview page
- Examples that run
- 70%7 run in a plain check · 3 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 100%
- Documented parameters
- 89%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Repository
9 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/strategicprojects/cagedr on 2026-10-25.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-09-29 · The repository has a site deploy workflow
pkgdown site last built 2026-09-29, before release 0.1.0 (2026-09-30)
Show all practicesHide 1 practice
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-09-11Named in .Rbuildignore: CLAUDE.mdNamed in .gitignore: .claude, CLAUDE.mdCommits: at least 10 crediting it in the message
- Claude Fable 5.18 commits · Sep 2026
- Claude Opus 5.52 commits · Sep 2026
Dependencies
Code & Tests
People & History
- 0.1.0Latest2026-09-30 · current release
- RR 4.6.0 released · 2026-04-24
Package metadata
- First published
- 2026-09-30
- Total releases
- 1 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Download size
- 43 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("cagedr")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.
From data release v2026-10-26, which the citation names so these numbers can be found later. More on citing and the projects behind them.