Last updated: 2022-11-24
Checks: 7 0
Knit directory:
workflowr-policy-landscape/
This reproducible R Markdown analysis was created with workflowr (version 1.7.0). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.
Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.
Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.
The command set.seed(20220505)
was run prior to running
the code in the R Markdown file. Setting a seed ensures that any results
that rely on randomness, e.g. subsampling or permutations, are
reproducible.
Great job! Recording the operating system, R version, and package versions is critical for reproducibility.
Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.
Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.
Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.
The results in this page were generated with repository version 60a6c61. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.
Note that you need to be careful to ensure that all relevant files for
the analysis have been committed to Git prior to generating the results
(you can use wflow_publish
or
wflow_git_commit
). workflowr only checks the R Markdown
file, but you know if there are other scripts or data files that it
depends on. Below is the status of the Git repository when the results
were generated:
Ignored files:
Ignored: .Rhistory
Ignored: .Rproj.user/
Ignored: code/.DS_Store
Unstaged changes:
Modified: Policy_landscape_workflowr.R
Deleted: code/1a_Data_preprocessing.html
Deleted: code/1b_Dictionaries_preparation.html
Deleted: code/2_Topic_modeling.html
Deleted: code/3_Text_similarities_Figure_2B.html
Deleted: code/4_Language_analysis_Figure_2C.html
Deleted: code/5_For_and_not_for_profit_comparison.html
Deleted: code/Figure_2A.html
Deleted: code/README.md
Deleted: code/figure/1b_Dictionaries_preparation.Rmd/unnamed-chunk-4-1.png
Deleted: code/figure/1b_Dictionaries_preparation.Rmd/unnamed-chunk-7-1.png
Deleted: code/figure/1b_Dictionaries_preparation.Rmd/unnamed-chunk-8-1.png
Deleted: code/figure/2_Topic_modeling.Rmd/unnamed-chunk-11-1.png
Deleted: code/figure/2_Topic_modeling.Rmd/unnamed-chunk-12-1.png
Deleted: code/figure/2_Topic_modeling.Rmd/unnamed-chunk-13-1.png
Deleted: code/figure/2_Topic_modeling.Rmd/unnamed-chunk-13-2.png
Deleted: code/figure/2_Topic_modeling.Rmd/unnamed-chunk-13-3.png
Deleted: code/figure/2_Topic_modeling.Rmd/unnamed-chunk-13-4.png
Deleted: code/figure/2_Topic_modeling.Rmd/unnamed-chunk-16-1.png
Deleted: code/figure/2_Topic_modeling.Rmd/unnamed-chunk-17-1.png
Deleted: code/figure/2_Topic_modeling.Rmd/unnamed-chunk-5-1.png
Deleted: code/figure/2_Topic_modeling.Rmd/unnamed-chunk-6-1.png
Deleted: code/figure/3_Text_similarities_Figure_2B.Rmd/unnamed-chunk-4-1.png
Deleted: code/figure/3_Text_similarities_Figure_2B.Rmd/unnamed-chunk-4-10.png
Deleted: code/figure/3_Text_similarities_Figure_2B.Rmd/unnamed-chunk-4-11.png
Deleted: code/figure/3_Text_similarities_Figure_2B.Rmd/unnamed-chunk-4-12.png
Deleted: code/figure/3_Text_similarities_Figure_2B.Rmd/unnamed-chunk-4-2.png
Deleted: code/figure/3_Text_similarities_Figure_2B.Rmd/unnamed-chunk-4-3.png
Deleted: code/figure/3_Text_similarities_Figure_2B.Rmd/unnamed-chunk-4-4.png
Deleted: code/figure/3_Text_similarities_Figure_2B.Rmd/unnamed-chunk-4-5.png
Deleted: code/figure/3_Text_similarities_Figure_2B.Rmd/unnamed-chunk-4-6.png
Deleted: code/figure/3_Text_similarities_Figure_2B.Rmd/unnamed-chunk-4-7.png
Deleted: code/figure/3_Text_similarities_Figure_2B.Rmd/unnamed-chunk-4-8.png
Deleted: code/figure/3_Text_similarities_Figure_2B.Rmd/unnamed-chunk-4-9.png
Deleted: code/figure/3_Text_similarities_Figure_2B.Rmd/unnamed-chunk-6-1.png
Deleted: code/figure/3_Text_similarities_Figure_2B.Rmd/unnamed-chunk-6-2.png
Deleted: code/figure/4_Language_analysis.Rmd/unnamed-chunk-3-1.png
Deleted: code/figure/4_Language_analysis.Rmd/unnamed-chunk-5-1.png
Deleted: code/figure/4_Language_analysis.Rmd/unnamed-chunk-5-2.png
Deleted: code/figure/4_Language_analysis.Rmd/unnamed-chunk-5-3.png
Deleted: code/figure/4_Language_analysis.Rmd/unnamed-chunk-5-4.png
Deleted: code/figure/4_Language_analysis.Rmd/unnamed-chunk-6-1.png
Deleted: code/figure/4_Language_analysis.Rmd/unnamed-chunk-7-1.png
Deleted: code/figure/4_Language_analysis.Rmd/unnamed-chunk-7-2.png
Deleted: code/figure/4_Language_analysis.Rmd/unnamed-chunk-7-3.png
Deleted: code/figure/4_Language_analysis.Rmd/unnamed-chunk-7-4.png
Deleted: code/figure/4_Language_analysis.Rmd/unnamed-chunk-8-1.png
Deleted: code/figure/4_Language_analysis.Rmd/unnamed-chunk-8-2.png
Deleted: code/figure/4_Language_analysis.Rmd/unnamed-chunk-9-1.png
Deleted: code/figure/4_Language_analysis.Rmd/unnamed-chunk-9-2.png
Deleted: code/figure/4_Language_analysis.Rmd/unnamed-chunk-9-3.png
Deleted: code/figure/4_Language_analysis_Figure_2C.Rmd/unnamed-chunk-5-1.png
Deleted: code/figure/4_Language_analysis_Figure_2C.Rmd/unnamed-chunk-5-2.png
Deleted: code/figure/4_Language_analysis_Figure_2C.Rmd/unnamed-chunk-5-3.png
Deleted: code/figure/5_For_and_not_for_profit_comparison.Rmd/unnamed-chunk-3-1.png
Deleted: code/figure/5_For_and_not_for_profit_comparison.Rmd/unnamed-chunk-5-1.png
Deleted: code/figure/5_For_and_not_for_profit_comparison.Rmd/unnamed-chunk-5-2.png
Deleted: code/figure/5_For_and_not_for_profit_comparison.Rmd/unnamed-chunk-5-3.png
Deleted: code/figure/5_For_and_not_for_profit_comparison.Rmd/unnamed-chunk-6-1.png
Deleted: code/figure/5_For_and_not_for_profit_comparison.Rmd/unnamed-chunk-7-1.png
Deleted: code/figure/5_For_and_not_for_profit_comparison.Rmd/unnamed-chunk-7-2.png
Deleted: code/figure/5_For_and_not_for_profit_comparison.Rmd/unnamed-chunk-7-3.png
Deleted: code/figure/5_For_and_not_for_profit_comparison.Rmd/unnamed-chunk-7-4.png
Deleted: code/figure/5_For_and_not_for_profit_comparison.Rmd/unnamed-chunk-8-1.png
Deleted: code/figure/5_For_and_not_for_profit_comparison.Rmd/unnamed-chunk-8-2.png
Deleted: code/figure/5_For_and_not_for_profit_comparison.Rmd/unnamed-chunk-9-1.png
Deleted: code/figure/5_For_and_not_for_profit_comparison.Rmd/unnamed-chunk-9-2.png
Deleted: code/figure/5_For_and_not_for_profit_comparison.Rmd/unnamed-chunk-9-3.png
Deleted: code/figure/Figure_2A.Rmd/unnamed-chunk-3-1.png
Deleted: code/figure/Figure_2B.Rmd/unnamed-chunk-4-1.png
Deleted: code/figure/Figure_2B.Rmd/unnamed-chunk-4-10.png
Deleted: code/figure/Figure_2B.Rmd/unnamed-chunk-4-11.png
Deleted: code/figure/Figure_2B.Rmd/unnamed-chunk-4-12.png
Deleted: code/figure/Figure_2B.Rmd/unnamed-chunk-4-2.png
Deleted: code/figure/Figure_2B.Rmd/unnamed-chunk-4-3.png
Deleted: code/figure/Figure_2B.Rmd/unnamed-chunk-4-4.png
Deleted: code/figure/Figure_2B.Rmd/unnamed-chunk-4-5.png
Deleted: code/figure/Figure_2B.Rmd/unnamed-chunk-4-6.png
Deleted: code/figure/Figure_2B.Rmd/unnamed-chunk-4-7.png
Deleted: code/figure/Figure_2B.Rmd/unnamed-chunk-4-8.png
Deleted: code/figure/Figure_2B.Rmd/unnamed-chunk-4-9.png
Deleted: code/figure/Figure_2B.Rmd/unnamed-chunk-6-1.png
Deleted: code/figure/Figure_2B.Rmd/unnamed-chunk-6-2.png
Deleted: code/figure/Figure_2B.Rmd/unnamed-chunk-6-3.png
Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.
These are the previous versions of the repository in which changes were
made to the R Markdown (analysis/Figure_2A.Rmd
) and HTML
(docs/Figure_2A.html
) files. If you’ve configured a remote
Git repository (see ?wflow_git_remote
), click on the
hyperlinks in the table below to view the files as they were in that
past version.
File | Version | Author | Date | Message |
---|---|---|---|---|
html | 60a6c61 | Andrew Beckerman | 2022-11-24 | Build site. |
html | fb90a00 | Andrew Beckerman | 2022-11-24 | Build site. |
Rmd | e08d7ac | Andrew Beckerman | 2022-11-24 | more organising and editing of workflowR mappings |
html | e08d7ac | Andrew Beckerman | 2022-11-24 | more organising and editing of workflowR mappings |
html | 0a21152 | zuzannazagrodzka | 2022-09-21 | Build site. |
html | 796aa8e | zuzannazagrodzka | 2022-09-21 | Build site. |
Rmd | efb1202 | zuzannazagrodzka | 2022-09-21 | Publish other files |
Figure 2A shows gamma values (x-axis, means ± sd) that are the strength of association between a set of stakeholder documents (y-axis) and the corresponding topic.
High gamma values are strong associations.
We plotted the values for four main topics (side labels): Open Research (green), Community and Support (red), Innovation and Solutions (yellow) and Publication Process (blue).
The data for this are produced in 2_Topic_modeling
rm(list=ls())
library(tidyverse)
── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
✔ ggplot2 3.3.6 ✔ purrr 0.3.5
✔ tibble 3.1.8 ✔ dplyr 1.0.10
✔ tidyr 1.2.1 ✔ stringr 1.4.1
✔ readr 2.1.3 ✔ forcats 0.5.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
The data are produced in 2_Topic_modeling
df_doc_level_stm_gamma <- read_csv(file = "./output/created_datasets/df_doc_level_stm_gamma.csv")
Rows: 516 Columns: 6
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (2): stakeholder, name
dbl (4): topic, total_topic, total_sent, prop
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
df_figure1_gamma <- df_doc_level_stm_gamma %>%
select(-total_topic, -total_sent)
df_figure1_gamma$prop <- df_figure1_gamma$prop *100
df_figure1_gamma_wide <- df_figure1_gamma %>%
spread(topic, prop) %>%
rename(topic_1 = `1`, topic_2 = `2`, topic_3 = `3`, topic_4 = `4`)
# Topic/Category 1: Open Research
# Topic/Category 2: Community & Support
# Topic/Category 3: Innovation & Solution
# Topic/Category 4: Publication process (control)
df_figure1_gamma_wide2 = data.frame(
document = rep(df_figure1_gamma_wide$name,4),
stakeholder = rep(df_figure1_gamma_wide$stakeholder,4),
# type = c(rep("Topic 1",129), rep("Topic 2",129), rep("Topic 3",129), rep("Topic 4", 129)),
type = c(rep("1. Open Research",129), rep("2. Community and Support",129), rep("3. Innovation and Solutions",129), rep("4. Publication Process", 129)),
perc = c(df_figure1_gamma_wide$topic_1, df_figure1_gamma_wide$topic_2, df_figure1_gamma_wide$topic_3, df_figure1_gamma_wide$topic_4),
perc2 = c(df_figure1_gamma_wide$topic_1, df_figure1_gamma_wide$topic_2, df_figure1_gamma_wide$topic_3, df_figure1_gamma_wide$topic_4)
)
# adding quantiles values
sum_figure1_gamma_wide2 =
df_figure1_gamma_wide2 %>%
group_by(stakeholder, type) %>%
dplyr::summarize(lower = quantile(perc, probs = .25), upper = quantile(perc, probs = .75), perc_fin = mean(perc)) %>%
rename(perc = perc_fin)
`summarise()` has grouped output by 'stakeholder'. You can override using the
`.groups` argument.
figure_topics <- ggplot() +
geom_point(data = df_figure1_gamma_wide2, aes(x = perc, y = stakeholder, colour = type), alpha = 0.2, position = position_jitter(), show.legend = FALSE) +
geom_pointrange(data = sum_figure1_gamma_wide2, aes(x = perc, xmin = lower, xmax = upper, y = stakeholder, colour = type), show.legend = FALSE) +
facet_grid(.~type) +
labs(x = "Topics occuring in documents (%) gamma", y = "") +
scale_color_manual(values = c("dark green", "dark red", "darkgoldenrod", "dark blue")) +
theme_classic()
figure_topics
Version | Author | Date |
---|---|---|
e08d7ac | Andrew Beckerman | 2022-11-24 |
# # UNCOMMENT TO SAVE FIGURES
# figure_name <- paste0("./output/Figure_2A/Figure_2A.png")
# png(file=figure_name,
# width= 3000, height= 2000, res=400)
# figure_topics
# dev.off()
sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur ... 10.16
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] forcats_0.5.2 stringr_1.4.1 dplyr_1.0.10 purrr_0.3.5
[5] readr_2.1.3 tidyr_1.2.1 tibble_3.1.8 ggplot2_3.3.6
[9] tidyverse_1.3.2 workflowr_1.7.0
loaded via a namespace (and not attached):
[1] httr_1.4.4 sass_0.4.2 bit64_4.0.5
[4] vroom_1.6.0 jsonlite_1.8.3 modelr_0.1.9
[7] bslib_0.4.0 assertthat_0.2.1 getPass_0.2-2
[10] highr_0.9 googlesheets4_1.0.1 cellranger_1.1.0
[13] yaml_2.3.6 pillar_1.8.1 backports_1.4.1
[16] glue_1.6.2 digest_0.6.29 promises_1.2.0.1
[19] rvest_1.0.3 colorspace_2.0-3 htmltools_0.5.3
[22] httpuv_1.6.6 pkgconfig_2.0.3 broom_1.0.1
[25] haven_2.5.1 scales_1.2.1 processx_3.7.0
[28] whisker_0.4 later_1.3.0 tzdb_0.3.0
[31] git2r_0.30.1 googledrive_2.0.0 generics_0.1.3
[34] farver_2.1.1 ellipsis_0.3.2 cachem_1.0.6
[37] withr_2.5.0 cli_3.4.1 magrittr_2.0.3
[40] crayon_1.5.2 readxl_1.4.1 evaluate_0.16
[43] ps_1.7.1 fs_1.5.2 fansi_1.0.3
[46] xml2_1.3.3 tools_4.2.1 hms_1.1.2
[49] gargle_1.2.1 lifecycle_1.0.3 munsell_0.5.0
[52] reprex_2.0.2 callr_3.7.2 compiler_4.2.1
[55] jquerylib_0.1.4 rlang_1.0.6 grid_4.2.1
[58] rstudioapi_0.14 labeling_0.4.2 rmarkdown_2.16
[61] gtable_0.3.1 DBI_1.1.3 R6_2.5.1
[64] lubridate_1.8.0 knitr_1.40 fastmap_1.1.0
[67] bit_4.0.4 utf8_1.2.2 rprojroot_2.0.3
[70] stringi_1.7.8 parallel_4.2.1 Rcpp_1.0.9
[73] vctrs_0.5.0 dbplyr_2.2.1 tidyselect_1.2.0
[76] xfun_0.33
sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur ... 10.16
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] forcats_0.5.2 stringr_1.4.1 dplyr_1.0.10 purrr_0.3.5
[5] readr_2.1.3 tidyr_1.2.1 tibble_3.1.8 ggplot2_3.3.6
[9] tidyverse_1.3.2 workflowr_1.7.0
loaded via a namespace (and not attached):
[1] httr_1.4.4 sass_0.4.2 bit64_4.0.5
[4] vroom_1.6.0 jsonlite_1.8.3 modelr_0.1.9
[7] bslib_0.4.0 assertthat_0.2.1 getPass_0.2-2
[10] highr_0.9 googlesheets4_1.0.1 cellranger_1.1.0
[13] yaml_2.3.6 pillar_1.8.1 backports_1.4.1
[16] glue_1.6.2 digest_0.6.29 promises_1.2.0.1
[19] rvest_1.0.3 colorspace_2.0-3 htmltools_0.5.3
[22] httpuv_1.6.6 pkgconfig_2.0.3 broom_1.0.1
[25] haven_2.5.1 scales_1.2.1 processx_3.7.0
[28] whisker_0.4 later_1.3.0 tzdb_0.3.0
[31] git2r_0.30.1 googledrive_2.0.0 generics_0.1.3
[34] farver_2.1.1 ellipsis_0.3.2 cachem_1.0.6
[37] withr_2.5.0 cli_3.4.1 magrittr_2.0.3
[40] crayon_1.5.2 readxl_1.4.1 evaluate_0.16
[43] ps_1.7.1 fs_1.5.2 fansi_1.0.3
[46] xml2_1.3.3 tools_4.2.1 hms_1.1.2
[49] gargle_1.2.1 lifecycle_1.0.3 munsell_0.5.0
[52] reprex_2.0.2 callr_3.7.2 compiler_4.2.1
[55] jquerylib_0.1.4 rlang_1.0.6 grid_4.2.1
[58] rstudioapi_0.14 labeling_0.4.2 rmarkdown_2.16
[61] gtable_0.3.1 DBI_1.1.3 R6_2.5.1
[64] lubridate_1.8.0 knitr_1.40 fastmap_1.1.0
[67] bit_4.0.4 utf8_1.2.2 rprojroot_2.0.3
[70] stringi_1.7.8 parallel_4.2.1 Rcpp_1.0.9
[73] vctrs_0.5.0 dbplyr_2.2.1 tidyselect_1.2.0
[76] xfun_0.33