| county | R Documentation |
A county object is a lightweight metadata summary for a single county's
ballot data file. It does not contain the microdata itself (one row
per voter); it only stores precomputed statistics about that county's
races, used to build help pages and to give a quick overview before
downloading the full dataset.
One such object exists per county (e.g. Lee), stored as a small package
data object. Use county_meta() to retrieve one by county code, or
get_county_data() / as.data.frame() to load the actual microdata.
A county object is a named list with the class attribute
c("county", "list") and the following elements:
countyCharacter. The county code (e.g. "Lee").
n_voters_totalInteger. Total number of voters (rows) in the county's microdata file, regardless of eligibility in any particular race.
n_precincts_totalInteger. Total number of distinct precincts in the county.
electionsCharacter vector. Race codes present in this county's data file (a subset of election_catalog).
voters_by_electionNamed integer vector. Number of eligible
(non-NA) voters for each race in elections.
precincts_by_electionNamed integer vector. Number of precincts with at least one eligible voter, for each race.
options_by_electionNamed list of character vectors. The
vote options observed in the data for each race (candidate codes
or combinations, plus "A"/"I" when present).
Lee, county_meta(), get_county_data(), list_counties(),
election_catalog
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.