Is there an API that allows direct download of nursing home provider data files from data.cms.gov each month

Until recently we used the RSocrata package to download publicly available files from the data.medicare.gov website. A few months ago the datasets were moved to data.cms.gov and the former datasets are no longer available. I have tried to figure out how to accomplish the same thing with the data.cms.gov site without success.

the code above downloads the first 500 records and is generated by using the example at https://data.cms.gov/provider-data/dataset/djen-97ju

There is a csv version of the dataset produced each month but the url changes with each update. So far the best solution I can come up with is to download the metadata for the dataset

fromJSON(file = 'https://data.cms.gov/provider-data/dataset/djen-97ju')

which contains the most recent url, parse the results, and then use the latest url to download the data I need. Wondering if anyone has found a less onerous way to accomplish this. Not stuck on using R to accomplish this, that is just the language used for the code I inherited.



Read more here: https://stackoverflow.com/questions/65728117/is-there-an-api-that-allows-direct-download-of-nursing-home-provider-data-files

Content Attribution

This content was originally published by jgiorgio at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: