Closed mikelehen closed 2 years ago
Let me know if I'm missing something, but I don't seem to see any data for these columns under the csv timeseries: https://data.covidactnow.org/snapshot/3150/v2/states.timeseries.csv https://data.covidactnow.org/snapshot/3150/v2/counties.timeseries.csv https://data.covidactnow.org/snapshot/3150/v2/county/MA.timeseries.json
Edit:
I think maybe we need to add
communityLevels: CommunityLevels = pydantic.Field(...)
to RegionTimeseriesRowWithHeader
in api/can_api_v2_definition.py
similar to how cdcTransmissionLevel
is added, but I'm not 100% sure
Hrm. You don't seem to be missing something. Good catch! I'll take a look. It also looks like the full API build failed to generate some endpoints properly, e.g. county data for DC and MP.
Oh huh, I wonder if that has to do with HSAs--I don't think MP counties are mapped to HSA (I don't know about DC) so I wonder if that might be causing a problem. This could be an issue not with this PR specifically, but the new metrics using HSA data
Wires up
communityLevels.cdcCommunityLevel
andcommunityLevels.canCommunityLevel
.All of the changes (except my last commit to ffill() the metrics before calculating canCommunityLevel) are in this snapshot which is visible at https://covid-projections-git-mikelehen-wire-up-comm-a4e145-covidactnow.vercel.app/?s=31461972.
The ffill() change was validated locally with
./run.py api generate-api-v2 --state ID output output/api
. An example county with the change in effect can be found here where you'll seecommunityLevelTimeseries.canCommunityLevel
has no gaps since we're forward-filling the nans in the metrics.