Skip to contents

Load a data endpoint or collection by its alias.

Usage

endpoint(alias)

collection(alias)

group(..., .title = NULL)

Arguments

alias

<chr> endpoint or collection alias

...

<dynamic-dots> endpoint aliases to be grouped

.title

<chr> Group title. Defaults to NULL, which will concatenate the aliases for the title.

Value

An S7 <class_care/caid/prov/open/hgov/collection/group> object.

Details

The endpoint() function loads a single data endpoint, while the collection() function loads a collection of endpoints, and the group() function loads a group of endpoints. The alias parameter is used to specify the endpoint or collection alias. If the alias is not found, an error will be raised.

Examples

endpoint("dial_facility")
#> <class_care>
#>  @ access: <care_temporal>
#>  .. @ identifier: chr [1:6] "https://data.cms.gov/data-api/v1/dataset/7d4e7bd1-f08a-4fca-8085-6af24026a19a/data" ...
#>  .. @ metadata  : <class_metadata>
#>  .. .. @ alias   : chr "dial_facility"
#>  .. .. @ title   : chr "Medicare Dialysis Facilities"
#>  .. .. @ modified: Date[1:1], format: "2025-09-10"
#>  .. @ fields    : <class_fields>
#>  .. .. @ keys :List of 6
#>  .. .. .. $ 2025: chr [1:14] "state" "CCN" "Provider_Name" "city" ...
#>  .. .. .. $ 2024: chr [1:14] "state" "CCN" "Provider_Name" "city" ...
#>  .. .. .. $ 2023: chr [1:14] "state" "CCN" "Provider_Name" "city" ...
#>  .. .. .. $ 2022: chr [1:14] "state" "CCN" "Provider_Name" "city" ...
#>  .. .. .. $ 2021: chr [1:14] "State" "CCN" "Provider Name" "City" ...
#>  .. .. .. $ 2020: chr [1:14] "state" "provfs" "provname" "provcity" ...
#>  .. .. @ equal: logi FALSE
#>  .. @ dimensions: <class_dimensions>
#>  .. .. @ limit: int 5000
#>  .. .. @ total: int [1:6] 11985275 11679243 11716732 10821385 9701304 9289559
#>  .. .. @ pages: int [1:6] 2398 2336 2344 2165 1941 1858
#>  .. .. @ whole: logi FALSE
#>  .. @ year      : int [1:6] 2025 2024 2023 2022 2021 2020
#>  .. @ resources : chr [1:6] "https://data.cms.gov/data-api/v1/dataset-resources/7d4e7bd1-f08a-4fca-8085-6af24026a19a" ...
endpoint("man_state")
#> <class_caid>
#>  @ access: <class_current>
#>  .. @ identifier: chr "https://data.medicaid.gov/api/1/datastore/query/0e112ea8-8e8e-5dee-a7e2-7ed551c3baa4/0"
#>  .. @ metadata  : <class_metadata>
#>  .. .. @ alias   : chr "man_state"
#>  .. .. @ title   : chr "Managed Care Programs by State"
#>  .. .. @ modified: Date[1:1], format: "2018-08-22"
#>  .. @ fields    : <class_fields>
#>  .. .. @ keys : chr [1:69] "state" "program_name" "program_type" ...
#>  .. .. @ equal: logi FALSE
#>  .. @ dimensions: <class_dimensions>
#>  .. .. @ limit: int 8000
#>  .. .. @ total: int 195
#>  .. .. @ pages: int 1
#>  .. .. @ whole: logi TRUE
try(endpoint(c("asc_facility", "enterprise")))
#> Error in (function (alias)  : 
#>    Only one <endpoint> can be loaded at a time.
try(endpoint("unwind"))
#> Error in (function (alias)  : 
#>    "unwind" is not an <endpoint> alias.
#> ! "unwind" is a <collection> alias.
try(endpoint("ex"))
#> Error in (function (alias)  : 
#>    "ex" is not an <endpoint> alias.
collection("unwind")
#> <class_collection>
#>  @ title  : chr "Medicaid Unwinding Report"
#>  @ members:List of 4
#>  .. $ wind_mark    : <class_caid>
#>  ..  ..@ access: <class_current>
#>  .. .. .. @ identifier: chr "https://data.medicaid.gov/api/1/datastore/query/9a83ba5e-05f5-47f5-82de-f3a59233a912/0"
#>  .. .. .. @ metadata  : <class_metadata>
#>  .. .. .. .. @ alias   : chr "wind_mark"
#>  .. .. .. .. @ title   : chr "HealthCare.gov Marketplace Medicaid Unwinding Report"
#>  .. .. .. .. @ modified: Date[1:1], format: "2024-08-30"
#>  .. .. .. @ fields    : <class_fields>
#>  .. .. .. .. @ keys : chr [1:30] "state" "metric" "april_2023_net_count" "april_2023_net_percentage" ...
#>  .. .. .. .. @ equal: logi FALSE
#>  .. .. .. @ dimensions: <class_dimensions>
#>  .. .. .. .. @ limit: int 8000
#>  .. .. .. .. @ total: int 204
#>  .. .. .. .. @ pages: int 1
#>  .. .. .. .. @ whole: logi TRUE
#>  .. $ wind_trans   : <class_caid>
#>  ..  ..@ access: <class_current>
#>  .. .. .. @ identifier: chr "https://data.medicaid.gov/api/1/datastore/query/5636a78c-fe18-4229-aee1-e40fa910a8a0/0"
#>  .. .. .. @ metadata  : <class_metadata>
#>  .. .. .. .. @ alias   : chr "wind_trans"
#>  .. .. .. .. @ title   : chr "HealthCare.gov Transitions Marketplace Medicaid Unwinding Report"
#>  .. .. .. .. @ modified: Date[1:1], format: "2024-12-27"
#>  .. .. .. @ fields    : <class_fields>
#>  .. .. .. .. @ keys : chr [1:9] "state" "data_record_note" "metric" "time_period" ...
#>  .. .. .. .. @ equal: logi FALSE
#>  .. .. .. @ dimensions: <class_dimensions>
#>  .. .. .. .. @ limit: int 8000
#>  .. .. .. .. @ total: int 59527
#>  .. .. .. .. @ pages: int 8
#>  .. .. .. .. @ whole: logi FALSE
#>  .. $ wind_historic: <class_caid>
#>  ..  ..@ access: <class_current>
#>  .. .. .. @ identifier: chr "https://data.medicaid.gov/api/1/datastore/query/d30cfc7c-4b32-4df1-b2bf-e0a850befd77/0"
#>  .. .. .. @ metadata  : <class_metadata>
#>  .. .. .. .. @ alias   : chr "wind_historic"
#>  .. .. .. .. @ title   : chr "Separate CHIP Enrollment by Month and State Historic CAA/Unwinding Period"
#>  .. .. .. .. @ modified: Date[1:1], format: "2024-12-27"
#>  .. .. .. @ fields    : <class_fields>
#>  .. .. .. .. @ keys : chr [1:5] "state" "reporting_period" "release_date" "value" ...
#>  .. .. .. .. @ equal: logi FALSE
#>  .. .. .. @ dimensions: <class_dimensions>
#>  .. .. .. .. @ limit: int 8000
#>  .. .. .. .. @ total: int 780
#>  .. .. .. .. @ pages: int 1
#>  .. .. .. .. @ whole: logi TRUE
#>  .. $ wind_sbm     : <class_caid>
#>  ..  ..@ access: <class_current>
#>  .. .. .. @ identifier: chr "https://data.medicaid.gov/api/1/datastore/query/5670e72c-e44e-4282-ab67-4ebebaba3cbd/0"
#>  .. .. .. @ metadata  : <class_metadata>
#>  .. .. .. .. @ alias   : chr "wind_sbm"
#>  .. .. .. .. @ title   : chr "State-based Marketplace (SBM) Medicaid Unwinding Report"
#>  .. .. .. .. @ modified: Date[1:1], format: "2024-12-27"
#>  .. .. .. @ fields    : <class_fields>
#>  .. .. .. .. @ keys : chr [1:59] "state" "metric" "april_2023_count" "april_2023_percentage_applications" ...
#>  .. .. .. .. @ equal: logi FALSE
#>  .. .. .. @ dimensions: <class_dimensions>
#>  .. .. .. .. @ limit: int 8000
#>  .. .. .. .. @ total: int 128
#>  .. .. .. .. @ pages: int 1
#>  .. .. .. .. @ whole: logi TRUE
try(collection(c("asc_facility", "enterprise")))
#> Error in collection(c("asc_facility", "enterprise")) : 
#>    Only one <collection> can be loaded at a time.
try(collection("asc_facility"))
#> Error in collection("asc_facility") : 
#>    "asc_facility" is not a <collection> alias.
group("asc_facility", "enterprise")
#> <class_group>
#>  @ title  : chr "(asc_facility, enterprise)"
#>  @ members:List of 2
#>  .. $ asc_facility: <class_prov>
#>  ..  ..@ access: <class_current>
#>  .. .. .. @ identifier: chr "https://data.cms.gov/provider-data/api/1/datastore/query/4jcv-atw7/0"
#>  .. .. .. @ metadata  : <class_metadata>
#>  .. .. .. .. @ alias   : chr "asc_facility"
#>  .. .. .. .. @ title   : chr "Ambulatory Surgical Center Quality Measures - Facility"
#>  .. .. .. .. @ modified: Date[1:1], format: "2025-06-27"
#>  .. .. .. @ fields    : <class_fields>
#>  .. .. .. .. @ keys : chr [1:50] "facility_name" "facility_id" "npi" "citytown" ...
#>  .. .. .. .. @ equal: logi FALSE
#>  .. .. .. @ dimensions: <class_dimensions>
#>  .. .. .. .. @ limit: int 1500
#>  .. .. .. .. @ total: int 11088
#>  .. .. .. .. @ pages: int 8
#>  .. .. .. .. @ whole: logi FALSE
#>  .. $ enterprise  : <class_caid>
#>  ..  ..@ access: <class_current>
#>  .. .. .. @ identifier: chr "https://data.medicaid.gov/api/1/datastore/query/13a06cdb-6bbb-4f86-bba7-9d6f3db41090/0"
#>  .. .. .. @ metadata  : <class_metadata>
#>  .. .. .. .. @ alias   : chr "enterprise"
#>  .. .. .. .. @ title   : chr "Medicaid Enterprise System Datatable"
#>  .. .. .. .. @ modified: Date[1:1], format: "2025-05-21"
#>  .. .. .. @ fields    : <class_fields>
#>  .. .. .. .. @ keys : chr [1:13] "implementation_year" "policyupdate_type" "policyupdate_title" "potential_mes_impact" ...
#>  .. .. .. .. @ equal: logi FALSE
#>  .. .. .. @ dimensions: <class_dimensions>
#>  .. .. .. .. @ limit: int 8000
#>  .. .. .. .. @ total: int 68
#>  .. .. .. .. @ pages: int 1
#>  .. .. .. .. @ whole: logi TRUE
try(group("asc_facility"))
#> Error in group("asc_facility") : 
#>    A <group> must contain more than one <endpoint>.
#> → Run endpoint("asc_facility") to load this endpoint.
try(group("util"))
#> Error in group("util") : 
#>    A <group> cannot contain a <collection>.
#> → Run e.g., collection("util").