Skip to content

OxfordIHTM/pandemic-pact-research

Repository files navigation

Pandemic PACT Research

License for code License for data test targets workflow

This repository is a docker-containerised, {targets}-based, {renv}-enabled R workflow for analysing the Pandemic PACT dataset.

About the Project

The Pandemic PACT monitors and analyses global funding and research evidence related to diseases with pandemic potential, as well as broader research preparedness efforts, and is equipped to pivot in response to outbreaks. It collects, curates, codes, and analyses data in alignment with WHO priority diseases and other selected illnesses, including pandemic influenza, mpox, and plague. Pandemic PACT aims to guide policy and decision-making for research funders, policymakers, researchers, multilateral agencies. The Pandemic PACT data is publicly available for download from its website and from Figshare.

This project utilises the publicly-available Pandemic PACT dataset to perform analytics and research relevant to pandemic preparedness.

Repository Structure

The project repository is structured as follows:

pandemic-pact-research
    |-- .github/
    |-- data/
    |-- data-raw/
    |-- outputs/
    |-- R/
    |-- reports
    |-- renv
    |-- renv.lock
    |-- .Rprofile
    |-- packages.R
    |-- _targets.R
  • .github contains project testing and automated deployment of outputs workflows via continuous integration and continuous deployment (CI/CD) using Github Actions.

  • data/ contains intermediate and final data outputs produced by the workflow.

  • data-raw/ contains raw datasets, usually either downloaded from source or added manually, that are used in the project.

  • outputs/ contains compiled reports and figures produced by the workflow.

  • R/ contains functions developed/created specifically for use in this workflow.

  • reports/ contains literate code for R Markdown and/or Quarto reports rendered in the workflow.

  • renv/ contains renv package specific files and directories used by the package for maintaining R package dependencies within the project. The directory renv/library, is a library that contains all packages currently used by the project. This directory, and all files and sub-directories within it, are all generated and managed by the renv package. Users should not change/edit these manually.

  • renv.lock file is the renv lockfile which records enough metadata about every package used in this project that it can be re-installed on a new machine. This file is generated by the renv package and should not be changed/edited manually.

  • .Rprofile file is a project R profile generated when initiating renv for the first time. This file is run automatically every time R is run within this project, and renv uses it to configure the R session to use the renv project library.

  • packages.R file lists out all R package dependencies required by the workflow.

  • _targets.R file defines the steps in the workflow’s data ingest, data processing, data analysis, and reporting pipeline.

Reproducibility

R package dependencies

This project was built using R 4.4.1. This project uses the renv framework to record R package dependencies and versions. Packages and versions used are recorded in renv.lock and code used to manage dependencies is in renv/ and other files in the root project directory.

On starting an R session in the working directory, run:

renv::restore()

to install R package dependencies.

The workflow

