Closed gavento closed 4 years ago
Quick hack: assume that the country has (close to) 0 infected at some point, take -minimum as the initial value. (Tested for Iran on currently live data and matches well.) See: https://github.com/epidemics/covid/blob/data_pipeline/data-prep/process_data_hdf.py#L29
What's the status on this? Is it being handled on the data end or the d3 end?
@gavento Do you think it makes sense to add it to the lines data (in the pipeline), e.g. extending the notion spec to:
"data": {"infected_per_1000": {
"start": "DATE",
"initial_infection_count": 343, # <- already per_1000 so it's the same scale
"mitigation_to_parameter_mapping": {
"Weak seasonality, small air traffic restrictions": {"beta": 0.5, "alpha": 0.3},
"Medium seasonality, small air traffic restrictions": {"beta": 0.7, "alpha": 0.3}
...
}
"mitigations": {
"None": {
"Weak seasonality, small air traffic restrictions": [2.3, 3.4, 5.6, ...],
"Medium seasonality, small air traffic restrictions": [2.2, 3.1, 4.2, ...],
...}
"Weak": { ... },
"Medium": { ... },
"Strong": { ... },
}}}
That would then be enough to set as a start of yaxis
, right @wolverdude ?
I mean to have it in this data section (it should be FT_Infected
):
"data": {"estimates": {
"days": {
"2020-03-16": {
"JH_Deaths": 21,
"JH_Confirmed": 354, ## These are all confirmed cases, including dead and recovered
"JH_Recovered": 63,
"JH_Infected": 270, ## This is the number of currently infected
"FT_Infected": 2138, ## Mean estimate
"FT_Infected_q05": 453, ## lower 90% confidence interval (0.05 quantile)
"FT_Infected_q95": 6435 ## upper 90% confidence interval (0.95 quantile)
},
"2020-03-17": { ... },
Would be resolved easily with #232
Partially resolved by https://github.com/epidemics/epifor/pull/10 - now just needs normalization by population (to match units)
(Just to be clear: I think that anyone can do it when they have time, we have reliable populations for all countries and most cities except the small / strange ones.)
Closing, the quantity can be easily computed in JS by dividing the two. (As is already done in the case-map?)
The negative infected numbers we saw in line data do make sense, since the countries should not start at 0 infected but at the number we set them to be in the simulation. Heavily pre-infected countries like Iran then quickly get into negative. Not sure how to get this data in the fastest way, though - they are not a part of the GV export not HDF5.