HOTFIX: Point hospitalization data scraper to new CHHS API resource #191
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Per data.ca.gov, that CKAN resource has been deprecated and replaced by one provided by CHHS. The values and the structure appear to be mostly the same, so this hotfix mainly just points our code to the new resource.
One note: It looks like the CHHS resource doesn't return as much meta data about each of the fields as the prior CA.gov resource. Here's what the raw data looks like for the
fields
key:I don't think that's super critical, since we're not really using most of those values on the front end anyhow, but worth being aware of.
In addition, I spotted two other things:
After diffing the data from CHHS with the latest pull that we had from the prior CA.gov resource, I noticed that the
_id
field values are different for same given date, for the given county. Probably to be expected and of no consequence for our purposes.Floats are being represented as strings in the raw data (as one might infer from the "text" type in the field descriptions), which we previously hadn't encountered but I've now added handling for.
This script still needs some logging for automated alerts; I figure that can be handled in a separate PR.
Fixes #187