diff --git a/R/FLCensusVTD.R b/R/FLCensus.R similarity index 99% rename from R/FLCensusVTD.R rename to R/FLCensus.R index f2f9d1b..afa41da 100644 --- a/R/FLCensusVTD.R +++ b/R/FLCensus.R @@ -27,4 +27,4 @@ #' predicting individual ethnicity from voter registration records.” \emph{Political Analysis}, #' vol. 24, no. 2 (Spring), pp. 263–272. doi: https://doi.org/10.1093/pan/mpw001 } #'} -"FLCensusVTD" +"FLCensus" diff --git a/data-raw/build.R b/data-raw/build.R index 29ffaed..0f54e74 100644 --- a/data-raw/build.R +++ b/data-raw/build.R @@ -6,6 +6,9 @@ library("purrr") # Do not include these IGNORES <- c("chechen", "resources") +# Rename these csv files from QSS +RENAMES <- c(names = "cnames", FLCensusVTD = "FLCensus") + # copy csv files from qss/ to data-raw/ # ---------------------------------------- csv_files <- dir("qss", pattern = ".*\\.csv$", full.names = TRUE, @@ -35,9 +38,15 @@ qss_data <- new.env() for (fn in dir(csv_dir, pattern = "\\.csv$", full.names = TRUE)) { dataname <- make.names(tools::file_path_sans_ext(basename(fn))) if (dataname %in% IGNORES) { - message("Ignoring", dataname) + message("Ignoring ", dataname) next } + if (dataname %in% names(RENAMES)) { + print(dataname) + newname <- RENAMES[dataname] + message("Renaming ", dataname, " to ", newname) + dataname <- newname + } if (dataname == "names") { message("For names, using cnames instead") dataname <- "cnames" diff --git a/data-raw/spec/FLCensusVTD.R b/data-raw/spec/FLCensus.R similarity index 100% rename from data-raw/spec/FLCensusVTD.R rename to data-raw/spec/FLCensus.R diff --git a/data/FLCensus.rda b/data/FLCensus.rda new file mode 100644 index 0000000..46fc3ee Binary files /dev/null and b/data/FLCensus.rda differ diff --git a/data/FLCensusVTD.rda b/data/FLCensusVTD.rda deleted file mode 100644 index 2973735..0000000 Binary files a/data/FLCensusVTD.rda and /dev/null differ diff --git a/man/FLCensusVTD.Rd b/man/FLCensus.Rd similarity index 93% rename from man/FLCensusVTD.Rd rename to man/FLCensus.Rd index c197814..aeaef26 100644 --- a/man/FLCensusVTD.Rd +++ b/man/FLCensus.Rd @@ -1,8 +1,8 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/FLCensusVTD.R +% Please edit documentation in R/FLCensus.R \docType{data} -\name{FLCensusVTD} -\alias{FLCensusVTD} +\name{FLCensus} +\alias{FLCensus} \title{Florida Census Data at the Voting District Level} \format{A data frame with 8871 rows and 8 variables: \describe{ @@ -16,7 +16,7 @@ \item{ others }{ numeric: proportion of the other racial groups in the voting district } }} \usage{ -FLCensusVTD +FLCensus } \description{ Florida Census Data at the Voting District Level.