R package to access tax and accounting data of Brazilian states and municipalities provided by the Brazilian Public Sector Accounting and Tax Information System (SICONFI/National Treasure)
install.packages("remotes")
remotes::install_github("aspeddro/siconfir")- get_fiscal(): Fiscal management report
- get_budget(): Budget execution summary report
- get_annual_acc(): Annual statement of accounts
- msc_budget(): Budget accounts, accounting balances matrix
- msc_control(): Control accounts, accounting balances matrix
- msc_equity(): Equity accounts, accounting balances matrix
- report_status(): Report status
- get_annex(): Attachments of reports by sphere of government
- get_info(): Basic information of the federation entities
- find_cod(): Find state or municipality information
Datasets:
library(siconfir)Fiscal management report for the state of Sao Paulo (35) for the first four months of 2020:
siconfir::get_fiscal(year = 2020, period = 1, cod = 35)
codis an id assigned to each city and state. See IBGE, Cities and States,find_cod(),get_info()orbr_cods
Summary of the budget execution report for the state of Rio de Janeiro (33) of 2018 for the first two months:
siconfir::get_budget(year = 2018, period = 1, cod = 33)Declaration of annual accounts of the municipality of Sao Paulo (3550308) 2018:
siconfir::get_annual_acc(year = 2018, cod = 3550308)Budget accounts, accounting balances matrix:
siconfir::msc_budget(year = 2020, month = 1, cod = 1, matrix_type = "MSCC", class = 5, value = "period_change")Control accounts, accounting balances matrix:
siconfir::msc_control(year = 2020, month = 6, cod = 17, matrix_type = "MSCC", class = 7, value = "ending_balance")Equity accounts, accounting balances matrix:
siconfir::msc_equity(year = 2020, month = 12, cod = 1, matrix_type = "MSCE", class = 1, value = "beginning_balance") # cod = 1 is id of BrazilInformation on approved and corrected reports as well as matrices delivered to SICONFI:
siconfir::report_status(year = 2020, cod = 43)Attachments of reports by sphere of government:
siconfir::get_annex()Acess basic information of the federation entities:
siconfir::get_info()Find state or municipality information:
siconfir::find_cod("distrito federal")Basic information of Brazilian municipalities and states. br_cods provides results similar to get_info(), but with some corrections, see utils/build_datasets.R
siconfir::br_codsBugs or suggestions: open an issue detailing the problem/suggestion, be as reproducible as possible.
This project is released under the MIT License.