Description Usage Arguments Value Examples
president()
extracts data of Brazilian presidential polls from the
Poder 360's poll agreggator API
(https://www.poder360.com.br/pesquisas-de-opiniao/api/). The function
returns a data.frame
where each observation corresponds to a
candidate's estimate in a poll.
1 |
year |
Election year ( |
state |
Initials in capital letters ( |
round |
Number ( |
type |
Number ( |
data.frame
with results from polls conducted for presidential
elections in Brazil, for the year
specified, with the following
variables:
pesquisa_id: id number for each poll.
ano: election year to which the poll corresponds to.
unidades_federativas_id: id number for the federative unit where the poll was conducted.
unidade_federativa_nome: the name of the federative unit where the poll was conducted (if the poll was conducted on national-level, this variable assumes the value of "BRASIL").
cargos_id: id number for the position polled.
cargo: name of the position polled.
tipo_id: id number for type of poll.
tipo: type of poll.
turno: indicates if election polled was a 1st round or 2nd round one.
data_pesquisa: poll date ("YYYY-MM-DD").
instituto_id: id number for the institute which conducted the poll.
instituto: name of the institute which conducted the poll.
voto_tipo: indicates if the estimate relates to total votes ("Votos Totais") or valid votes ("Votos VĂ¡lidos").
cenario_id: id number for the candidates' scenario that was polled.
cenario_descricao: description of the candidates' scenario that was polled.
candidatos_id: candidate's id number.
candidato_partido: candidate's name and party affiliation.
candidato: candidate's name.
ano_default: indicates the year-position that the candidate ran.
condicao: indicate if it's a candidate (0) or a broad category (such as null and/or blank vote, would vote for all, etc.)
percentual: vote estimate for the candidate in the poll, in percentage points.
data_referencia: poll's reference date ("DD-DD.MM.YYYY")
margem_mais: estimate of the poll's margin of error upper limit.
margem_menos: estimate of the poll's margin of error lower limit.
contratante: indicates who hired the poll.
num_registro: poll's register number in the Brazilian Electoral Courts.
orgao_registro: Brazilian Electoral Court where the poll was registered.
qtd_entrevistas: number of interviews conducted in the poll (poll's sample size).
partidos_id: candidate's party id number.
partido: candidate's party abbreviated name.
cidade: city where the poll was conducted.
1 2 3 4 5 6 7 8 | # returns a data.frame with the results for all presidential polls conducted
# in the 2018 elections
df <- president(2018)
# returns a data.frame with results for all presidential polls conducted at
# the national-level for the first round of the 2018 elections with candidate's
# rejection estimates
df <- president(2018, state = "BR", round = 1, type = 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.