Dados Abertos - Brazilian Chamber of Deputies

repository·master·Indexed 42 days ago

https://github.com/camaradosdeputados/dados-abertos

A service provided by the Brazilian Chamber of Deputies offering open access to legislative data via a RESTful API and downloadable files in JSON, XML, and CSV formats. The documentation covers data structures for party changes, historical lists of Chamber Presidents and Vice-Presidents, Board of Directors (Mesa Diretora) composition, and membership details for permanent, special, external, and Parliamentary Inquiry Commissions (CPIs) across various legislatures.

Tokens
5K
Snippets
10
Records
32
Agent score
53%

What's inside Dados Abertos

  1. Overview of Dados Abertos services and data formats

    master

    The Dados Abertos service provides access to Brazilian Chamber of Deputies data. It features a RESTful API and downloadable datasets.

    Available Data Formats:

    • API Responses: JSON, XML
    • Downloadable Files: XML, JSON, CSV, XLSX (MS Excel), and ODS (LibreOffice)
  2. Understand the purpose of the dados-extras directory

    master

    The dados-extras directory contains raw data and information that is not yet suitable for official publication via the Dados Abertos (Open Data) service of the Chamber of Deputies.

    This data includes:

    • Information researched by the Documentation and Information Center (CEDI) for individual requests.
    • Historical data that predates current digital systems.
    • Information used to complement or correct existing datasets.
    • Unstructured or poorly related table copies from Chamber databases.

    The goal is to collaborate with advanced users to transform these raw files into structured, related CSV files that can eventually be integrated into the official Dados Abertos API and Portal.

  3. Scope of voting data in Dados Abertos

    master

    The votacoes directory contains files regarding voting data conducted within the Chamber of Deputies (Câmara dos Deputados).

    In-scope:

    • Voting processes conducted within the Chamber of Deputies itself.

    Out-of-scope:

    • Voting processes with a National Congress scope (e.g., joint commissions or plenary sessions held jointly with the Senate Federal).
  4. Understand the nature of extra data in the 'dados-extras' directory

    master
    Data located in the dados-extras directory (including the partidos folder) is provided "as is" (as-is). These are unofficial tables containing information currently being processed or elaborated. They are not necessarily vetted or reviewed by the Câmara dos Deputados institution. They are published in this state to promote transparency and allow the community to help identify errors or inconsistencies.
  5. Understanding the definition of a 'votação' (vote)

    master

    In the Dados Abertos specification (post-2017), a votação (vote) is defined as the result of a deliberation made by a group of parliamentarians.

    Key characteristics of this model:

    • Single Object: Each vote has exactly one objeto (the specific proposition being deliberated upon).
    • Unique Identification: Every vote must be uniquely and exclusively identified, whether it occurs in the Plenary or in committees.

    Note on Data Discrepancies: There is a distinction between the formal Dados Abertos definition and the traditional Chamber jargon. In practice, the phrase "votação da proposição X" often refers to the set of all votes surrounding proposition X (including votes on opinions, amendments, substitutes, separate votes, requirements, and final wording). In the formal model, each of these accessory propositions is a unique object of a vote, but they may not always be individually identified or registered in the source systems. Consequently, data is published in its current state, and users may need to find alternative ways to link related information.

  6. Navigate the dados-extras directory structure

    master

    The dados-extras directory follows a specific organizational pattern to help users locate data:

    • Entity Hierarchy: Subdirectories reproduce the existing entity hierarchy used in the main Dados Abertos project.
    • /fontes subdirectories: These contain the "raw state" information files.
    • CSV Skeletons: Within each entity subdirectory, you will find "skeletons" of the CSV files that the project intends to generate from the raw sources.
    • Subdirectory Documentation: For specific explanations regarding the contents and structure of a particular CSV file, refer to the readme.md file located within that specific subdirectory.
  7. Understand the relationship between Plenário voting data and Dados Abertos IDs

    master

    The voting data files (PlenVotacoes, PlenProposicoes, etc.) use identifiers from the Chamber's Plenary registration system, which are not the same as the identifiers used in the Dados Abertos RESTful API or standard download files.

    To link these datasets, you must use specific mapping fields:

    • Propositions: Use propRelacId from PlenProposicoes.csv to find the corresponding {id} for the /proposicoes/{id} endpoint.
    • Deputies: Use idDeputado from PlenVotos-L*.csv to link to the /deputados/{id} endpoint. Note that this field was derived via name comparison and may be empty if names did not match official records.
    • Parties/Blocks: In PlenOrientacoes-ate_L55.csv, parties and blocks are identified by their acronyms (sigPartidoBloco). Note that block identifiers (numPartidoBloco) in this file change as members join or leave, making them different from the identifiers used in the /blocos endpoint.
  8. Understand party change data structures in 111_1551 and 111_1552

    master

    The Excel files 111_1551_Mudanças de Partido_ 1987-1990.xls and 111_1552_Mudanças de Partido_1991-1995.xls contain party change information but use different data models depending on the era:

    Older Data (1987-1995)

    In these files, a single party change is represented by two separate rows for the same parliamentarian.

    • The Situação (Situation) field describes whether the event is an entry into or an exit from a party.
    • The Partido (Party) field contains the party acronym.

    Newer Data

    In newer files, a party change is represented in a single row using the following columns:

    • DO (FROM): The acronym of the previous party or party block.
    • PARA (TO): The acronym of the new party or party block.
    • UF: The federation unit (state) of the parliamentarian.
    • Titular/Suplente: The status of the mandate (Principal/Substitute).
  9. Get support and provide feedback via GitHub Issues

    master
    The primary channel for developers to ask questions, submit suggestions or criticisms, and share experiences regarding Dados Abertos is the GitHub Issues section. Before opening a new issue, it is recommended to search existing posts to see if your question has already been addressed.
  10. Use the HOPP (Histórico de Ocorrências de Partidos Políticos) dataset

    master

    The HOPP dataset is a semicolon-separated CSV file (UTF-8 encoding) that aggregates data from three different internal Câmara systems. It tracks the historical occurrences of political parties, including creation, extinction, name or acronym changes, incorporations, or mergers.

    Technical Specifications:

    • Format: CSV
    • Delimiter: ; (semicolon)
    • Encoding: UTF-8

    Key Use Cases:

    • Validating if party registrations in voting records or legislative proposals match the actual dates of the party's existence.
    • Enriching party records and improving identification.
    • Refining the identification of parliamentary blocs.
    • Reviewing deputy affiliations and movements between parties across different legislatures.
    • Conducting historical research on the organization of Brazilian political and economic forces.