From c98aca3f2312913e59a2d50c4021a9c120af0987 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rok=20Ro=C5=A1kar?= <rok.roskar@sdsc.ethz.ch> Date: Sun, 22 Nov 2020 23:50:01 +0000 Subject: [PATCH] chore: update ecdc notebook --- notebooks/covid-19-ecdc.ipynb | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/notebooks/covid-19-ecdc.ipynb b/notebooks/covid-19-ecdc.ipynb index f5f731bfb..31ca7cbfa 100644 --- a/notebooks/covid-19-ecdc.ipynb +++ b/notebooks/covid-19-ecdc.ipynb @@ -81,15 +81,33 @@ "metadata": {}, "outputs": [], "source": [ - "nthresh=500000\n", - "country_max_ser = df.set_index(['country_label', 'date'])['positive'].groupby(level='country_label').max()\n", + "df.columns" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "nthresh=3000\n", + "country_max_ser = df.set_index(['country_label', 'date'])['positive_100k'].groupby(level='country_label').max()\n", "countries_over_thresh = country_max_ser[country_max_ser>nthresh].index\n", "countries_over_thresh = [c for c in countries_over_thresh if c not in set(['Andorra', 'Iceland', 'San Marino'])]\n", "\n", - "start_date = datetime.fromisoformat('2020-02-01')\n", + "start_date = datetime.fromisoformat('2020-08-01')\n", "thresh_df = df.loc[(df.date > start_date) & (df.country_label.isin(countries_over_thresh))]" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "df.columns" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -144,6 +162,7 @@ " height=150,\n", " width=150\n", ")\n", + "chart.resolve_scale(y='independent')\n", "display(chart)\n", "display(html_credits)" ] -- GitLab