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.0.tar.gz (15.9 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.0-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for orcamentobr-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9e0566dfa169e43eda99ab414ba0a68d2d112e07463964b8a2c6172943531c8c
MD5 750f1e85f06511cfcfd72dee8cf93b31
BLAKE2b-256 d21891738b5e00eef6426a491725f9ed382f0e51c401358c666c68dcdc76411e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for orcamentobr-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d41624b7b602fd97788883aab1b4225596a1dd50e22a19d2c9b0f17c1033d34
MD5 7bf58600aec5de7ddc064ec601f77002
BLAKE2b-256 4044701264483fb6e29c4c920f958df6e74dab7d1ffe6b1826a27959aa15ff07

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