Skip to content

Commit 8645a23

Browse files
authored
Bug fixes (#111)
* minor bug fixes * final updates
1 parent 4532524 commit 8645a23

70 files changed

Lines changed: 27254 additions & 49 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

R/render.R

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,19 @@ create_filtered_pages <- function(data, type = c("professions", "departments"),
4040
dir.create(filtered_pages_path)
4141

4242
if (type == "professions") {
43+
prof_cols <- data %>%
44+
dplyr::select(dplyr::contains("prof") & !dplyr::contains("none")) %>%
45+
dplyr::select_if(~ sum(. == "Yes", na.rm = TRUE) >= 20) %>%
46+
colnames()
47+
4348
prof_names <- unlist(config[["professions"]][["cols"]])
44-
prof_names <- gsub("Civil Service, no profession membership", "No government profession", prof_names)
45-
prof_names <- gsub("Other Civil Service profession", "Other government profession", prof_names)
49+
prof_names <- dplyr::recode(prof_cols, !!!prof_names)
4650
filenames <- unlist(purrr::map(prof_names, ~ paste0(gsub("\\s+", "-", tolower(.x)), ".qmd")))
4751

48-
prof_ref <- data.frame(prof_cols = grep("prof", colnames(data), value = TRUE),
52+
prof_ref <- data.frame(prof_cols,
4953
prof_names,
5054
filenames)
5155

52-
prof_cols <- data %>%
53-
dplyr::select(dplyr::contains("prof") & !dplyr::contains("none")) %>%
54-
dplyr::select_if(~ any(. == "Yes")) %>%
55-
colnames()
56-
57-
prof_names <- prof_ref$prof_names[prof_ref$prof_cols %in% prof_cols]
58-
filenames <- prof_ref$filenames[prof_ref$prof_cols %in% prof_cols]
59-
6056
n_pages <- length(prof_cols)
6157
} else if (type == "departments") {
6258
dep_freqs <- table(data$department)

main.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ library(magrittr)
33
data <- CARS::get_tidy_data_file("2024_data.csv")
44
config <- yaml::read_yaml("config.yml")
55

6-
data <- CARS::clean_data(data, config)
6+
data<- CARS::clean_data(data, config)
77
data <- CARS::derive_vars(data)
88

99
CARS::create_filtered_pages(data, type = "departments")

quarto/QA/summary_qa_files/libs/bootstrap/bootstrap-icons.css

Lines changed: 2018 additions & 0 deletions
Large diffs are not rendered by default.
160 KB
Binary file not shown.

quarto/QA/summary_qa_files/libs/bootstrap/bootstrap.min.css

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

quarto/QA/summary_qa_files/libs/bootstrap/bootstrap.min.js

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

quarto/QA/summary_qa_files/libs/clipboard/clipboard.min.js

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

quarto/QA/summary_qa_files/libs/quarto-html/anchor.min.js

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

quarto/QA/summary_qa_files/libs/quarto-html/popper.min.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

quarto/QA/summary_qa_files/libs/quarto-html/quarto-syntax-highlighting.css

Lines changed: 203 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)