View source: R/list_datasets.R
| list_datasets | R Documentation |
Retrieves a list of available Experience Sampling Method (ESM) datasets from
the openESM metadata repository. Returns a tibble with
dataset information and metadata that can be used with get_dataset().
list_datasets(cache_hours = 24, metadata_version = "latest", max_attempts = 15)
cache_hours |
Numeric. Number of hours to consider the cached dataset index valid. Default is 24. Set to 0 to force fresh download. |
metadata_version |
Character string specifying the metadata catalog version. Default is "latest" which downloads the most recent version. |
max_attempts |
Integer, maximum number of retry attempts for Zenodo API calls. Default is 15. |
This function downloads and caches a master index of available datasets from
the openESM metadata repository, which is hosted on Zenodo.
The index is cached locally to avoid repeated downloads.
Use cache_hours = 0 to force a fresh download of the index.
The returned tibble can be filtered and explored to identify datasets of
interest before downloading with get_dataset().
A tibble with one row per dataset containing:
dataset_id: Character string with unique dataset identifier
first_author: Character string with first author's surname
year: Numeric year of publication
reference_a: Character string with primary reference
reference_b: Character string with secondary reference (if available)
paper_doi: Character string with publication DOI
zenodo_doi: Character string with Zenodo dataset DOI
license: Character string with dataset license
link_to_data: Character string with direct data link
link_to_codebook: Character string with codebook link
link_to_code: Character string with analysis code link
n_participants: Numeric number of participants
n_time_points: Numeric number of time points
n_beeps_per_day: Character string with beeps per day information
passive_data_available: Character string indicating passive data availability
cross_sectional_available: Character string indicating cross-sectional data availability
topics: Character string with study topics
implicit_missingness: Character string with missingness information
raw_time_stamp: Character string with timestamp format information
sampling_scheme: Character string with sampling scheme details
participants: Character string with participant information
coding_file: Character string with coding file information
additional_comments: Character string with additional notes
features: List column containing feature tibbles for each dataset
get_dataset() to download specific datasets
# List all available datasets
datasets <- list_datasets()
# Force fresh download of index
fresh_list <- list_datasets(cache_hours = 0)
# Use specific metadata version
datasets_v1 <- list_datasets(metadata_version = "1.0.0")
# Use dataset IDs with get_dataset()
dataset <- get_dataset(datasets$dataset_id[1])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.