### Example: download party_mun_zone data for 2002 Source: https://electionsbr.com/novo/reference/party_mun_zone.html Example call to party_mun_zone(2002) wrapped in a dontrun block. The example is not run by default. ```r if (FALSE) { # \dontrun{ df <- party_mun_zone(2002) } # } ``` -------------------------------- ### Example: calling candidate_fed() Source: https://electionsbr.com/novo/reference/candidate_fed.html Example usage of candidate_fed() wrapped in a dontrun block, showing how to download candidate data for the year 2000. The example is not run by default. ```r if (FALSE) { # \dontrun{ df <- candidate_fed(2000) } # } ``` -------------------------------- ### Install pre-release electionsBR from GitHub Source: https://electionsbr.com/novo/index.html Installs the development version of electionsBR from GitHub using devtools. Requires devtools if not already installed. ```r if (!require("devtools")) install.packages("devtools") devtools::install_github("silvadenisson/electionsBR") ``` -------------------------------- ### Example: Download data for 2002 Source: https://electionsbr.com/novo/reference/party_mun_zone_fed.html Example call to party_mun_zone_fed() for the year 2002. Wrapped in if (FALSE) to avoid running during package checks. ```r if (FALSE) { # \dontrun{ df <- party_mun_zone_fed(2002) } # } ``` -------------------------------- ### Example: Download personal finances for 2006 Source: https://electionsbr.com/novo/reference/personal_finances.html Example call to personal_finances() for the 2006 election. Wrapped in \dontrun{} to prevent execution during package checks. ```r if (FALSE) { # \dontrun{ df <- personal_finances(2006) } # } ``` -------------------------------- ### Example: vote_mun_zone(2002) Source: https://electionsbr.com/novo/reference/vote_mun_zone.html Example call to download data for the 2002 election. Wrapped in if (FALSE) to prevent execution during package checks. ```r if (FALSE) { # \dontrun{ df <- vote_mun_zone(2002) } # } ``` -------------------------------- ### Example: download candidate data for 2000 Source: https://electionsbr.com/novo/reference/candidate_local.html Example usage of candidate_local() to download candidate data for the 2000 local elections. The example is wrapped in a dontrun block, indicating it should not be run automatically. ```r if (FALSE) { # \dontrun{ df <- candidate_local(2000) } # } ``` -------------------------------- ### Example: download federal election verification data for 2002 Source: https://electionsbr.com/novo/reference/details_mun_zone_fed.html Example usage of details_mun_zone_fed() to download data for the year 2002. The example is wrapped in a dontrun block, so it is not executed by default. ```r if (FALSE) { # \dontrun{ df <- details_mun_zone_fed(2002) } # } ``` -------------------------------- ### Example: Download candidate data for 2002 Source: https://electionsbr.com/novo/reference/candidate.html Example call to candidate() for the 2002 election. Wrapped in if (FALSE) to avoid running during package checks. ```r if (FALSE) { # \dontrun{ df <- candidate(2002) } # } ``` -------------------------------- ### Example: Download seats data for 2000 Source: https://electionsbr.com/novo/reference/seats_fed.html Example usage of seats_fed() to download data for the year 2000. The example is wrapped in a dontrun block, indicating it should not be run automatically. ```r if (FALSE) { # \dontrun{ df <- seats_fed(2000) } # } ``` -------------------------------- ### Example: Download data for 2000 local elections Source: https://electionsbr.com/novo/reference/party_mun_zone_local.html Example usage of party_mun_zone_local() to download data for the year 2000. The example is wrapped in a dontrun block, indicating it should not be run automatically. The function returns a data.frame with one observation per city/zone. ```r if (FALSE) { # \dontrun{ df <- party_mun_zone_local(2000) } # } ``` -------------------------------- ### Example: Download seats data for 2000 Source: https://electionsbr.com/novo/reference/seats_local.html Example call to seats_local() for the year 2000. Wrapped in if (FALSE) to avoid running during package checks. ```r if (FALSE) { # \dontrun{ df <- seats_local(2000) } # } ``` -------------------------------- ### Example: download local election coalition data for 2000 Source: https://electionsbr.com/novo/reference/legend_local.html Example usage of legend_local() to download data for the year 2000. The example is wrapped in a dontrun block, indicating it should not be run automatically. ```r if (FALSE) { # \dontrun{ df <- legend_local(2000) } # } ``` -------------------------------- ### Example: Download voter profile by section for 2016 Source: https://electionsbr.com/novo/reference/voter_profile_by_section.html Example usage wrapped in if (FALSE) to avoid running during package checks. Downloads voter profile data for the 2016 election. ```R if (FALSE) { # \dontrun{ df <- voter_profile_by_section(2016) } # } ``` -------------------------------- ### Example: parties_br(2002) Source: https://electionsbr.com/novo/reference/parties_br.html Example call to `parties_br` for the 2002 election, wrapped in a `\dontrun` block so it is not executed during package checks. ```r if (FALSE) { # \dontrun{ parties_election2002 <- parties_br(2002) } # } ``` -------------------------------- ### Example: vote_mun_zone_local(2000) Source: https://electionsbr.com/novo/reference/vote_mun_zone_local.html Example call to download local election data for the year 2000. Wrapped in \dontrun{} to prevent execution during package checks. ```r if (FALSE) { # \dontrun{ df <- vote_mun_zone_local(2000) } # } ``` -------------------------------- ### Example: Download federal election coalition data for 2002 Source: https://electionsbr.com/novo/reference/legend_fed.html Example usage of legend_fed() to download data for the year 2002. The example is wrapped in a dontrun block, indicating it should not be run automatically. ```r if (FALSE) { # \dontrun{ df <- legend_fed(2002) } # } ``` -------------------------------- ### Example: Download federal candidates' personal financial disclosures for 2006 Source: https://electionsbr.com/novo/reference/personal_finances_fed.html Example usage of personal_finances_fed() to download data for the 2006 election. Wrapped in if (FALSE) to avoid execution during package checks. ```r if (FALSE) { # \dontrun{ df <- personal_finances_fed(2006) } # } ``` -------------------------------- ### Example: Download local financial disclosures for 2000 Source: https://electionsbr.com/novo/reference/personal_finances_local.html Example usage wrapped in \dontrun to prevent execution. Downloads data for the year 2000 and assigns to df. ```r if (FALSE) { # \dontrun{ df <- personal_finances_local(2000) } # } ``` -------------------------------- ### Example: Download local election results for 2000 Source: https://electionsbr.com/novo/reference/vote_section_local.html Example call to vote_section_local() for the year 2000. Wrapped in \dontrun{} to avoid execution during package checks. ```r if (FALSE) { # \dontrun{ df <- vote_section_local(2000) } # } ``` -------------------------------- ### Example: download candidates' data for 2018 Source: https://electionsbr.com/novo/reference/elections_rda.html Example call to elections_rda(2018) wrapped in a dontrun block, indicating it should not be run automatically. ```r if (FALSE) { # \dontrun{ df <- elections_rda(2018) } # } ``` -------------------------------- ### Install electionsBR from CRAN Source: https://electionsbr.com/novo/index.html Installs the stable version of the electionsBR package from CRAN. ```r install.packages("electionsBR") ``` -------------------------------- ### Example: Download 2002 federal election coalition data Source: https://electionsbr.com/novo/reference/legends.html Example call to legends() to download data for the 2002 federal election. The example is wrapped in a dontrun block, so it is not executed during package checks. The result is stored in a data frame named df. ```r if (FALSE) { # \dontrun{ df <- legends(2002) } # } ``` -------------------------------- ### Example: Download candidate data for 2024 Source: https://electionsbr.com/novo/reference/candidate_add_infor.html Example usage wrapped in a dontrun block, downloading candidate data for the year 2024. ```r if (FALSE) { # \dontrun{ df <- candidate_add_infor(2024) } # } ``` -------------------------------- ### Example: Download social media data for 2022 Source: https://electionsbr.com/novo/reference/social_media.html Example usage of social_media() to download data for the 2022 election. Wrapped in if (FALSE) to prevent execution during package checks. ```r if (FALSE) { # \dontrun{ df <- social_media(2022) } # } ``` -------------------------------- ### Example: download 2002 election data Source: https://electionsbr.com/novo/reference/details_mun_zone.html Example usage of details_mun_zone() to download data for the 2002 election. Wrapped in \dontrun{} to prevent execution during package checks. ```r if (FALSE) { # \dontrun{ df <- details_mun_zone(2002) } # } ``` -------------------------------- ### Example: Download 2002 election data Source: https://electionsbr.com/novo/reference/vote_section.html Example call to vote_section() for the 2002 election. Wrapped in if (FALSE) to prevent execution during package checks. ```r if (FALSE) { # \dontrun{ df <- vote_section(2002) } # } ``` -------------------------------- ### Example: retrieve presidential candidates for 2018 Source: https://electionsbr.com/novo/reference/elections_cepesp.html Example call to elections_cepesp for 2018 presidential candidates. Wrapped in if (FALSE) to prevent execution during package checks. ```R if (FALSE) { # \dontrun{ df <- elections_cepesp(2018, type = "candidate", position = "President") } # } ``` -------------------------------- ### Example: Download 2002 federal election results Source: https://electionsbr.com/novo/reference/vote_section_fed.html Example usage wrapped in a dontrun block. Downloads data for the 2002 election for the default state (AC). The if (FALSE) wrapper prevents execution during package checks. ```r if (FALSE) { # \dontrun{ df <- vote_section_fed(2002) } # } ``` -------------------------------- ### Example: details_mun_zone_local(2000) Source: https://electionsbr.com/novo/reference/details_mun_zone_local.html Downloads data for the 2000 local elections. This example is wrapped in a dontrun block, so it is not executed by default. The function returns a data.frame with one observation per town/zone. ```r if (FALSE) { # \dontrun{ df <- details_mun_zone_local(2000) } # } ``` -------------------------------- ### Download candidate data for 2002 elections Source: https://electionsbr.com/novo/reference/elections_tse.html Example usage of elections_tse() to download candidate data for the 2002 elections. Wrapped in if (FALSE) to prevent execution during package checks. ```r if (FALSE) { # \dontrun{ # Download data on the candidates in the 2002 elections cands <- elections_tse(2002, type = "candidate") } # } ``` -------------------------------- ### Example: seats(2000) Source: https://electionsbr.com/novo/reference/seats.html Example usage of the seats() function. The code is wrapped in \dontrun{} and is not executed. Note that the year 2000 is not in the list of available years (1998, 2002, 2006, 2010, 2014, 2018, 2022, 2024). ```r if (FALSE) { # \dontrun{ df <- seats(2000) } # } ``` -------------------------------- ### Download presidential election results with br_archive Source: https://electionsbr.com/novo/index.html Downloads vote data for the 2022 presidential election using the br_archive argument to get a single file from TSE. ```r df <- elections_tse(year = 2022, type = "vote_mun_zone", br_archive = TRUE) ``` -------------------------------- ### voter_profile function usage Source: https://electionsbr.com/novo/reference/voter_profile.html Call voter_profile() with a year to download voter profile data. The example is wrapped in if (FALSE) to prevent execution during checks. ```R voter_profile(year, encoding = "windows-1252", temp = TRUE, readme_pdf = FALSE) ``` ```R if (FALSE) { # \dontrun{ df <- voter_profile(2002) } # } ``` -------------------------------- ### Download 2002 federal election data Source: https://electionsbr.com/novo/reference/vote_mun_zone_fed.html Example call to vote_mun_zone_fed() for the 2002 election. Wrapped in \dontrun{} to prevent execution during package checks. The result is assigned to df. ```r if (FALSE) { # \dontrun{ df <- vote_mun_zone_fed(2002) } # } ``` -------------------------------- ### candidate() Source: https://electionsbr.com/novo/reference/index.html Download data on the candidates' backgrounds in elections. ```APIDOC ## candidate() ### Description Download data on the candidates' backgrounds in elections. ### Usage ```r candidate() ``` ``` -------------------------------- ### personal_finances() Source: https://electionsbr.com/novo/reference/index.html Download data on federal candidates' personal financial disclosures. ```APIDOC ## personal_finances() ### Description Download data on federal candidates' personal financial disclosures. ### Usage ```r personal_finances() ``` ``` -------------------------------- ### elections_rda() Source: https://electionsbr.com/novo/reference/index.html Download data on the candidates' background in local elections. ```APIDOC ## elections_rda() ### Description Download data on the candidates' background in local elections. ### Usage ```r elections_rda() ``` ``` -------------------------------- ### candidate_local() Source: https://electionsbr.com/novo/reference/index.html Download data on the candidates' background in local elections. Deprecated. ```APIDOC ## candidate_local() ### Description Download data on the candidates' background in local elections. Deprecated. ### Usage ```r candidate_local() ``` ``` -------------------------------- ### details_mun_zone() Source: https://electionsbr.com/novo/reference/index.html Download data on the verification of federal elections in Brazil. ```APIDOC ## details_mun_zone() ### Description Download data on the verification of federal elections in Brazil. ### Usage ```r details_mun_zone() ``` ``` -------------------------------- ### candidate_add_infor() Source: https://electionsbr.com/novo/reference/candidate_add_infor.html Downloads and aggregates data on the candidates' background who ran in elections in Brazil. Returns a data.frame where each observation corresponds to a candidate. ```APIDOC ## candidate_add_infor() ### Description Downloads and aggregates data on the candidates' background who ran in elections in Brazil. Returns a data.frame where each observation corresponds to a candidate. ### Usage ```r candidate_add_infor( year, uf = "all", br_archive = FALSE, encoding = "latin1", temp = TRUE, readme_pdf = FALSE ) ``` ### Arguments - **year** (integer) - Required - Election year. For this function, only the year 2024 is available. - **uf** (character vector) - Optional - Federation Unit acronym. Defaults to "all". - **br_archive** (logical) - Optional - If TRUE, loads a single file for the whole country when available. May not work for some elections and may only recover presidential data in others. - **encoding** (character) - Optional - Data original encoding. Defaults to 'latin1'. Can be changed to avoid errors when `ascii = TRUE`. - **temp** (logical) - Optional - Temporary flag. - **readme_pdf** (logical) - Optional - Original readme flag. ### Value Returns a `tbl, data.frame` with variables related to candidate background. ### Details If export is set to `TRUE`, the downloaded data is saved as .dta and .sav files in the current directory. ### Note For elections prior to 2024, this function is not applicable. ### Examples ```r if (FALSE) { # \dontrun{ df <- candidate_add_infor(2024) } # } ``` ``` -------------------------------- ### details_mun_zone_local(year, uf = "all", encoding = "latin1", temp = TRUE) Source: https://electionsbr.com/novo/reference/details_mun_zone_local.html Downloads and aggregates data on the verification of local elections in Brazil, disaggregated by electoral zone. Returns a data.frame where each observation corresponds to a town/zone. ```APIDOC ## details_mun_zone_local(year, uf = "all", encoding = "latin1", temp = TRUE) ### Description Downloads and aggregates data on the verification of local elections in Brazil, disaggregated by electoral zone. Returns a data.frame where each observation corresponds to a town/zone. ### Usage ```r details_mun_zone_local(year, uf = "all", encoding = "latin1", temp = TRUE) ``` ### Arguments - **year** (numeric) - Required - Election year. Available years: 1996, 2000, 2004, 2008, 2012, 2016, 2020. - **uf** (character vector) - Optional - Federation Unit acronym. Defaults to "all". - **encoding** (character) - Optional - Data original encoding. Defaults to 'Latin-1'. Can be changed to avoid errors when `ascii = TRUE`. - **temp** (logical) - Optional - Indicates whether to use temporary files. Defaults to TRUE. ### Value Returns a `data.frame` with variables related to the verification of local elections. ### Details If export is set to `TRUE`, the downloaded data is saved as .dta and .sav files in the current directory. ### Note For elections prior to 2000, some information can be incomplete. ### Examples ```r if (FALSE) { # \dontrun{ df <- details_mun_zone_local(2000) } # } ``` ``` -------------------------------- ### party_mun_zone() Source: https://electionsbr.com/novo/reference/index.html Download data on the polls by parties from federal elections in Brazil. ```APIDOC ## party_mun_zone() ### Description Download data on the polls by parties from federal elections in Brazil. ### Usage ```r party_mun_zone() ``` ``` -------------------------------- ### candidate_local(year, uf = "all", encoding = "latin1", temp = TRUE) Source: https://electionsbr.com/novo/reference/candidate_local.html Downloads and aggregates data on the candidates' background who competed in local elections in Brazil. Returns a data.frame where each observation corresponds to a candidate. ```APIDOC ## candidate_local(year, uf = "all", encoding = "latin1", temp = TRUE) ### Description Downloads and aggregates data on the candidates' background who competed in the local elections in Brazil. The function returns a `data.frame` where each observation corresponds to a candidate. ### Usage ```r candidate_local(year, uf = "all", encoding = "latin1", temp = TRUE) ``` ### Arguments - **year** (numeric) - Required - Election year. Available years: 1996, 2000, 2004, 2008, 2012, 2016, 2020, and 2024. - **uf** (character vector) - Optional - Federation Unit acronym. Defaults to "all". - **encoding** (character) - Optional - Data original encoding. Defaults to 'latin1'. Can be changed to avoid errors when `ascii = TRUE`. - **temp** (logical) - Optional - Whether to use temporary files. Defaults to TRUE. ### Value Returns a `data.frame` with variables related to candidates' background. ### Details If export is set to `TRUE`, the downloaded data is saved as .dta and .sav files in the current directory. ### Note For elections prior to 2000, some information can be incomplete. ### Examples ```r if (FALSE) { # \dontrun{ df <- candidate_local(2000) } # } ``` ``` -------------------------------- ### candidate_add_infor() Source: https://electionsbr.com/novo/reference/index.html Downloads data on the candidates - Additional information. ```APIDOC ## candidate_add_infor() ### Description Downloads data on the candidates - Additional information. ### Usage ```r candidate_add_infor() ``` ``` -------------------------------- ### personal_finances_local() Source: https://electionsbr.com/novo/reference/index.html Download data on local candidates' personal financial disclosures. Deprecated. ```APIDOC ## personal_finances_local() ### Description Download data on local candidates' personal financial disclosures. Deprecated. ### Usage ```r personal_finances_local() ``` ``` -------------------------------- ### Function usage: personal_finances_local() Source: https://electionsbr.com/novo/reference/personal_finances_local.html Shows the function signature with arguments year, uf, encoding, and temp. Only years 1996, 2000, 2004, 2008, 2012, 2016, 2020, and 2024 are available. Default encoding is 'latin1' and temp defaults to TRUE. ```r personal_finances_local(year, uf = "all", encoding = "latin1", temp = TRUE) ``` -------------------------------- ### legends() Source: https://electionsbr.com/novo/reference/index.html Download data on federal election coalitions in Brazil. ```APIDOC ## legends() ### Description Download data on federal election coalitions in Brazil. ### Usage ```r legends() ``` ``` -------------------------------- ### candidate_fed() Source: https://electionsbr.com/novo/reference/index.html Download data on the candidates' background in federal elections. Deprecated. ```APIDOC ## candidate_fed() ### Description Download data on the candidates' background in federal elections. Deprecated. ### Usage ```r candidate_fed() ``` ``` -------------------------------- ### Usage of party_mun_zone_fed() Source: https://electionsbr.com/novo/reference/party_mun_zone_fed.html Shows the function signature with its arguments: year, uf, br_archive, encoding, and temp. The year argument only accepts 1994, 1998, 2002, 2006, 2010, 2014, 2018, and 2022. ```r party_mun_zone_fed( year, uf = "all", br_archive = FALSE, encoding = "latin1", temp = TRUE ) ``` -------------------------------- ### List party abbreviations with parties_br() Source: https://electionsbr.com/novo/articles/introduction.html Calls parties_br(year) to obtain a list of party abbreviations. The year argument is required. ```R parties_br(year) ``` -------------------------------- ### candidate(year, uf, br_archive, encoding, temp, readme_pdf) Source: https://electionsbr.com/novo/reference/candidate.html Downloads and aggregates data on the candidates' backgrounds in Brazilian elections. Returns a data.frame where each observation corresponds to a candidate. ```APIDOC ## candidate(year, uf, br_archive, encoding, temp, readme_pdf) ### Description Downloads and aggregates data on the candidates' backgrounds in Brazilian elections. Returns a data.frame where each observation corresponds to a candidate. ### Usage ```r candidate( year, uf = "all", br_archive = FALSE, encoding = "latin1", temp = TRUE, readme_pdf = FALSE ) ``` ### Arguments - **year** (integer) - Required - Election year. Available years: 1994, 1998, 2002, 2006, 2010, 2014, 2018, 2022, 2024. - **uf** (character vector) - Optional - Federation Unit acronym. Defaults to "all". - **br_archive** (logical) - Optional - If TRUE, loads a single file for the whole country when available. May not work for some elections and may only recover presidential election data in others. - **encoding** (character) - Optional - Data original encoding. Defaults to 'latin1'. Can be changed to avoid errors when `ascii = TRUE`. - **temp** (logical) - Optional - Temporary flag. - **readme_pdf** (logical) - Optional - Original readme flag. ### Value Returns a `tbl, data.frame` with variables related to candidates' backgrounds. ### Details If export is set to `TRUE`, the downloaded data is saved as .dta and .sav files in the current directory. ### Note For elections prior to 2002, some information can be incomplete. For the 2014 and 2018 elections, more variables are available. ### Examples ```r if (FALSE) { # \dontrun{ df <- candidate(2002) } # } ``` ``` -------------------------------- ### details_mun_zone() Source: https://electionsbr.com/novo/reference/details_mun_zone.html Downloads and aggregates data on the verification of federal elections in Brazil, disaggregated by town and electoral zone. Returns a data.frame where each observation corresponds to a town/zone. ```APIDOC ## details_mun_zone() ### Description Downloads and aggregates data on the verification of federal elections in Brazil, disaggregated by town and electoral zone. The function returns a `data.frame` where each observation corresponds to a town/zone. ### Usage r details_mun_zone( year, uf = "all", br_archive = FALSE, encoding = "latin1", temp = TRUE, readme_pdf = FALSE ) ### Arguments - **year** (numeric) - Required - Election year. For this function, only the years 1994, 1998, 2002, 2006, 2010, 2014, 2018, 2022, 2024 are available. - **uf** (character vector) - Optional - Federation Unit acronym. Defaults to "all". - **br_archive** (logical) - Optional - In the TSE's data repository, some results can be obtained for the whole country by loading a single file by setting this argument to `TRUE` (may not work for some elections and, in others, it recovers only electoral data for presidential elections, absent in other files). - **encoding** (character) - Optional - Data original encoding (defaults to 'Latin-1'). This can be changed to avoid errors when `ascii = TRUE`. - **temp** (logical) - Optional - temp. - **readme_pdf** (logical) - Optional - original readme. ### Value `details_mun_zone()` returns a `data.frame`. ### Details If export is set to `TRUE`, the downloaded data is saved as .dta and .sav files in the current directory. ### Note For the elections prior to 2002, some information can be incomplete. For the 2014, 2018, 2022 and 2024 elections, more variables are available. ### Examples r if (FALSE) { # \dontrun{ df <- details_mun_zone(2002) } # } ``` -------------------------------- ### social_media(year, encoding = "latin1", temp = TRUE, readme_pdf = FALSE) Source: https://electionsbr.com/novo/reference/social_media.html Downloads data on the social media handles of candidates participating in federal and municipal elections in Brazil. Returns a data.frame where each observation corresponds to a candidate's social media handles. ```APIDOC ## social_media(year, encoding = "latin1", temp = TRUE, readme_pdf = FALSE) ### Description Downloads data on the social media handles of candidates participating in federal and municipal elections in Brazil. The function returns a data.frame where each observation corresponds to a candidate's social media handles (i.e., usernames). ### Usage r social_media(year, encoding = "latin1", temp = TRUE, readme_pdf = FALSE) ### Arguments - **year** (integer) - Required - Election year. Only the years 2020, 2022, and 2024 are available. - **encoding** (character) - Optional - Data original encoding (defaults to 'latin1'). This can be changed to avoid errors when `ascii = TRUE`. - **temp** (logical) - Optional - Whether to keep the temporary data files for future use (recommended). - **readme_pdf** (logical) - Optional - Should the original README file be saved as a PDF in the working directory? Defaults to FALSE. ### Value Returns a `tbl, data.frame`. ### Details If export is set to `TRUE`, the downloaded data is saved as .dta and .sav files in the current directory. ### Examples r if (FALSE) { # \dontrun{ df <- social_media(2022) } # } ``` -------------------------------- ### candidate_add_infor function usage Source: https://electionsbr.com/novo/reference/candidate_add_infor.html Shows the function signature with its arguments: year, uf, br_archive, encoding, temp, and readme_pdf. Only the year 2024 is available for this function. ```r candidate_add_infor( year, uf = "all", br_archive = FALSE, encoding = "latin1", temp = TRUE, readme_pdf = FALSE ) ``` -------------------------------- ### details_mun_zone_local() Source: https://electionsbr.com/novo/reference/index.html Download data on the verification of local elections in Brazil. Deprecated. ```APIDOC ## details_mun_zone_local() ### Description Download data on the verification of local elections in Brazil. Deprecated. ### Usage ```r details_mun_zone_local() ``` ``` -------------------------------- ### vote_mun_zone() function usage Source: https://electionsbr.com/novo/reference/vote_mun_zone.html Shows the function signature with all arguments and defaults. Use this to call vote_mun_zone() with custom parameters. ```r vote_mun_zone( year, uf = "all", br_archive = FALSE, encoding = "latin1", temp = TRUE, readme_pdf = FALSE ) ``` -------------------------------- ### candidate() function signature Source: https://electionsbr.com/novo/reference/candidate.html Shows the usage of the candidate() function with its default arguments. The function downloads and aggregates data on candidates' backgrounds in Brazilian elections. ```r candidate( year, uf = "all", br_archive = FALSE, encoding = "latin1", temp = TRUE, readme_pdf = FALSE ) ``` -------------------------------- ### vote_mun_zone() Source: https://electionsbr.com/novo/reference/index.html Download data on candidate electoral results in federal elections in Brazil. ```APIDOC ## vote_mun_zone() ### Description Download data on candidate electoral results in federal elections in Brazil. ### Usage ```r vote_mun_zone() ``` ``` -------------------------------- ### party_mun_zone_local() Source: https://electionsbr.com/novo/reference/index.html Download data on the polls by parties from local elections in Brazil. Deprecated. ```APIDOC ## party_mun_zone_local() ### Description Download data on the polls by parties from local elections in Brazil. Deprecated. ### Usage ```r party_mun_zone_local() ``` ``` -------------------------------- ### candidate_fed() Source: https://electionsbr.com/novo/reference/candidate_fed.html Downloads and aggregates data on candidates' background who competed in federal elections in Brazil. Returns a data.frame where each observation corresponds to a candidate. ```APIDOC ## candidate_fed() ### Description Downloads and aggregates data on the candidates' background who competed in the federal elections in Brazil. The function returns a `data.frame` where each observation corresponds to a candidate. ### Usage ```r candidate_fed( year, uf = "all", br_archive = FALSE, encoding = "latin1", temp = TRUE ) ``` ### Arguments - **year** (numeric) - Required - Election year. For this function, only the years 1994, 1998, 2002, 2006, 2010, 2014, 2018, and 2022 are available. - **uf** (character vector) - Optional - Federation Unit acronym. Defaults to "all". - **br_archive** (logical) - Optional - In the TSE's data repository, some results can be obtained for the whole country by loading a single file by setting this argument to `TRUE` (may not work for some elections and, in others, it recovers only electoral data for presidential elections, absent in other files). Defaults to `FALSE`. - **encoding** (character) - Optional - Data original encoding (defaults to 'latin1'). This can be changed to avoid errors when `ascii = TRUE`. Defaults to "latin1". - **temp** (logical) - Optional - (logical). Defaults to `TRUE`. ### Value `candidate_local()` returns a `data.frame`. ### Details If export is set to `TRUE`, the downloaded data is saved as .dta and .sav files in the current directory. ### Note For the elections prior to 2002, some information can be incomplete. For the 2014, 2018, and 2022 elections, more variables are available. ### Examples ```r if (FALSE) { # \dontrun{ df <- candidate_fed(2000) } # } ``` ``` -------------------------------- ### personal_finances_local(year, uf = "all", encoding = "latin1", temp = TRUE) Source: https://electionsbr.com/novo/reference/personal_finances_local.html Downloads and aggregates data on local candidates' personal financial disclosures. Returns a data.frame where each observation corresponds to a candidate's property. ```APIDOC ## personal_finances_local(year, uf = "all", encoding = "latin1", temp = TRUE) ### Description Downloads and aggregates the data on local candidates' personal financial disclosures. The function returns a `data.frame` where each observation corresponds to a candidate's property. ### Usage ```r personal_finances_local(year, uf = "all", encoding = "latin1", temp = TRUE) ``` ### Arguments - **year** (numeric) - Required - Election year. Available years: 1996, 2000, 2004, 2008, 2012, 2016, 2020, and 2024. - **uf** (character vector) - Optional - Federation Unit acronym. Defaults to "all". - **encoding** (character) - Optional - Data original encoding. Defaults to 'Latin-1'. Can be changed to avoid errors when `ascii = TRUE`. - **temp** (logical) - Optional - If `TRUE`, keep the temporary compressed file for future use (recommended). Defaults to `TRUE`. ### Value Returns a `data.frame`. ### Details If export is set to `TRUE`, the downloaded data is saved as .dta and .sav files in the current directory. ### Note For the elections prior to 2000, some information may be incomplete. ### Examples ```r if (FALSE) { # \dontrun{ df <- personal_finances_local(2000) } # } ``` ``` -------------------------------- ### Function usage: details_mun_zone_local(year, uf, encoding, temp) Source: https://electionsbr.com/novo/reference/details_mun_zone_local.html Shows the function signature. The year argument must be one of 1996, 2000, 2004, 2008, 2012, 2016, or 2020. The uf argument is a character vector of federation unit acronyms, encoding defaults to 'latin1', and temp is a logical flag. ```r details_mun_zone_local(year, uf = "all", encoding = "latin1", temp = TRUE) ``` -------------------------------- ### party_mun_zone function usage Source: https://electionsbr.com/novo/reference/party_mun_zone.html Shows the function signature with its arguments: year, uf, br_archive, encoding, temp, and readme_pdf. Only the years 1994, 1998, 2002, 2006, 2010, 2014, 2018, and 2022 are available. ```r party_mun_zone( year, uf = "all", br_archive = FALSE, encoding = "latin1", temp = TRUE, readme_pdf = FALSE ) ``` -------------------------------- ### legend_local() Source: https://electionsbr.com/novo/reference/index.html Download data on local election coalitions in Brazil. Deprecated. ```APIDOC ## legend_local() ### Description Download data on local election coalitions in Brazil. Deprecated. ### Usage ```r legend_local() ``` ``` -------------------------------- ### personal_finances() function signature Source: https://electionsbr.com/novo/reference/personal_finances.html Shows the usage of the personal_finances() function with its default arguments. The function downloads and aggregates federal candidates' personal financial disclosures for a given election year. ```r personal_finances( year, uf = "all", br_archive = FALSE, encoding = "latin1", temp = TRUE, readme_pdf = FALSE ) ``` -------------------------------- ### Function usage: voter_profile_by_section() Source: https://electionsbr.com/novo/reference/voter_profile_by_section.html Shows the function signature with its arguments: year, uf (default 'AC'), encoding (default 'windows-1252'), temp (default TRUE), and readme_pdf (default FALSE). ```R voter_profile_by_section( year, uf = "AC", encoding = "windows-1252", temp = TRUE, readme_pdf = FALSE ) ``` -------------------------------- ### details_mun_zone_fed(year, uf, br_archive, encoding, temp) Source: https://electionsbr.com/novo/reference/details_mun_zone_fed.html Downloads and aggregates data on the verification of federal elections in Brazil, disaggregated by town and electoral zone. Returns a data.frame where each observation corresponds to a town/zone. ```APIDOC ## details_mun_zone_fed(year, uf, br_archive, encoding, temp) ### Description Downloads and aggregates data on the verification of federal elections in Brazil, disaggregated by town and electoral zone. The function returns a `data.frame` where each observation corresponds to a town/zone. ### Usage ```r details_mun_zone_fed( year, uf = "all", br_archive = FALSE, encoding = "latin1", temp = TRUE ) ``` ### Arguments - **year** (numeric) - Required - Election year. For this function, only the years 1994, 1998, 2002, 2006, 2010, 2014, 2018, and 2022 are available. - **uf** (character vector) - Optional - Federation Unit acronym. Defaults to "all". - **br_archive** (logical) - Optional - In the TSE's data repository, some results can be obtained for the whole country by loading a single file by setting this argument to `TRUE` (may not work for some elections and, in others, it recovers only electoral data for presidential elections, absent in other files). Defaults to `FALSE`. - **encoding** (character) - Optional - Data original encoding (defaults to 'Latin-1'). This can be changed to avoid errors when `ascii = TRUE`. Defaults to "latin1". - **temp** (logical) - Optional - Whether to use temporary files. Defaults to `TRUE`. ### Value Returns a `data.frame` with variables related to the verification of federal elections. ### Details If export is set to `TRUE`, the downloaded data is saved as .dta and .sav files in the current directory. ### Note For the elections prior to 2002, some information can be incomplete. For the 2014, 2018, and 2022 elections, more variables are available. ### Examples ```r if (FALSE) { # \dontrun{ df <- details_mun_zone_fed(2002) } # } ``` ``` -------------------------------- ### party_mun_zone_local(year, uf, encoding, temp) Source: https://electionsbr.com/novo/reference/party_mun_zone_local.html Downloads and aggregates data on the polls by parties from local elections in Brazil, disaggregated by electoral zone. Returns a data.frame where each observation corresponds to a city/zone. ```APIDOC ## party_mun_zone_local(year, uf, encoding, temp) ### Description Downloads and aggregates data on the polls by parties from local elections in Brazil, disaggregated by electoral zone. The function returns a `data.frame` where each observation corresponds to a city/zone. ### Usage ```r party_mun_zone_local(year, uf = "all", encoding = "latin1", temp = TRUE) ``` ### Arguments - **year** (numeric) - Required - Election year. For this function, only the years 1996, 2000, 2004, 2008, 2012, 2016, 2020, and 2024 are available. - **uf** (character vector) - Optional - Federation Unit acronym. Defaults to "all". - **encoding** (character) - Optional - Data original encoding (defaults to 'Latin-1'). This can be changed to avoid errors when `ascii = TRUE`. - **temp** (logical) - Optional - If `TRUE`, keep the temporary compressed file for future use (recommended). Defaults to `TRUE`. ### Value Returns a `data.frame`. ### Details If export is set to `TRUE`, the downloaded data is saved as .dta and .sav files in the current directory. ### Note For the elections prior to 2000, some information can be incomplete. ### Examples ```r if (FALSE) { # \dontrun{ df <- party_mun_zone_local(2000) } # } ``` ``` -------------------------------- ### seats() Source: https://electionsbr.com/novo/reference/index.html Download data on the number of seats under dispute in federal elections. ```APIDOC ## seats() ### Description Download data on the number of seats under dispute in federal elections. ### Usage ```r seats() ``` ``` -------------------------------- ### vote_mun_zone_local() Source: https://electionsbr.com/novo/reference/index.html Download data on candidate electoral results in local elections in Brazil. Deprecated. ```APIDOC ## vote_mun_zone_local() ### Description Download data on candidate electoral results in local elections in Brazil. Deprecated. ### Usage ```r vote_mun_zone_local() ``` ``` -------------------------------- ### personal_finances_fed() Source: https://electionsbr.com/novo/reference/index.html Download data on federal candidates' personal financial disclosures. Deprecated. ```APIDOC ## personal_finances_fed() ### Description Download data on federal candidates' personal financial disclosures. Deprecated. ### Usage ```r personal_finances_fed() ``` ``` -------------------------------- ### vote_mun_zone_local() function usage Source: https://electionsbr.com/novo/reference/vote_mun_zone_local.html Shows the function signature and its arguments: year, uf, ascii, encoding, export, and temp. Only years 1996, 2000, 2004, 2008, 2012, 2016, 2020, and 2024 are available. ```r vote_mun_zone_local( year, uf = "all", ascii = FALSE, encoding = "latin1", export = FALSE, temp = TRUE ) ``` -------------------------------- ### details_mun_zone_fed() Source: https://electionsbr.com/novo/reference/index.html Download data on the verification of federal elections in Brazil. Deprecated. ```APIDOC ## details_mun_zone_fed() ### Description Download data on the verification of federal elections in Brazil. Deprecated. ### Usage ```r details_mun_zone_fed() ``` ``` -------------------------------- ### party_mun_zone_fed() Source: https://electionsbr.com/novo/reference/index.html Download data on the polls by parties from federal elections in Brazil. Deprecated. ```APIDOC ## party_mun_zone_fed() ### Description Download data on the polls by parties from federal elections in Brazil. Deprecated. ### Usage ```r party_mun_zone_fed() ``` ``` -------------------------------- ### Subset election data by Brazilian state Source: https://electionsbr.com/novo/index.html Downloads vote data for municipal elections in Rio Grande do Sul (RS) in 2000 using the uf argument. ```r df <- elections_tse(year = 2000, type = "vote_mun_zone", uf = "RS") ``` -------------------------------- ### candidate_fed() function signature Source: https://electionsbr.com/novo/reference/candidate_fed.html Shows the usage of the candidate_fed() function with its arguments: year, uf, br_archive, encoding, and temp. The default encoding is 'latin1' and temp defaults to TRUE. ```r candidate_fed( year, uf = "all", br_archive = FALSE, encoding = "latin1", temp = TRUE ) ``` -------------------------------- ### social_media() Source: https://electionsbr.com/novo/reference/index.html Download data on the candidates' social media links in federal elections. ```APIDOC ## social_media() ### Description Download data on the candidates' social media links in federal elections. ### Usage ```r social_media() ``` ``` -------------------------------- ### personal_finances() Source: https://electionsbr.com/novo/reference/personal_finances.html Downloads and aggregates data on federal candidates' personal financial disclosures. Returns a data.frame where each observation corresponds to a candidate's property. ```APIDOC ## personal_finances() ### Description Downloads and aggregates data on federal candidates' personal financial disclosures. Returns a data.frame where each observation corresponds to a candidate's property. ### Usage ```r personal_finances( year, uf = "all", br_archive = FALSE, encoding = "latin1", temp = TRUE, readme_pdf = FALSE ) ``` ### Arguments - **year** (numeric) - Required - Election year. Available years: 2006, 2010, 2014, 2018, 2022, 2024. - **uf** (character vector) - Optional - Federation Unit acronym. Defaults to "all". - **br_archive** (logical) - Optional - If TRUE, loads a single file for the whole country (may not work for some elections). Defaults to FALSE. - **encoding** (character) - Optional - Data original encoding. Defaults to "latin1". - **temp** (logical) - Optional - If TRUE, keeps the temporary compressed file for future use. Defaults to TRUE. - **readme_pdf** (logical) - Optional - If TRUE, downloads the original readme PDF. Defaults to FALSE. ### Value Returns a data.frame. ### Details If export is set to TRUE, the downloaded data is saved as .dta and .sav files in the current directory. ### Note For elections prior to 2000, some information may be incomplete. ### Examples ```r if (FALSE) { # \dontrun{ df <- personal_finances(2006) } # } ``` ``` -------------------------------- ### vote_section() Source: https://electionsbr.com/novo/reference/index.html Download data on candidate electoral results in federal elections in Brazil by electoral section. ```APIDOC ## vote_section() ### Description Download data on candidate electoral results in federal elections in Brazil by electoral section. ### Usage ```r vote_section() ``` ``` -------------------------------- ### party_mun_zone_local function signature Source: https://electionsbr.com/novo/reference/party_mun_zone_local.html Shows the usage of the party_mun_zone_local() function with its arguments: year, uf, encoding, and temp. The function downloads and aggregates data on the polls by parties from local elections in Brazil, disaggregated by electoral zone. ```r party_mun_zone_local(year, uf = "all", encoding = "latin1", temp = TRUE) ``` -------------------------------- ### personal_finances_fed() function signature Source: https://electionsbr.com/novo/reference/personal_finances_fed.html Defines the personal_finances_fed() function with parameters for year, uf, br_archive, encoding, and temp. Only years 2006, 2010, 2014, 2018, and 2022 are available. ```r personal_finances_fed( year, uf = "all", br_archive = FALSE, encoding = "latin1", temp = TRUE ) ``` -------------------------------- ### candidate_local() function usage Source: https://electionsbr.com/novo/reference/candidate_local.html Shows the function signature for candidate_local(), which downloads and aggregates data on candidates' background in Brazilian local elections. The function accepts a year, optional federation unit (uf), encoding, and temp parameters. ```r candidate_local(year, uf = "all", encoding = "latin1", temp = TRUE) ``` -------------------------------- ### electionsBR / electionsBR-package Source: https://electionsbr.com/novo/reference/index.html R functions to download and clean Brazilian electoral Data. ```APIDOC ## electionsBR / electionsBR-package ### Description R functions to download and clean Brazilian electoral Data. ### Usage ```r electionsBR() ``` ```