Skip to content

Commit

Permalink
Add available-surveys as gt output for thesis
Browse files Browse the repository at this point in the history
  • Loading branch information
athowes committed Nov 20, 2023
1 parent 0089243 commit a2b0b77
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/docs_thesis-resources/orderly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ depends:
use:
depends/available-surveys.png: available-surveys.png
depends/available-surveys.csv: available-surveys.csv
depends/available-surveys.rds: available-surveys.rds
plot-tikz_category-flowchart:
id: latest
use:
Expand Down
1 change: 1 addition & 0 deletions src/plot_available-surveys/orderly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ artefacts:
- available-surveys.png
- available-surveys.csv
- available-surveys.txt
- available-surveys.rds
- data:
description: Comparison of surveys listed on STATcompiler versus those we have
filenames:
Expand Down
10 changes: 8 additions & 2 deletions src/plot_available-surveys/script.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ ggsave(
width = 6.25, height = 3.5, units = "in", dpi = 300
)

df %>%
available_surveys_gt <- df %>%
select(country, type, year, giftsvar, Y015_019, Y020_024, Y025_029, Y015_029) %>%
mutate(
giftsvar = case_when(
Expand Down Expand Up @@ -152,12 +152,18 @@ df %>%
drop_trailing_zeros = TRUE,
missing_text = "",
sep_mark = ""
) %>%
)

saveRDS(available_surveys_gt, "available-surveys.rds")

available_surveys_gt %>%
as_latex() %>%
as.character() %>%
cat(file = "available-surveys.txt")

#' What was the raw FSW proportion in surveys with and without a specific transactional question?
giftsvar_surveys <- filter(df, giftsvar == 1) %>% pull(survey_id)

lapply(files, function(file) {
read_csv(file)
}) %>%
Expand Down

0 comments on commit a2b0b77

Please sign in to comment.