From 81341903e6c8b9851268bf7ecc938aef397e8e98 Mon Sep 17 00:00:00 2001 From: Shiro Kuriwaki Date: Mon, 30 Sep 2024 09:51:43 -0400 Subject: [PATCH] Actually add 2006, 2012 --- data-raw/create_dist-level-data_2006_2012.R | 9 +++++---- data/cd_info_2006.rda | Bin 0 -> 3718 bytes data/cd_info_2012.rda | Bin 0 -> 9322 bytes 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 data/cd_info_2006.rda create mode 100644 data/cd_info_2012.rda diff --git a/data-raw/create_dist-level-data_2006_2012.R b/data-raw/create_dist-level-data_2006_2012.R index af902d6..81cd4f1 100644 --- a/data-raw/create_dist-level-data_2006_2012.R +++ b/data-raw/create_dist-level-data_2006_2012.R @@ -2,7 +2,7 @@ library(tidyverse) library(googlesheets4) # Authenticate with Google Sheets -gs4_auth() +# gs4_auth() # URLs for your Google Sheets url_2006 <- "https://docs.google.com/spreadsheets/d/1l7W130tPRF6dQ4JoqlQJSJexnEg4rZct-7kwDXqgoLE/edit?gid=429358610#gid=429358610" @@ -17,7 +17,8 @@ cd_names_2006 <- read_sheet(url_2006, range = "A2:E", col_names = TRUE, sheet = voting_info_2006 <- read_sheet(url_2006,range = "A2:I", col_names = TRUE, sheet = 2) |> select(cd = CD, - pct_mccain = 'McCain%') + pct_mccain = 'McCain%', + presvotes_total = "Total") # 2012 cd_names_2012 <- read_sheet(url_2012, range = "A2:G", col_names = TRUE, sheet = 1) |> @@ -40,5 +41,5 @@ cd_info_2012 <- cd_names_2012 |> mutate(cd = str_replace(cd, "-AL$", "-01")) # Save the data -usethis::use_data(cd_info_2022, overwrite = TRUE) -usethis::use_data(cd_info_2024, overwrite = TRUE) +usethis::use_data(cd_info_2012, overwrite = TRUE) +usethis::use_data(cd_info_2006, overwrite = TRUE) diff --git a/data/cd_info_2006.rda b/data/cd_info_2006.rda new file mode 100644 index 0000000000000000000000000000000000000000..c28f51c1a4d65f7bd7dfe06d76133a4bc57beba8 GIT binary patch literal 3718 zcmZX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