Skip to contents

Rename RDH election-result columns into a more uniform office_year_party_candidate style.

Usage

clean_rdh(data, year = NULL)

Arguments

data

sf tibble from read_rdh().

year

Election year for district columns without a year, like GCON01DMRV. If NULL, inferred from the other columns.

Value

input object with renamed columns

Examples

if (FALSE) { # \dontrun{
shp <- read_rdh('in_2024_gen_prec.zip', clean_names = FALSE)
shp <- clean_rdh(shp)
} # }