Skip to content

Commit

Permalink
Rename FLCensusVTD to FLCensus
Browse files Browse the repository at this point in the history
Even though the csv file is named FLCensusVTD, it is called FLCensus in the QSS code.
  • Loading branch information
jrnold committed Feb 18, 2017
1 parent 1558e03 commit 6dc38c3
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion R/FLCensusVTD.R → R/FLCensus.R
Expand Up @@ -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"
11 changes: 10 additions & 1 deletion data-raw/build.R
Expand Up @@ -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,
Expand Down Expand Up @@ -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"
Expand Down
File renamed without changes.
Binary file added data/FLCensus.rda
Binary file not shown.
Binary file removed data/FLCensusVTD.rda
Binary file not shown.
8 changes: 4 additions & 4 deletions man/FLCensusVTD.Rd → man/FLCensus.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6dc38c3

Please sign in to comment.