Finished UK death data analysis
[covid19.git] / covid.md
index 5b762de0275f32355e221821b654967a178b797e..0dcc3539f91d5996dc67b8c109c78a2af3201f69 100644 (file)
--- a/covid.md
+++ b/covid.md
@@ -499,6 +499,35 @@ for c in C7s:
 data_since_threshold.replace([np.inf, -np.inf], np.nan).groupby(level=1).last().loc[COUNTRIES_ALL]#, [doubling_time]]
 ```
 
+```python
+data_since_threshold.replace([np.inf, -np.inf], np.nan).groupby(level=1).last().loc[['UK', 'DE', 'IT']]#, [doubling_time]]
+```
+
+```python
+it_since_threshold = data_since_threshold.replace([np.inf, -np.inf], np.nan).loc[(slice(None), ['IT']), :]
+it_since_threshold.index.max()[0]
+```
+
+```python
+uk_projection = data_since_threshold.replace([np.inf, -np.inf], np.nan).loc[(slice(None), ['UK']), :]
+uk_projection.index.max()[0]
+```
+
+```python
+proj = it_since_threshold.loc[(slice(60, 77), slice(None)), ['cases', 'deaths']]
+proj.index = pd.MultiIndex.from_tuples([(n, 'UK') for n, _ in proj.index], names=proj.index.names)
+proj
+```
+
+```python
+uk_projection = uk_projection.append(proj, sort=True)
+uk_projection.deaths.sum()
+```
+
+```python
+it_since_threshold.deaths.sum()
+```
+
 ```python
 
 ```