get_cms_meta_data: Retrieve CMS Metadata Links from CMS
Description
This function sends a request to the specified CMS data URL, retrieves the JSON data,
and processes it to create a tibble with relevant information about the datasets.
A tibble with data links and relevant metadata about the datasets.
Arguments
.title
This can be a title that is used to search the data.
.modified_date
This can be a date in the format of "YYYY-MM-DD"
.keyword
This can be a keyword that is used to search the data.
.identifier
This can be an identifier that is used to search the data.
.data_version
This can be one of three different choices: "current",
"archive", or "all". The default is "current" and if you make a choice that
does not exist then it will default to "current".
.media_type
This can be one of three different choices: "all", "csv",
"API", or "other". The default is "all" and if you make a choice that does not
exist then it will default to "all".
Author
Steven P. Sanderson II, MPH
Details
The function fetches JSON data from the CMS data URL and extracts relevant fields to
create a tidy tibble. It selects specific columns, handles nested lists by unnesting them,
cleans column names, and processes dates and media types to make the data more useful for analysis.
The columns in the returned tibble are:
library(dplyr)
# Fetch and process metadata from the CMS data URLget_cms_meta_data(
.keyword = "nation",
.title = "Market Saturation & Utilization State-County") |>
glimpse()