{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Germany: LK Freyung-Grafenau (Bayern)\n", "\n", "* Homepage of project: https://oscovida.github.io\n", "* Plots are explained at http://oscovida.github.io/plots.html\n", "* [Execute this Jupyter Notebook using myBinder](https://mybinder.org/v2/gh/oscovida/binder/master?filepath=ipynb/Germany-Bayern-LK-Freyung-Grafenau.ipynb)" ] }, { "cell_type": "code", "metadata": {}, "source": [ "import datetime\n", "import time\n", "\n", "start = datetime.datetime.now()\n", "print(f\"Notebook executed on: {start.strftime('%d/%m/%Y %H:%M:%S%Z')} {time.tzname[time.daylight]}\")" ], "outputs": [], "execution_count": null }, { "cell_type": "code", "metadata": {}, "source": [ "%config InlineBackend.figure_formats = ['svg']\n", "from oscovida import *" ], "outputs": [], "execution_count": null }, { "cell_type": "code", "metadata": {}, "source": [ "overview(country=\"Germany\", subregion=\"LK Freyung-Grafenau\", weeks=5);" ], "outputs": [], "execution_count": null }, { "cell_type": "code", "metadata": {}, "source": [ "overview(country=\"Germany\", subregion=\"LK Freyung-Grafenau\");" ], "outputs": [], "execution_count": null }, { "cell_type": "code", "metadata": {}, "source": [ "compare_plot(country=\"Germany\", subregion=\"LK Freyung-Grafenau\", dates=\"2020-03-15:\");\n" ], "outputs": [], "execution_count": null }, { "cell_type": "code", "metadata": {}, "source": [ "# load the data\n", "cases, deaths = germany_get_region(landkreis=\"LK Freyung-Grafenau\")\n", "\n", "# get population of the region for future normalisation:\n", "inhabitants = population(country=\"Germany\", subregion=\"LK Freyung-Grafenau\")\n", "print(f'Population of country=\"Germany\", subregion=\"LK Freyung-Grafenau\": {inhabitants} people')\n", "\n", "# compose into one table\n", "table = compose_dataframe_summary(cases, deaths)\n", "\n", "# show tables with up to 500 rows\n", "pd.set_option(\"max_rows\", 500)\n", "\n", "# display the table\n", "table" ], "outputs": [], "execution_count": null }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Explore the data in your web browser\n", "\n", "- If you want to execute this notebook, [click here to use myBinder](https://mybinder.org/v2/gh/oscovida/binder/master?filepath=ipynb/Germany-Bayern-LK-Freyung-Grafenau.ipynb)\n", "- and wait (~1 to 2 minutes)\n", "- Then press SHIFT+RETURN to advance code cell to code cell\n", "- See http://jupyter.org for more details on how to use Jupyter Notebook" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Acknowledgements:\n", "\n", "- Johns Hopkins University provides data for countries\n", "- Robert Koch Institute provides data for within Germany\n", "- Atlo Team for gathering and providing data from Hungary (https://atlo.team/koronamonitor/)\n", "- Open source and scientific computing community for the data tools\n", "- Github for hosting repository and html files\n", "- Project Jupyter for the Notebook and binder service\n", "- The H2020 project Photon and Neutron Open Science Cloud ([PaNOSC](https://www.panosc.eu/))\n", "\n", "--------------------" ] }, { "cell_type": "code", "metadata": {}, "source": [ "print(f\"Download of data from Johns Hopkins university: cases at {fetch_cases_last_execution()} and \"\n", " f\"deaths at {fetch_deaths_last_execution()}.\")" ], "outputs": [], "execution_count": null }, { "cell_type": "code", "metadata": {}, "source": [ "# to force a fresh download of data, run \"clear_cache()\"" ], "outputs": [], "execution_count": null }, { "cell_type": "code", "metadata": {}, "source": [ "print(f\"Notebook execution took: {datetime.datetime.now()-start}\")\n" ], "outputs": [], "execution_count": null } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.1" } }, "nbformat": 4, "nbformat_minor": 4 }