Pres_election#
County level results for presidential elections in the USA from 2000-2016.
undefined
Initialization#
library(fosdata)
data <- fosdata::pres_electionAccessing fields#
data <- fosdata::pres_election
county <- data$county # Just a random field in the datasetInteractive R Sample#
You can use the R editor below to interactively explore the dataset and generate plots. This contains a fully self-contained R environment with fosdata, ggplot2, and dplyr loaded.
Console
Plot
No plot generated yet.
LLM instructions#
If using an LLM, you can copy-paste the following instructions to accompany your prompt to inform the model of the fields and their types in the dataset.
LLM Instructions
The fosdata::pres_election dataset containing the following fields:
fields[9]{name,type,values}:
year,integer,n/a
state,character,n/a
state_po,character,n/a
county,character,n/a
FIPS,integer,n/a
candidate,character,n/a
party,character,[democrat,republican,green]
candidatevotes,integer,n/a
totalvotes,integer,n/aFields#
| Name | Description | Type | Min | Max | Values |
|---|---|---|---|---|---|
year |
Year of election. | integer | 2000 | 2016 | - |
state |
State of results. | character | - | - | - |
state_po |
State postal abbreviation. | character | - | - | - |
county |
County within state. | character | - | - | - |
FIPS |
FIPS code for the county. Useful due to non-standard abbreviations of counties. | integer | 1001 | 56045 | - |
candidate |
Name of candidate. | character | - | - | - |
party |
Political party of the candidate. | character | - | - | democrat, republican, green |
candidatevotes |
Votes that candidate received in the county. | integer | - | 2464364 | - |
totalvotes |
Total votes cast in the county. | integer | - | 3434308 | - |
Source#
MIT Election Data and Science Lab, 2018, “County Presidential Election Returns 2000-2016”, https://doi.org/10.7910/DVN/VOQCHQ, Harvard Dataverse, V6, UNF:6:ZZe1xuZ5H2l4NUiSRcRf8Q== [fileUNF]