Description Usage Arguments Details Value Examples
tseGetFinalAccountability
Gets brazilian accountability data from the brazilian
Supreme Electoral Court (TSE - Tribunal Superior Eleitoral) which is freely available
from it's [site]http://www.tse.jus.br/eleicoes.
1 2 3 4 5 | tseGetFinalAccountability(srcLocation = NULL, srcLocationType = "file",
destLocation = NULL, electionType = "",
accountabilityType = "Party_Incomes", federativeBody = "BR",
sinceYear = NA, year = NA, extractZip = F, encoding = "windows-1252",
dataBaseEnvir)
|
srcLocation |
Source location: Depending the value of the |
srcLocationType |
Source Location Type: can assume any of the following values: |
destLocation |
Detination location: should point to a local folder in which the data files will be
stored after download or extraction. This is an optional parameter. If left unassigned, the destination
will be assumed to be the same as |
electionType |
Election Type: there are two types od |
year |
Election year ( |
encoding |
Data original encoding (defaults to 'windows-1252'). This can be changed to avoid errors
when |
The function can download the requested data, extract the csv files from the
zipped downloaded file and appropriately read the csv files in accordance with it's
layout which is described in a pdf file bundled in the same zipped file.
Alternatively it can skip the first (downloading) step and second (zip file extraction)
and head straight to the final steps (conversion of the csv files to an R
data.frame
).
voter_profile()
returns a data.frame
with the following variables:
A
B
C
D
E
F
G
H
i
1 2 3 4 5 6 7 8 | ## Not run:
dfBaseAP <- tseGetFinalAccountability(
srcLocationType = 'folder',
srcLocation = "G:/Contas_TSE",
accountabilityType = "Despesas_Partidos",
federativeBody = "AP", year = 2016)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.