graph LR
  style Graph fill:#FFFFFF00,stroke:#000000;
  subgraph Graph
    direction LR
    x4b2eaf5f2a623723(["pact_subcategory_table"]):::uptodate --> x266262b940d59309(["subcategory_grant_amount_plot"]):::uptodate
    x425b856cafed2e14(["pact_data_list_cols"]):::uptodate --> xc21c6c1403e45920(["pact_country_institution_table"]):::uptodate
    x425b856cafed2e14(["pact_data_list_cols"]):::uptodate --> x17238a644d1c9613(["pact_category_table"]):::uptodate
    x425b856cafed2e14(["pact_data_list_cols"]):::uptodate --> x048fedabfb1dc4d1(["pact_disease_table"]):::uptodate
    x17238a644d1c9613(["pact_category_table"]):::uptodate --> xeebcb2a0add07e8b(["category_grant_amount_plot"]):::uptodate
    xeebcb2a0add07e8b(["category_grant_amount_plot"]):::uptodate --> xa2ae961635507806(["data_checks_report"]):::uptodate
    xbd0d7f2969e060ce(["category_grant_number_plot"]):::uptodate --> xa2ae961635507806(["data_checks_report"]):::uptodate
    xb30b2ab86188f377(["disease_grant_amount_plot"]):::uptodate --> xa2ae961635507806(["data_checks_report"]):::uptodate
    x861440ba71ebf0a2(["disease_grant_number_plot"]):::uptodate --> xa2ae961635507806(["data_checks_report"]):::uptodate
    x2d3474670cc57c2a(["disease_year_grant_amount_plot"]):::uptodate --> xa2ae961635507806(["data_checks_report"]):::uptodate
    x6d53c82f99adf5ab(["disease_year_grant_number_plot"]):::uptodate --> xa2ae961635507806(["data_checks_report"]):::uptodate
    x17238a644d1c9613(["pact_category_table"]):::uptodate --> xa2ae961635507806(["data_checks_report"]):::uptodate
    x60edb5b5200144e0(["pact_country_funder_table"]):::uptodate --> xa2ae961635507806(["data_checks_report"]):::uptodate
    xc21c6c1403e45920(["pact_country_institution_table"]):::uptodate --> xa2ae961635507806(["data_checks_report"]):::uptodate
    x6f288eae74e85282(["pact_country_research_table"]):::uptodate --> xa2ae961635507806(["data_checks_report"]):::uptodate
    xcc1dd80fe3b3ae4f(["pact_data"]):::uptodate --> xa2ae961635507806(["data_checks_report"]):::uptodate
    x425b856cafed2e14(["pact_data_list_cols"]):::uptodate --> xa2ae961635507806(["data_checks_report"]):::uptodate
    x048fedabfb1dc4d1(["pact_disease_table"]):::uptodate --> xa2ae961635507806(["data_checks_report"]):::uptodate
    x9cdc471408af7c20(["pact_disease_year_table"]):::uptodate --> xa2ae961635507806(["data_checks_report"]):::uptodate
    x1747d45d4f8e0978(["pact_region_funder_table"]):::uptodate --> xa2ae961635507806(["data_checks_report"]):::uptodate
    x6faa3cd2a83aa9fe(["pact_region_institution_table"]):::uptodate --> xa2ae961635507806(["data_checks_report"]):::uptodate
    x81bbb48d4b085633(["pact_region_research_table"]):::uptodate --> xa2ae961635507806(["data_checks_report"]):::uptodate
    x4b2eaf5f2a623723(["pact_subcategory_table"]):::uptodate --> xa2ae961635507806(["data_checks_report"]):::uptodate
    x266262b940d59309(["subcategory_grant_amount_plot"]):::uptodate --> xa2ae961635507806(["data_checks_report"]):::uptodate
    xc3ee1024694a8917(["subcategory_grant_number_plot"]):::uptodate --> xa2ae961635507806(["data_checks_report"]):::uptodate
    x425b856cafed2e14(["pact_data_list_cols"]):::uptodate --> x60edb5b5200144e0(["pact_country_funder_table"]):::uptodate
    x425b856cafed2e14(["pact_data_list_cols"]):::uptodate --> x81bbb48d4b085633(["pact_region_research_table"]):::uptodate
    x048fedabfb1dc4d1(["pact_disease_table"]):::uptodate --> x861440ba71ebf0a2(["disease_grant_number_plot"]):::uptodate
    x9cdc471408af7c20(["pact_disease_year_table"]):::uptodate --> x6d53c82f99adf5ab(["disease_year_grant_number_plot"]):::uptodate
    x17238a644d1c9613(["pact_category_table"]):::uptodate --> xbd0d7f2969e060ce(["category_grant_number_plot"]):::uptodate
    x1942bfb70161773c(["pact_data_download"]):::uptodate --> xcc1dd80fe3b3ae4f(["pact_data"]):::uptodate
    x048fedabfb1dc4d1(["pact_disease_table"]):::uptodate --> xb30b2ab86188f377(["disease_grant_amount_plot"]):::uptodate
    x425b856cafed2e14(["pact_data_list_cols"]):::uptodate --> x6faa3cd2a83aa9fe(["pact_region_institution_table"]):::uptodate
    x425b856cafed2e14(["pact_data_list_cols"]):::uptodate --> x4b2eaf5f2a623723(["pact_subcategory_table"]):::uptodate
    x152e77733f2137bd(["pact_data_figshare"]):::uptodate --> xf4a808aa1c06cf39(["pact_data_figshare_processed"]):::uptodate
    x4b2eaf5f2a623723(["pact_subcategory_table"]):::uptodate --> xc3ee1024694a8917(["subcategory_grant_number_plot"]):::uptodate
    x425b856cafed2e14(["pact_data_list_cols"]):::uptodate --> x9cdc471408af7c20(["pact_disease_year_table"]):::uptodate
    x425b856cafed2e14(["pact_data_list_cols"]):::uptodate --> x1747d45d4f8e0978(["pact_region_funder_table"]):::uptodate
    x9cdc471408af7c20(["pact_disease_year_table"]):::uptodate --> x2d3474670cc57c2a(["disease_year_grant_amount_plot"]):::uptodate
    x425b856cafed2e14(["pact_data_list_cols"]):::uptodate --> x6f288eae74e85282(["pact_country_research_table"]):::uptodate
    xcc1dd80fe3b3ae4f(["pact_data"]):::uptodate --> x425b856cafed2e14(["pact_data_list_cols"]):::uptodate
    xeebcb2a0add07e8b(["category_grant_amount_plot"]):::uptodate --> xb3eeef7ae89696b0(["eda_report"]):::uptodate
    xbd0d7f2969e060ce(["category_grant_number_plot"]):::uptodate --> xb3eeef7ae89696b0(["eda_report"]):::uptodate
    xb30b2ab86188f377(["disease_grant_amount_plot"]):::uptodate --> xb3eeef7ae89696b0(["eda_report"]):::uptodate
    x861440ba71ebf0a2(["disease_grant_number_plot"]):::uptodate --> xb3eeef7ae89696b0(["eda_report"]):::uptodate
    x2d3474670cc57c2a(["disease_year_grant_amount_plot"]):::uptodate --> xb3eeef7ae89696b0(["eda_report"]):::uptodate
    x6d53c82f99adf5ab(["disease_year_grant_number_plot"]):::uptodate --> xb3eeef7ae89696b0(["eda_report"]):::uptodate
    x60edb5b5200144e0(["pact_country_funder_table"]):::uptodate --> xb3eeef7ae89696b0(["eda_report"]):::uptodate
    xc21c6c1403e45920(["pact_country_institution_table"]):::uptodate --> xb3eeef7ae89696b0(["eda_report"]):::uptodate
    x6f288eae74e85282(["pact_country_research_table"]):::uptodate --> xb3eeef7ae89696b0(["eda_report"]):::uptodate
    x1747d45d4f8e0978(["pact_region_funder_table"]):::uptodate --> xb3eeef7ae89696b0(["eda_report"]):::uptodate
    x6faa3cd2a83aa9fe(["pact_region_institution_table"]):::uptodate --> xb3eeef7ae89696b0(["eda_report"]):::uptodate
    x81bbb48d4b085633(["pact_region_research_table"]):::uptodate --> xb3eeef7ae89696b0(["eda_report"]):::uptodate
    x266262b940d59309(["subcategory_grant_amount_plot"]):::uptodate --> xb3eeef7ae89696b0(["eda_report"]):::uptodate
    xc3ee1024694a8917(["subcategory_grant_number_plot"]):::uptodate --> xb3eeef7ae89696b0(["eda_report"]):::uptodate
    x129fabe77e33db5d(["pact_data_dictionary"]):::uptodate --> x129fabe77e33db5d(["pact_data_dictionary"]):::uptodate
  end
Loading

Releases

No releases published

Packages

No packages published