socratasoda

data.medicare.gov/resource/4pq5-n9py.json Numbers as Dates


Calling the API https://data.medicare.gov/resource/4pq5-n9py.json returns erratic results.

{
  ...
  "reported_cna_staffing_hours_per_resident_per_day" : "2.53304",
  "cycle_2_number_of_complaint_health_deficiencies" : "2017-06-22T00:00:00",
  "cycle_2_health_deficiency_score" : "0",
  ...
}

I believe cycle_2_number_of_complaint_health_deficiencies should be a number. The data on the website is correct so I'm assuming that it is a problem with the API


Solution

  • It appears that field is defined as a floating timestamp. It appears the human readable name, Rating Cycle 1 Standard Survey Health Date, differs from the API name which you see on the API call. Looks like it's more an issue with confusing naming conventions.

    Take a look at the metadata page for the underlying API names.