silvadenisson / electionsBR

65 stars 19 forks source link

Empty dataframe for senate results 2002 #11

Closed RobertMyles closed 6 years ago

RobertMyles commented 6 years ago

Hi folks,

This code:

> res_sen_02 <- legislative_mun_vote(2002, house = "senate", prop = TRUE,
+                                    ascii = TRUE, encoding = "Latin-1")
trying URL 'http://agencia.tse.jus.br/estatistica/sead/odsele/votacao_partido_munzona/votacao_partido_munzona_2002.zip'
Content type 'application/zip' length 3265909 bytes (3.1 MB)
downloaded 3.1 MB

Done.

Returns this dataframe:

> head(res_sen_02)
# A tibble: 0 x 10
# ... with 10 variables: ANO_ELEICAO <chr>, SIGLA_UF <chr>, CODIGO_MUNICIPIO <chr>, NOME_MUNICIPIO <chr>,
#   SIGLA_PARTIDO <chr>, NOME_PARTIDO <chr>, NUMERO_PARTIDO <chr>, NOME_COLIGACAO <chr>,
#   COMPOSICAO_LEGENDA <chr>, TOTAL_VOTOS <dbl>

Works fine for all the other years available.

meirelesff commented 6 years ago

Hi, @RobertMyles. I checked the issue, and the problem has to do with the TSE's data -- the current version of the file the function downloads is missing data on senate races. I think this closes the issue, but feel free to point out any other problems. Best.