Learn R Programming

rcongresso (version 0.4.6)

fetch_partido: Fetches parties from API using a query.

Description

Returns a list containing basic information about parties which has or had been any deputy in the lower house. If none parameters are passed, the function returns the parties which has active deputies on that moment.

Usage

fetch_partido(id = NULL, sigla = NULL, dataInicio = NULL,
  dataFim = NULL, idLegislatura = NULL, itens = NULL, ordenarPor = NULL)

Arguments

id

Party's ID

sigla

Party's abbreviation

dataInicio

Party's processing starting date

dataFim

Party's processing end date

idLegislatura

Legislature's number

itens

Items quantity. '-1' returns all parties which have deputies at the request moment

ordenarPor

Order by: 'id', 'sigla' or 'nome'

Value

Dataframe containing information about the parties.

Details

Note that if you have the party's ID, it's not necessary to add any other parameter on the function call. The call to this function using the party's ID returns more details than using the others parameters. If you don't have the party's ID, the fetch_id_partido function may be helpful.

See Also

get_votos_partidos, fetch_orientacoes

Examples

Run this code
# NOT RUN {
PMB <- fetch_partido(id = 36887)
PT <- fetch_partido(sigla = "PT")
partidos2010a2014 <- fetch_partido(dataInicio = "2010-01-01", dataFim = "2014-12-31", itens = 100)
# }

Run the code above in your browser using DataLab