Load a data endpoint or collection by its alias.
Arguments
- alias
<chr>
endpoint or collection alias- ...
<
dynamic-dots
> endpoint aliases to be grouped- .title
<chr>
Group title. Defaults toNULL
, which will concatenate the aliases for the title.
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: tibble [6 × 6] (S3: tbl_df/tbl/data.frame)
#> $ year : int [1:6] 2025 2024 2023 2022 2021 2020
#> $ modified : Date[1:6], format: "2025-06-24" "2024-02-29" ...
#> $ temporal : chr [1:6] "2025-01-01 • 2025-12-31" "2024-01-01 • 2024-12-31" "2023-01-01 • 2023-12-31" "2022-01-01 • 2022-12-31" ...
#> $ identifier: chr [1:6] "https://data.cms.gov/data-api/v1/dataset/7d4e7bd1-f08a-4fca-8085-6af24026a19a/data" "https://data.cms.gov/data-api/v1/dataset/62d125ff-c959-4c5c-8a46-8cacba50bfd4/data" "https://data.cms.gov/data-api/v1/dataset/200e7e7e-a5a6-4450-ba18-ab53d237cc45/data" "https://data.cms.gov/data-api/v1/dataset/ebc64ad1-164c-455a-80ca-cb0753e44a46/data" ...
#> $ download : chr [1:6] "https://data.cms.gov/sites/default/files/2024-02/b2c2658d-e19d-48db-8b3b-9d343a4d395f/dfr_facility_socrata_fy2024.csv" "https://data.cms.gov/sites/default/files/2023-02/2eeb2aa7-05cd-4b7a-a4b2-62e82da03b96/dfr_facility_socrata_fy2023.csv" "https://data.cms.gov/sites/default/files/2022-02/48802694-7450-47c3-a61f-dad7d392037c/dfr_facility_socrata_fy2022.csv" "https://data.cms.gov/sites/default/files/2021-01/FY_2021_Facility_Level_Dialysis_Facility_Reports.csv" ...
#> $ resources : chr [1:6] "https://data.cms.gov/data-api/v1/dataset-resources/7d4e7bd1-f08a-4fca-8085-6af24026a19a" "https://data.cms.gov/data-api/v1/dataset-resources/62d125ff-c959-4c5c-8a46-8cacba50bfd4" "https://data.cms.gov/data-api/v1/dataset-resources/200e7e7e-a5a6-4450-ba18-ab53d237cc45" "https://data.cms.gov/data-api/v1/dataset-resources/ebc64ad1-164c-455a-80ca-cb0753e44a46" ...
#> .. @ metadata :List of 7
#> .. .. $ alias : chr "dial_facility"
#> .. .. $ title : chr "Medicare Dialysis Facilities"
#> .. .. $ description: chr "The Medicare Dialysis Facilities data provides information on clinical and patient measures for Medicare-certif"| __truncated__
#> .. .. $ periodicity: chr "Annually [R/P1Y]"
#> .. .. $ dictionary : chr "https://data.cms.gov/sites/default/files/2025-03/FY2025%20PUF%20Data%20Dictionary.xlsx"
#> .. .. $ site : chr "https://data.cms.gov/quality-of-care/medicare-dialysis-facilities"
#> .. .. $ references : chr "https://data.cms.gov/sites/default/files/2025-03/FY2025_DFR_Guide.pdf"
#> .. @ fields : <class_fields>
#> .. .. @ keys: chr [1:14] "Alternate_CCNs" "CCN" "Chain" "ESRD_Network" ...
#> .. @ dimensions: <class_dimensions>
#> .. .. @ limit: int 5000
#> .. .. @ total: int 11985275
#> .. .. @ pages: int 2398
endpoint("man_mltss")
#> <class_caid>
#> @ access: <class_current>
#> .. @ identifier: chr "https://data.medicaid.gov/api/1/datastore/query/5394bcab-c748-5e4b-af07-b5bf77ed3aa3/0"
#> .. @ metadata :List of 5
#> .. .. $ alias : chr "man_mltss"
#> .. .. $ title : chr "Managed Long Term Services and Supports (MLTSS) Enrollees"
#> .. .. $ description: chr "1. Enrollment includes both Medicaid-only and Medicare-Medicaid (dual) enrollees. For both types of enrollees, "| __truncated__
#> .. .. $ modified : Date[1:1], format: "2024-10-16"
#> .. .. $ periodicity: chr "Decennially [R/P10Y]"
#> .. @ fields : <class_fields>
#> .. .. @ keys: chr [1:8] "comprehensive_managed_care_ltss_enrollees" ...
#> .. @ dimensions: <class_dimensions>
#> .. .. @ limit: int 8000
#> .. .. @ total: int 399
#> .. .. @ pages: int 399
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 :List of 5
#> .. .. .. .. $ alias : chr "wind_mark"
#> .. .. .. .. $ title : chr "HealthCare.gov Marketplace Medicaid Unwinding Report"
#> .. .. .. .. $ description: chr "Metrics from individual Marketplaces during the current reporting period. The report includes data for the stat"| __truncated__
#> .. .. .. .. $ modified : Date[1:1], format: "2024-08-30"
#> .. .. .. .. $ periodicity: chr "Decennially [R/P10Y]"
#> .. .. .. @ fields : <class_fields>
#> .. .. .. .. @ keys: chr [1:30] "april_2023_net_count" "april_2023_net_percentage" "april_2024_cumulative_count" "april_2024_net_count" ...
#> .. .. .. @ dimensions: <class_dimensions>
#> .. .. .. .. @ limit: int 8000
#> .. .. .. .. @ total: int 204
#> .. .. .. .. @ pages: int 204
#> .. $ wind_trans : <class_caid>
#> .. ..@ access: <class_current>
#> .. .. .. @ identifier: chr "https://data.medicaid.gov/api/1/datastore/query/5636a78c-fe18-4229-aee1-e40fa910a8a0/0"
#> .. .. .. @ metadata :List of 5
#> .. .. .. .. $ alias : chr "wind_trans"
#> .. .. .. .. $ title : chr "HealthCare.gov Transitions Marketplace Medicaid Unwinding Report"
#> .. .. .. .. $ description: chr "Metrics from individual Marketplaces during the current reporting period. The report includes data for the stat"| __truncated__
#> .. .. .. .. $ modified : Date[1:1], format: "2024-12-27"
#> .. .. .. .. $ periodicity: chr "Decennially [R/P10Y]"
#> .. .. .. @ fields : <class_fields>
#> .. .. .. .. @ keys: chr [1:9] "count_of_individuals_whose_medicaid_or_chip_coverage_was_te_dd11" "cumulative_count_of_individuals_whose_medicaid_or_chip_cove_28d9" "cumulative_percentage_of_individuals_whose_medicaid_or_chip_6ac2" "data_record_note" ...
#> .. .. .. @ dimensions: <class_dimensions>
#> .. .. .. .. @ limit: int 8000
#> .. .. .. .. @ total: int 59527
#> .. .. .. .. @ pages: int 8
#> .. $ wind_historic: <class_caid>
#> .. ..@ access: <class_current>
#> .. .. .. @ identifier: chr "https://data.medicaid.gov/api/1/datastore/query/d30cfc7c-4b32-4df1-b2bf-e0a850befd77/0"
#> .. .. .. @ metadata :List of 5
#> .. .. .. .. $ alias : chr "wind_historic"
#> .. .. .. .. $ title : chr "Separate CHIP Enrollment by Month and State Historic CAA/Unwinding Period"
#> .. .. .. .. $ description: chr "<p>This historic dataset with total enrollment in separate CHIP programs by month and state was created to fulf"| __truncated__
#> .. .. .. .. $ modified : Date[1:1], format: "2024-12-27"
#> .. .. .. .. $ periodicity: chr "Monthly [R/P1M]"
#> .. .. .. @ fields : <class_fields>
#> .. .. .. .. @ keys: chr [1:5] "data_notes" "release_date" "reporting_period" "state" ...
#> .. .. .. @ dimensions: <class_dimensions>
#> .. .. .. .. @ limit: int 8000
#> .. .. .. .. @ total: int 780
#> .. .. .. .. @ pages: int 780
#> .. $ wind_sbm : <class_caid>
#> .. ..@ access: <class_current>
#> .. .. .. @ identifier: chr "https://data.medicaid.gov/api/1/datastore/query/5670e72c-e44e-4282-ab67-4ebebaba3cbd/0"
#> .. .. .. @ metadata :List of 5
#> .. .. .. .. $ alias : chr "wind_sbm"
#> .. .. .. .. $ title : chr "State-based Marketplace (SBM) Medicaid Unwinding Report"
#> .. .. .. .. $ description: chr "Metrics from individual Marketplaces during the current reporting period. The report includes data for the stat"| __truncated__
#> .. .. .. .. $ modified : Date[1:1], format: "2024-12-27"
#> .. .. .. .. $ periodicity: chr "Decennially [R/P10Y]"
#> .. .. .. @ fields : <class_fields>
#> .. .. .. .. @ keys: chr [1:59] "april_2023_count" "april_2023_percentage_account_transfers" "april_2023_percentage_applications" "april_2024_count" ...
#> .. .. .. @ dimensions: <class_dimensions>
#> .. .. .. .. @ limit: int 8000
#> .. .. .. .. @ total: int 128
#> .. .. .. .. @ pages: int 128
try(collection(c("asc_facility", "enterprise")))
#> Error in collection(c("asc_facility", "enterprise")) :
#> ✖ Only one <collection> alias 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 :List of 10
#> .. .. .. .. $ alias : chr "asc_facility"
#> .. .. .. .. $ title : chr "Ambulatory Surgical Center Quality Measures - Facility"
#> .. .. .. .. $ description: chr "A list of ambulatory surgical centers participating in the Ambulatory Surgical Center Quality Reporting (ASCQR)"| __truncated__
#> .. .. .. .. $ modified : Date[1:1], format: "2025-06-27"
#> .. .. .. .. $ group : chr "Hospitals"
#> .. .. .. .. $ issued : Date[1:1], format: "2025-07-16"
#> .. .. .. .. $ released : Date[1:1], format: "2025-08-06"
#> .. .. .. .. $ download : chr "https://data.cms.gov/provider-data/sites/default/files/resources/dd03994fc93e296bb0297f1cd43cc987_1752732307/ASC_Facility.csv"
#> .. .. .. .. $ dictionary : chr "https://data.cms.gov/provider-data/dataset/4jcv-atw7#data-dictionary"
#> .. .. .. .. $ site : chr "https://data.cms.gov/provider-data/dataset/4jcv-atw7"
#> .. .. .. @ fields : <class_fields>
#> .. .. .. .. @ keys: chr [1:50] "asc11_footnote" "asc11_rate" "asc12_footnote" "asc12_interval_lower_limit" ...
#> .. .. .. @ dimensions: <class_dimensions>
#> .. .. .. .. @ limit: int 1500
#> .. .. .. .. @ total: int 11088
#> .. .. .. .. @ pages: int 8
#> .. $ enterprise : <class_caid>
#> .. ..@ access: <class_current>
#> .. .. .. @ identifier: chr "https://data.medicaid.gov/api/1/datastore/query/13a06cdb-6bbb-4f86-bba7-9d6f3db41090/0"
#> .. .. .. @ metadata :List of 4
#> .. .. .. .. $ alias : chr "enterprise"
#> .. .. .. .. $ title : chr "Medicaid Enterprise System Datatable"
#> .. .. .. .. $ description: chr "Medicaid Enterprise System Datatable"
#> .. .. .. .. $ modified : Date[1:1], format: "2025-05-21"
#> .. .. .. @ fields : <class_fields>
#> .. .. .. .. @ keys: chr [1:13] "category_of_potential_impact" "certification_activities_required" "compliance_day" "compliance_month" ...
#> .. .. .. @ dimensions: <class_dimensions>
#> .. .. .. .. @ limit: int 8000
#> .. .. .. .. @ total: int 68
#> .. .. .. .. @ pages: int 68
try(group("asc_facility"))
#> Error in group("asc_facility") :
#> ✖ A <group> must contain at least two <endpoints>.
#> → Run endpoint("asc_facility") to load an endpoint.
try(group("util"))
#> Error in group("util") :
#> ✖ A <group> cannot contain a <collection>.
#> → Run e.g., collection("util").