Skip to content

Commit

Permalink
Nearly final - I hope
Browse files Browse the repository at this point in the history
  • Loading branch information
rkrug committed May 7, 2024
1 parent 4ca9db4 commit 156b01f
Show file tree
Hide file tree
Showing 26 changed files with 1,431 additions and 2,793 deletions.
2,093 changes: 1,110 additions & 983 deletions IPBES_TCA_Corpus_DMP.html

Large diffs are not rendered by default.

39 changes: 10 additions & 29 deletions IPBES_TCA_Corpus_DMP.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ params:
s_1_ch3_06: !expr paste0(readLines(file.path("input", "tca_corpus", "search terms", "ch3_06.txt")), collapse = "\n")
s_1_ch4_01: !expr paste0(readLines(file.path("input", "tca_corpus", "search terms", "ch4_01.txt")), collapse = "\n")
s_1_ch4_02: !expr paste0(readLines(file.path("input", "tca_corpus", "search terms", "ch4_02.txt")), collapse = "\n")
s_1_case: !expr paste0(readLines(file.path("input", "tca_corpus", "search terms", "case.txt")), collapse = "\n")
# s_1_case: !expr paste0(readLines(file.path("input", "tca_corpus", "search terms", "case.txt")), collapse = "\n")
s_1_case: !expr paste("(", paste0(readLines(file.path("input", "tca_corpus", "search terms", "nature.txt")), collapse = "\n"), ") \nAND \n(", paste0(readLines(file.path("input", "tca_corpus", "search terms", "tfc.txt")), collapse = "\n"), ") \nAND \n(", paste0(readLines(file.path("input", "tca_corpus", "search terms", "case.txt")), collapse = "\n"), ")")



st_art: !expr paste0(readLines(file.path("input", "tca_corpus", "search terms", "art.txt")), collapse = "\n")
st_media: !expr paste0(readLines(file.path("input", "tca_corpus", "search terms", "media.txt")), collapse = "\n")
Expand All @@ -84,7 +87,6 @@ params:
sts_strategies_options: !expr readLines(file.path("input", "tca_corpus", "search terms", "strategies_options.md"))
sts_actors: !expr readLines(file.path("input", "tca_corpus", "search terms", "actors.md"))

# s_1_case_corpus: !expr paste("(", paste0(readLines(file.path("input", "tca_corpus", "search terms", "nature.txt")), collapse = "\n"), ") \nAND \n(", paste0(readLines(file.path("input", "tca_corpus", "search terms", "tfc.txt")), collapse = "\n"), ") \nAND \n(", paste0(readLines(file.path("input", "tca_corpus", "search terms", "case.txt")), collapse = "\n"), ")")


# s_1_ch2_vision_case: !expr paste("(", paste0(readLines(file.path("input", "tca_corpus", "search terms", "ch2.txt")), collapse = "\n"), ") \nAND \n(", paste0(readLines(file.path("input", "tca_corpus", "search terms", "case.txt")), collapse = "\n"), ")")
Expand Down Expand Up @@ -1048,27 +1050,6 @@ if (!file.exists(fn)) {
everything()
)
#
message("TCA AND CASE ...")
oa_count$tca_case_years <- openalexR::oa_fetch(
title_and_abstract.search = compact(paste0("(", params$s_1_tca_corpus, ") AND (", params$s_1_case, ")")),
group_by = "publication_year",
output = "dataframe",
verbose = TRUE
) |>
dplyr::mutate(
publication_year = as.integer(as.character(key_display_name)),
key = NULL,
key_display_name = NULL,
p = count / sum(count)
) |>
dplyr::arrange(publication_year) |>
dplyr::mutate(
p_cum = cumsum(p)
) |>
dplyr::select(
publication_year,
everything()
)
saveRDS(oa_count, file = fn)
}
```
Expand Down Expand Up @@ -1183,13 +1164,13 @@ tic()
IPBES.R::corpus_download(
pages_dir = params$pages_cases_dir,
title_and_abstract_search = compact(paste(params$s_1_tca_corpus, " AND (", params$s_1_case, ")")),
title_and_abstract_search = compact(params$s_1_case),
continue = TRUE,
delete_pages_dir = FALSE,
set_size = 2000,
dry_run = TRUE,
set_size = 1999,
dry_run = FALSE,
verbose = TRUE,
mc_cores = 6
mc_cores = 1
)
toc()
Expand Down Expand Up @@ -2983,7 +2964,7 @@ oa <- openalexR::oa_fetch(
output = "dataframe",
verbose = FALSE
)
oa_until_1992 <- sum(oa$count[oa$key < 1992])
oa_until_1992 <- sum(oa$count[oa$key <= 1992])
oa_after_1992 <- sum(oa$count[oa$key > 1992])
data <- lapply(
Expand Down Expand Up @@ -3362,7 +3343,7 @@ oa <- openalexR::oa_fetch(
output = "dataframe",
verbose = FALSE
)
oa_until_1992 <- sum(oa$count[oa$key < 1992])
oa_until_1992 <- sum(oa$count[oa$key <= 1992])
oa_after_1992 <- sum(oa$count[oa$key > 1992])
data <- lapply(
Expand Down
2 changes: 1 addition & 1 deletion buildNo
Original file line number Diff line number Diff line change
@@ -1 +1 @@
621
637
1 change: 0 additions & 1 deletion ch1_evidence_causes/buildNo_ch1_evidence_causes

This file was deleted.

Binary file modified data/tca_corpus/actors.rds
Binary file not shown.
Binary file modified data/tca_corpus/actors_terms.rds
Binary file not shown.
Binary file modified data/tca_corpus/key_works_hits.rds
Binary file not shown.
Binary file modified data/tca_corpus/oa_count.rds
Binary file not shown.
Binary file modified figures/tca_corpus/actors_time_split.pdf
Binary file not shown.
Binary file modified figures/tca_corpus/actors_time_split.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/tca_corpus/actors_time_split_p.pdf
Binary file not shown.
Binary file modified figures/tca_corpus/actors_time_split_p.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/tca_corpus/strategies_options_time_split.pdf
Binary file not shown.
Binary file modified figures/tca_corpus/strategies_options_time_split.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/tca_corpus/strategies_options_time_split_p.pdf
Binary file not shown.
Binary file modified figures/tca_corpus/strategies_options_time_split_p.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 156b01f

Please sign in to comment.