Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

An R package that returns tidy data from the APIs of the Brazilian Federal Senate and Chamber of Deputies.

License

NotificationsYou must be signed in to change notification settings

duarteguilherme/congressbr

Repository files navigation

CRAN_Status_BadgeTravis-CI Build StatusAppVeyor Build StatusCRAN_Download_BadgeCRAN_Download_Badge

🇧🇷 congressbr

congressbr is a package for extracting data from the APIs of theBrazilian Federal Senate and Chamber of Deputies, respectively. You can read a paper about it in the Latin American Research Reviewhere.

Installation

congressbr is on CRAN, and so can be installed with the following:

install.packages("congressbr")

Development versions can be installed with the devtools package:

devtools::install_github("RobertMyles/congressbr")

Function naming

We use a naming convention for functions that facilitates tab completion.All Senate-related functions start withsen_ and all Chamber-relatedones start withcham_.

Principal functions

  • cham_votes(): returns voting information from the Chamber ofDeputies.
  • cham_bills(): returns bill information from the Chamber ofDeputies.
  • sen_votes(): returns voting information from the Federal Senate.
  • sen_bill_search(): search for legislature in the Senate.

Vignettes

You can learn more about the package with the vignettes. Runvignette("Exploring the Brazilian Federal Senate") to download andexplore data from the Federal Senate, andvignette("Exploring the Brazilian Chamber of Deputies") to do the same for the Chamber ofDeputies.

Datasets

congressbr comes with some pre-prepared datasets.

  • data("commissions") returns a dataframe of commissions, with twocolumns, the full name of the commission, and the abbreviations usedin some of the other functions incongressbr and in much of theliterature on the institution.

  • data("sen_nominal_votes") is a dataframe of all the nominal votesin the Senate between 1991 and early 2017 (the Senate API onlyallows requests for a maximum period of 60 days).

  • data("cham_nominal_votes") is a dataframe of nominal votes in theChamber of Deputies from 1991 to 2017.

Contributions

If you would like to get involved, feel free to fork the repo. We’vebeen using theUdacity Git Commit Message StyleGuide (well, notalways).There are a list of openissues,which is a good place to start. The API of the Federal Senate is alsounder development, and so elements of this package may change. If youfind any problems with the package, please open an issue and leave us areproducible example and we’ll get it fixed asap.

Citation

If you use this package in academic work, it can be cited with:

citation("congressbr")

which will give you:

To cite package ‘congressbr’ in publications use:  Robert Myles McDonnell, Guilherme Jardim Duarte and Danilo Freire (2017). congressbr:  Downloads, Unpacks and Tidies Legislative Data from the Brazilian Federal Senate and  Chamber of Deputies. R package version 0.1.0.  https://CRAN.R-project.org/package=congressbrA BibTeX entry for LaTeX users is  @Manual{,    title = {congressbr: Downloads, Unpacks and Tidies Legislative Data from theBrazilian Federal Senate and Chamber of Deputies},    author = {Robert Myles McDonnell and Guilherme Jardim Duarte and Danilo Freire},    year = {2017},    note = {R package version 0.1.0},    url = {https://CRAN.R-project.org/package=congressbr},  }

List of functions

For convenience, we list here the functions of the package. More detailsare availablehere.Note: The information returned by some of the functions below is nolonger available from the API. Hopefully in a future release, we’ll beable to re-include these functions. (Functions are marked bystrikethrough text.)

  • cham_bills: Downloads and tidies data for lists of bills inBrazilian Chamber of Deputies.
  • cham_bill_info: Downloads details of a specific bill by providingtype, number and year.
  • cham_bill_info_id: Downloads details of a specific bill byproviding id of a bill.
  • cham_plenary_bills: This function lists every bill voted on in theplenary.
  • cham_typeauthors_bills: Types of authors for bills.
  • cham_votes: Downloads votes of a specific bill by providing type,number and year. A bill can have more than one roll call, and theAPI does not provide an id to identify them So we provide one(rollcall_id).
  • sen_agenda: Returns info on the agenda in the Federal Senate.
  • sen_bills: Information on the legislation in the Federal Senate.
  • sen_bills_current: Downloads and tidies information on legislationfrom thecurrent legislature of the Federal Senate.
  • sen_bills_limits: Downloads and tidies information on the types ofdeadline and time limits for legislation in the Federal Senate.
  • sen_bills_list: Information on the types of acts that can beformally made in the Federal Senate.
  • sen_bills_locations: Downloads and tidies information on thepossible locations a piece of legislation can currently be passingthrough the Federal Senate.
  • sen_bills_passage: Downloads and tidies information on thelocations a piece of legislation is currently passing through.
  • sen_bills_passing: Downloads and tidies information on legislationthat is currently under consideration in the Senate.
  • sen_bills_situations: Possible situations a bill can be in.
  • sen_bills_topics: Downloads and tidies information on the topicsof legislation in the Federal Senate.
  • sen_bills_types: Information on the types of legislation in theSenate.
  • sen_bills_updates: Info on bills that have been recently updated.
  • sen_bills_update_types: Information on the types of updates thatcan be applied to bills in the Federal Senate.
  • sen_bill_search: Search for data on legislation in the BrazilianFederal Senate.
  • sen_bill_sponsors: Bill sponsors in the Senate.
  • sen_budget: Downloads and tidies budget information from theFederal Senate.
  • sen_coalitions: Downloads and tidies data on the coalitions in theFederal Senate
  • sen_coalition_info: Downloads and tidies data onspecificcoalitions in the Federal Senate.
  • sen_commissions: Information on commissions in the Senate.
  • sen_commissions_senators: Information on the senators who serve ona certain commission in the Federal Senate.
  • sen_commissions_type: Information on commissions in the FederalSenate, by commission type.
  • sen_commission_positions: Information on positions (jobs) thatlegislators may occupy in commissions in the Federal Senate
  • sen_parties: Downloads and tidies information on the politicalparties in the Federal Senate.
  • sen_plenary_agenda: Returns results from the plenary in theFederal Senate for a specified date.
  • sen_plenary_leaderships: Returns information on leaderships in theFederal Senate.
  • sen_plenary_result: Returns results from the plenary in theFederal Senate for a specified date.
  • sen_plenary_sessions: Returns the types of sessions in the FederalSenate.
  • sen_senator: Downloads and tidies personal information onsenators. Includes absences and mandates.
  • sen_senator_bills: Downloads and tidies information on billsthat certain senators have sponsored/authored in the Senate.
  • sen_senator_commissions: Downloads and tidies information on thecommissions on which senators have served or are serving in theFederal Senate.
  • sen_senator_details: Downloads and tidies personal information onthe senators.
  • sen_senator_legis: Downloads and tidies information on thesenators, by legislature.
  • sen_senator_list: Returns a list of senators.
  • sen_senator_mandates: Downloads and tidies information onsenators’ mandates.
  • sen_senator_suplentes: Downloads and tidies information on titularsenators and theirsuplentes.
  • sen_senator_votes: Returns information on senators’ votinghistories.
  • sen_sponsor_types: Types of bill sponsors.
  • sen_statement_list: Types of declarations senators can make.
  • sen_votes: Returns voting information from the Senate floor forthe date requested.
  • statesBR: A dataframe of Brazilian states, by their sigla(acronym) and full name.
  • UF: This function prints out a character vector of Brazilian stateabbreviations to the console.

About

An R package that returns tidy data from the APIs of the Brazilian Federal Senate and Chamber of Deputies.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp