Skip to main content

Download Official Data on Brazil's Federal Budget

Project description

orcamentobr

Download Official Data on Brazil's Federal Budget

PT-BR: Baixe Dados Oficiais sobre o Orçamento Federal do Brasil

Description

The orcamentobr Python library allows users to download and analyze official data on Brazil's federal budget through the SPARQL endpoint provided by the Integrated Budget and Planning System (SIOP). This library enables access to detailed information on budget allocations and expenditures of the federal government, making it easier to analyze and visualize these data.

PT-BR: A biblioteca orcamentobr em Python permite aos usuários baixar e analisar dados oficiais sobre o orçamento federal do Brasil através do endpoint SPARQL fornecido pelo Sistema Integrado de Planejamento e Orçamento (SIOP). Esta biblioteca facilita o acesso a informações detalhadas sobre alocações e despesas orçamentárias do governo federal, tornando mais fácil analisar e visualizar esses dados.

Technical information on the Brazilian federal budget is available (Portuguese only) at the Budget Technical Manual.

PT-BR: Informações técnicas sobre o orçamento federal brasileiro estão disponíveis (apenas em português) no Manual Técnico do Orçamento.

Installation

pip install orcamentobr

Usage

Here are some examples of how to use the library functions:

PT-BR: Aqui estão alguns exemplos de como usar as funções da biblioteca:

Main Functions PT-BR: Funções Principais

quais_membros / which_members

Lists all members in a Brazilian Federal Budget dimension for a given year.

PT-BR: Lista todos os membros em uma dimensão do orçamento federal brasileiro para um determinado ano.

Example of using the quais_membros function

from orcamentobr import quais_membros
members = quais_membros(2023, dimensao="funcao")

despesa_detalhada / detailed_expenditure

Downloads expenditure data from the Brazilian federal budget.

PT-BR: Baixa dados de despesas do orçamento federal brasileiro.

Examples of using the despesa_detalhada function

from orcamentobr import despesa_detalhada

detailed_expenses_2017 = despesa_detalhada(2017, detalhe_maximo=True)
expenses_fcdf = despesa_detalhada(2020, uo = "73901", valor_ploa = False)
expenses_2023 = despesa_detalhada(exercicio = 2023, resultado_primario = "6")
expenses = despesa_detalhada(
    exercicio = None,
    esfera = False,
    orgao = False,
    uo = False,
    funcao = False,
    sub_funcao = False,
    programa = False,
    acao = False,
    plano_orcamentario = False,
    subtitulo = False,
    categoria_economica = False,
    gnd = False,
    modalidade_aplicacao = False,
    elemento_despesa = False,
    fonte = False,
    id_uso = False,
    resultado_primario = False,
    valor_ploa = True,
    valor_loa = True,
    valor_loa_mais_credito = True,
    valor_empenhado = True,
    valor_liquidado = True,
    valor_pago = True,
    inclui_descricoes = True,
    detalhe_maximo = False,
    ignore_secure_certificate = False,
    timeout = 0,
    print_url = False,
)

References

Read the Budget Technical Manual for more information.

PT-BR: Leia o Manual Técnico do Orçamento para mais informações.

License

This project is licensed under the terms of the GPL (>= 3). See the LICENSE file for more details.

PT-BR: Este projeto está licenciado sob os termos da licença GPL (>= 3). Veja o arquivo LICENSE para mais detalhes.

Authors

Daniel G. Reiss (author and creator) - ORCID: 0000-0003-1634-760X

Gabriel S. Vera (co-author) - ORCID: 0009-0006-8693-6732

Gustavo José de Guimarães e Souza (contribuitor) - ORCID: 0000-0002-0718-2295

Ministério do Planejamento e Orçamento (co-author and funder)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

orcamentobr-1.0.1.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

orcamentobr-1.0.1-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file orcamentobr-1.0.1.tar.gz.

File metadata

  • Download URL: orcamentobr-1.0.1.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for orcamentobr-1.0.1.tar.gz
Algorithm Hash digest
SHA256 478dc68fc97224fc04e6de1ef6bab386c6979c9440f539af9012bf2ad9dd923c
MD5 f3ee102fab7bbe444573b8435b84e46c
BLAKE2b-256 dab2ff6d17d4df6250edcc52067d57374446f6b61c6c7c63c04ed567cbe106d1

See more details on using hashes here.

File details

Details for the file orcamentobr-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: orcamentobr-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for orcamentobr-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 51a0b6ca15e6aac8b2c3604e4868370d98dc21c3d7a4596c36cf6d86b0102a5b
MD5 0ec50d5806f4c55e54da28bbb9f09fc8
BLAKE2b-256 5de150a00448e6be8e73338c8d6f818b4030de5f48d0fc3ec168439ec76dc72e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page