get_provider_meta_data: Retrieve Provider Metadata from CMS

View source: R/meta-get-provider-data.R

get_provider_meta_dataR Documentation

Retrieve Provider Metadata from CMS

Description

This function sends a request to the specified CMS metadata URL, retrieves the JSON data, and processes it to create a tibble with relevant information about the datasets.

Usage

get_provider_meta_data(
  .identifier = NULL,
  .title = NULL,
  .description = NULL,
  .keyword = NULL,
  .issued = NULL,
  .modified = NULL,
  .released = NULL,
  .theme = NULL,
  .media_type = NULL
)

Arguments

.identifier

A dataset identifier to filter the data.

.title

A title to filter the data.

.description

A description to filter the data.

.keyword

A keyword to filter the data.

.issued

A date when the dataset was issued to filter the data.

.modified

A date when the dataset was modified to filter the data.

.released

A date when the dataset was released to filter the data.

.theme

A theme to filter the data.

.media_type

A media type to filter the data.

Details

The function fetches JSON data from the CMS metadata 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:

  • identifier

  • title

  • description

  • keyword

  • issued

  • modified

  • released

  • theme

  • media_type

  • download_url

  • contact_fn

  • contact_email

  • publisher_name

Value

A tibble with metadata about the datasets.

See Also

https://data.cms.gov/provider-data/api/1/metastore/schemas/dataset/items

Other Meta Data: get_cms_meta_data()

Examples

library(dplyr)

# Fetch and process metadata from the CMS data URL
get_provider_meta_data(.identifier = "3614-1eef") |>
  glimpse()


healthyR.data documentation built on July 4, 2024, 5:07 p.m.