Title: | An Interface to the Pandemic PACT Database |
---|---|
Description: | The Pandemic PACT <https://www.pandemicpact.org/> 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 database is publicly available for download from its website and from Figshare. This package interfaces with the project's Figshare repository to provide programmatic access to the database along with other data products provided by the project. |
Authors: | Ernest Guevarra [aut, cre] |
Maintainer: | Ernest Guevarra <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.0.0.9000 |
Built: | 2025-02-12 05:42:26 UTC |
Source: | https://github.com/OxfordIHTM/pactr |
Cite an output/asset available from the Pandemic PACT Figshare repository
pact_cite(pact_client, id)
pact_cite(pact_client, id)
pact_client |
An interface client to the Pandemic PACT Figshare
repository. This is usually set/created through a call to
|
id |
A unique integer value identifying a specific file in the repository. |
A string for recommended bibliographic citation for specific Pandemic PACT output/asset in DateCite bibliographic style.
## Not run: pact_client <- pact_client_set() pact_cite(pact_client, id = 24763548) ## End(Not run)
## Not run: pact_client <- pact_client_set() pact_cite(pact_client, id = 24763548) ## End(Not run)
Initiate a new Pandemic PACT Figshare client session
pact_client_set()
pact_client_set()
A local client to the Figshare service.
## Not run: pact_client_set() ## End(Not run)
## Not run: pact_client_set() ## End(Not run)
Download outputs/assets from Pandemic PACT Figshare repository
pact_download_figshare(pact_client, id, path, overwrite = FALSE, quiet = TRUE) pact_download_figshare_private(path, overwrite = FALSE, quiet = TRUE) pact_download_website(path, overwrite = FALSE, quiet = TRUE)
pact_download_figshare(pact_client, id, path, overwrite = FALSE, quiet = TRUE) pact_download_figshare_private(path, overwrite = FALSE, quiet = TRUE) pact_download_website(path, overwrite = FALSE, quiet = TRUE)
pact_client |
An interface client to the Pandemic PACT Figshare
repository. This is usually set/created through a call to
|
id |
A unique integer value identifying a specific file in the repository. |
path |
The local directory where file is to be downloaded. |
overwrite |
Logical. Should existing files be overwritten? If TRUE, existing files will be overwritten. Default is FALSE. |
quiet |
Logical. If TRUE (default), download progress is not displayed. |
The full path of the downloaded file.
## Not run: ## From Figshare pact_client <- pact_client_set() pact_download_figshare(pact_client, id = 25827649, path = tempdir()) ## From website pact_download_website(path = tempdir()) ## End(Not run)
## Not run: ## From Figshare pact_client <- pact_client_set() pact_download_figshare(pact_client, id = 25827649, path = tempdir()) ## From website pact_download_website(path = tempdir()) ## End(Not run)
Get outputs/assets identifiers
pact_get_group_id(pact_client) pact_get_filename(pact_client, id)
pact_get_group_id(pact_client) pact_get_filename(pact_client, id)
pact_client |
An interface client to the Pandemic PACT Figshare
repository. This is usually set/created through a call to
|
id |
A unique integer value identifying a specific file in the repository. |
An integer or character value or vector of values for requested identifier.
## Not run: pact_client <- pact_client_set() pact_get_group_id(pact_client) pact_get_filename(pact_client, id = 24763548) ## End(Not run)
## Not run: pact_client <- pact_client_set() pact_get_group_id(pact_client) pact_get_filename(pact_client, id = 24763548) ## End(Not run)
List all available outputs/assets from Pandemic PACT's Figshare repository
pact_list(pact_client) pact_list_data(pact_client) pact_list_download(path_to_download)
pact_list(pact_client) pact_list_data(pact_client) pact_list_download(path_to_download)
pact_client |
An interface client to the Pandemic PACT Figshare
repository. This is usually set/created through a call to
|
path_to_download |
Path to downloaded zip file from Pandemic PACT's Figshare repository |
A data.frame of available outputs/assets from Pandemic PACT's Figshare repository.
## Not run: pact_list(pact_client = pact_client_set()) ## End(Not run)
## Not run: pact_list(pact_client = pact_client_set()) ## End(Not run)
Pandemic PACT Mpox Priorities
pact_mpox_priority
pact_mpox_priority
A data.frame with 4 columns and 23 rows:
Variable | Description |
mpox_priority_code | Two digit Mpox priority code |
mpox_priority | Mpox priority name |
mpox_subpriority_code | Four digit Mpox sub-priority code |
mpox_subpriority | Mpox sub-priority name |
Pandemic PACT website https://www.pandemicpact.org/
pact_mpox_priority
pact_mpox_priority
Process Pandemic PACT dataset retrieved from the website
pact_process_website(pact_data, col_list = TRUE, fix = TRUE)
pact_process_website(pact_data, col_list = TRUE, fix = TRUE)
pact_data |
A data.frame for the Pandemic PACT dataset read from the
Pandemic PACT website. This is usually obtained via a call to
|
col_list |
Logical. Should variable/fields with multiple values be made into column lists? Default to TRUE. |
fix |
Logical. Should fixes be applied to the dataset based on known issues? Default to TRUE. |
A tibble of the dataset from the website structured based on
col_list
and 'fix“ specifications.
## Not run: pact_data <- pact_read_website() pact_process_website(pact_data) ## End(Not run)
## Not run: pact_data <- pact_read_website() pact_process_website(pact_data) ## End(Not run)
Read datasets from the Pandemic PACT website
pact_read_website(.url = NULL)
pact_read_website(.url = NULL)
.url |
The URL for the website dataset. |
A tibble of the Pandemic PACT dataset from the website.
## Not run: pact_read_website() ## End(Not run)
## Not run: pact_read_website() ## End(Not run)
Pandemic PACT Research Categories
pact_research_category
pact_research_category
A data.frame with 4 columns and 70 rows:
Variable | Description |
research_category_code | Two digit research category code |
research_category | Research category name |
research_subcategory_code | Four digit research sub-category code |
research_subcategory | Research sub-category name |
Pandemic PACT website https://www.pandemicpact.org/
pact_research_category
pact_research_category
Process variable of interest from Pandemic PACT website data by a grouping variable
pact_table_topic_group( pact_data_list_cols, topic, group = NULL, na_values = NULL ) pact_table_disease(pact_data_list_cols, group = NULL, na_values = NULL) pact_table_category( pact_data_list_cols, topic = c("ResearchCat", "ResearchSubcat"), na_values = NULL ) pact_table_location_funder( pact_data_list_cols, topic = c("FunderRegion", "FunderCountry"), na_values = NULL ) pact_table_location_institution( pact_data_list_cols, topic = c("ResearchInstitutionRegion", "ResearchInstitutionCountry"), na_values = NULL ) pact_table_location_research( pact_data_list_cols, topic = c("ResearchLocationRegion", "ResearchLocationCountry"), na_values = NULL )
pact_table_topic_group( pact_data_list_cols, topic, group = NULL, na_values = NULL ) pact_table_disease(pact_data_list_cols, group = NULL, na_values = NULL) pact_table_category( pact_data_list_cols, topic = c("ResearchCat", "ResearchSubcat"), na_values = NULL ) pact_table_location_funder( pact_data_list_cols, topic = c("FunderRegion", "FunderCountry"), na_values = NULL ) pact_table_location_institution( pact_data_list_cols, topic = c("ResearchInstitutionRegion", "ResearchInstitutionCountry"), na_values = NULL ) pact_table_location_research( pact_data_list_cols, topic = c("ResearchLocationRegion", "ResearchLocationCountry"), na_values = NULL )
pact_data_list_cols |
A data.frame for the Pandemic PACT dataset read
from the Pandemic PACT website that has already been pre-processed to have
list columns for nested variables. This is usually obtained via a call to
|
topic |
A character value of the variable name in |
group |
A character value or vector of up to two values of the variable
name/s in |
na_values |
A character value or vector of values for strings to be
considered as NA for |
A data.frame structured based on specification. If group
is NULL,
the data.frame presents values for topic
as first column and then either
frequencies/counts of grants per topic
value or sum of monetary amount of
grants per topic
. if group
has one value, the data.frame presents
values for group
as first column followed by either frequencies/counts
of grants per group
or sum of monetary amount of grants per group
then
followed by the topics
within each group
followed by either
frequencies/counts of grants per topic
by group
or sum of monetary
amount of grants per topic
by group
.
## Not run: df <- pact_read_website() |> pact_process_website() pact_table_topic_group(df, topic = "Disease") ## End(Not run)
## Not run: df <- pact_read_website() |> pact_process_website() pact_table_topic_group(df, topic = "Disease") ## End(Not run)
World Health Organization (WHO) Country Information
who_country_info
who_country_info
A data.frame with 5 columns and 194 rows:
Variable | Description |
country_iso3c | ISO-3 country code |
who_short_name | Country short name given by WHO |
formal_name | Country formal name |
who_region | WHO region name to which country belongs to |
un_region | UN region name to which country belongs to |
Data are drawn from WHO's Data Country list found at https://data.who.int/countries/
who_country_info
who_country_info