From 3c7e56f23ec7ded0f3c46b8eef2df493dac65fa2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rok=20Ro=C5=A1kar?= <rok.roskar@sdsc.ethz.ch>
Date: Wed, 8 Jul 2020 00:00:57 +0000
Subject: [PATCH] adjust limits and remove italy plots

---
 notebooks/Dashboard.ipynb | 88 +++++++++++++++++++--------------------
 1 file changed, 44 insertions(+), 44 deletions(-)

diff --git a/notebooks/Dashboard.ipynb b/notebooks/Dashboard.ipynb
index 102054769..72c5d7c25 100644
--- a/notebooks/Dashboard.ipynb
+++ b/notebooks/Dashboard.ipynb
@@ -188,7 +188,7 @@
    "outputs": [],
    "source": [
     "# select countries over a certain per capita case threshold\n",
-    "per_capita_thresh = 300\n",
+    "per_capita_thresh = 500\n",
     "countries_over_thresh_per_capita = latest_df[latest_df.positive_100k > per_capita_thresh].country_label\n",
     "countries_over_thresh_per_capita = [c for c in countries_over_thresh_per_capita if c not in set(['Andorra', 'Iceland', 'San Marino'])]\n",
     "\n",
@@ -243,10 +243,10 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "since_df = helper.make_since_df(\n",
-    "    jhu_df[jhu_df.country_label.isin(countries_over_thresh_per_capita)], \n",
-    "    region_column='country_label'\n",
-    ")"
+    "# since_df = helper.make_since_df(\n",
+    "#     jhu_df[jhu_df.country_label.isin(countries_over_thresh_per_capita)], \n",
+    "#     region_column='country_label'\n",
+    "# )"
    ]
   },
   {
@@ -255,28 +255,28 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "sort_order = since_df.groupby(\n",
-    "    'country_label').max().sort_values(\n",
-    "    'positive', ascending=False).index.tolist()\n",
-    "# Exclude China in this plot because its numbers are far greater then everywhere else\n",
-    "sort_order = [o for o in sort_order if o != 'China']\n",
-    "chart = helper.facetted_growth_plot(\n",
-    "  since_df[since_df['country_label'] != 'China'], \n",
-    "  'sinceDay0',\n",
-    "  'positive_100k',\n",
-    "  sort_order,\n",
-    "  'Italy',\n",
-    "  \"Growth of cases per 100k population from case 100, compared to Italy\",\n",
-    "  \"Cases/100k\"\n",
-    ")\n",
-    "display(chart)\n",
-    "display(HTML('''\n",
-    "<p style=\"font-size: smaller\">Data Sources: \n",
-    "  <a href=\"https://github.com/CSSEGISandData/COVID-19\">JHU CSSE</a>,\n",
-    "  <a href=\"https://data.worldbank.org/indicator/SP.POP.TOTL\">World Bank</a>,\n",
-    "  <a href=\"https://worldmap.harvard.edu/data/geonode:country_centroids_az8\">Harvard Worldmap</a>\n",
-    "</p>\n",
-    "<p style=\"font-size: smaller\">Inspired by <a href=\"https://covid19dashboards.com/growth-analysis/\">Thomas Wiecki</a>'''))"
+    "# sort_order = since_df.groupby(\n",
+    "#     'country_label').max().sort_values(\n",
+    "#     'positive', ascending=False).index.tolist()\n",
+    "# # Exclude China in this plot because its numbers are far greater then everywhere else\n",
+    "# sort_order = [o for o in sort_order if o != 'China']\n",
+    "# chart = helper.facetted_growth_plot(\n",
+    "#   since_df[since_df['country_label'] != 'China'], \n",
+    "#   'sinceDay0',\n",
+    "#   'positive_100k',\n",
+    "#   sort_order,\n",
+    "#   'Italy',\n",
+    "#   \"Growth of cases per 100k population from case 100, compared to Italy\",\n",
+    "#   \"Cases/100k\"\n",
+    "# )\n",
+    "# display(chart)\n",
+    "# display(HTML('''\n",
+    "# <p style=\"font-size: smaller\">Data Sources: \n",
+    "#   <a href=\"https://github.com/CSSEGISandData/COVID-19\">JHU CSSE</a>,\n",
+    "#   <a href=\"https://data.worldbank.org/indicator/SP.POP.TOTL\">World Bank</a>,\n",
+    "#   <a href=\"https://worldmap.harvard.edu/data/geonode:country_centroids_az8\">Harvard Worldmap</a>\n",
+    "# </p>\n",
+    "# <p style=\"font-size: smaller\">Inspired by <a href=\"https://covid19dashboards.com/growth-analysis/\">Thomas Wiecki</a>'''))"
    ]
   },
   {
@@ -286,23 +286,23 @@
    "outputs": [],
    "source": [
     "# Same with log scale\n",
-    "chart = helper.facetted_growth_plot(\n",
-    "  since_df, \n",
-    "  'sinceDay0',\n",
-    "  'positive_100k',\n",
-    "  sort_order,\n",
-    "  'Italy',\n",
-    "  \"Growth of cases per 100k population from case 100, compared to Italy (log scale)\",\n",
-    "  \"Cases/100k\",\n",
-    "  'log'\n",
-    ")\n",
-    "display(chart)\n",
-    "display(HTML('''\n",
-    "<p style=\"font-size: smaller\">Data Sources: \n",
-    "  <a href=\"https://github.com/CSSEGISandData/COVID-19\">JHU CSSE</a>,\n",
-    "  <a href=\"https://data.worldbank.org/indicator/SP.POP.TOTL\">World Bank</a>,\n",
-    "  <a href=\"https://worldmap.harvard.edu/data/geonode:country_centroids_az8\">Harvard Worldmap</a>\n",
-    "</p>'''))"
+    "# chart = helper.facetted_growth_plot(\n",
+    "#   since_df, \n",
+    "#   'sinceDay0',\n",
+    "#   'positive_100k',\n",
+    "#   sort_order,\n",
+    "#   'Italy',\n",
+    "#   \"Growth of cases per 100k population from case 100, compared to Italy (log scale)\",\n",
+    "#   \"Cases/100k\",\n",
+    "#   'log'\n",
+    "# )\n",
+    "# display(chart)\n",
+    "# display(HTML('''\n",
+    "# <p style=\"font-size: smaller\">Data Sources: \n",
+    "#   <a href=\"https://github.com/CSSEGISandData/COVID-19\">JHU CSSE</a>,\n",
+    "#   <a href=\"https://data.worldbank.org/indicator/SP.POP.TOTL\">World Bank</a>,\n",
+    "#   <a href=\"https://worldmap.harvard.edu/data/geonode:country_centroids_az8\">Harvard Worldmap</a>\n",
+    "# </p>'''))"
    ]
   },
   {
-- 
GitLab