std_contest: Standardize contest variables

View source: R/format_values.R

std_contestR Documentation

Standardize contest variables

Description

Change a vector of contest names to o proper names with leading 7-character codes

Usage

std_contest(vec, .type = NULL)

Arguments

vec

Vector of unstandardized contest names

Examples

vec <- c(
  "CON0001 House 1", "CONG007 House 7", "CONGR02 U.S. House of Rep Dist 2",
  "CNG0003 U S House of Representatives Dis",
  "CONO006 U S House of Rep Dist 6	",
  "US House of Representatives Dist 2",
  "U S House of Rep Dist 6",
  "U.S. House of Rep. Dist. 5",
  "CON02 U S House of Representatives Distr",
  "CON0001 House 1", "CONG007 House 7",
  "Auditor", "State Treasurer", "Adjutant General", "Straight Party",
  "HSE0118 State House of Representatives D",
  "HSE0124 State House of Representatives D",
  "CCNL001 Council 1",
  "CCD0001 Council 1",
  "CCNL001 Council 1",
  "CCD4 County Council District 4",
  "CCD10 County Council District 10",
  "CCD11 County Council District 11",
  "PSD4 HH#1 Public Service District Subdis",
  "MAY3 Town of Hilton Head Island Mayor", "MUN7 Beaufort City Council City of Beauf",
  "SBD5 County School Board District 5",
  "Governor", "Lt Governor",
  "Attorney General", "Secretary of State", "SOIL & WATER COMMISSION",
  "State Superintendent of Education", "US Senate",
  "Comptroller General",
  "Commissioner of Agriculture",
  "Treasurer", "Sheriff", "Probate Judge",
  "U. S. Senator",
  "President", "PREsident",
  "Straight Party",
  "U. S. Senator"
)
std_contest(vec)

kuriwaki/ballot documentation built on May 1, 2023, 9:55 p.m.