| Title: | Access to the Great Numbers of Brazilian Individual Income Tax (IRPF) |
|---|---|
| Description: | Provides functions to download, clean, and structure open data from the Brazilian Federal Revenue (Receita Federal do Brasil - RFB) regarding Personal Income Tax (IRPF) statements. Includes a data dictionary and categorized metadata for several sections such as assets, rights, debts, and income brackets. More information about the data source can be found at <https://dados.gov.br/dados/conjuntos-dados/grandes-nmeros-do-imposto-de-renda-da-pessoa-fsica>. |
| Authors: | Luã Braga de Oliveira [aut, cre] |
| Maintainer: | Luã Braga de Oliveira <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.1 |
| Built: | 2026-06-03 08:20:54 UTC |
| Source: | https://github.com/luabragadeoliveira/irpfr |
This function connects to the Brazilian Federal Revenue (RFB) open data server, downloads the CSV for the requested section, and performs data cleaning (standardizing names, pivoting to tidy format, and adjusting currency scales).
get_irpf(section)get_irpf(section)
section |
A string representing the section name (e.g., "bens_e_direitos"). |
A tidy tibble with columns: ano_calendario, atributo, and valor.
df <- get_irpf("bens_e_direitos") head(df)df <- get_irpf("bens_e_direitos") head(df)
Returns a detailed dictionary of all attributes (columns) present in a specific IRPF data section.
get_metadata(section)get_metadata(section)
section |
A string representing the section name (see |
A tibble with columns atributo and descricao.
get_metadata("bens_e_direitos")get_metadata("bens_e_direitos")
This function returns a table containing all the available data sections that can be retrieved from the Great Numbers of Brazilian Individual Income Tax (IRPF) through this package.
get_sections()get_sections()
A tibble with two columns: secao (the key to be used in other functions)
and descricao (a brief explanation of the data).
get_sections()get_sections()