#!/usr/bin/env python # coding: utf-8 # # Germany: LK Dachau (Bayern) # # * Homepage of project: https://oscovida.github.io # * Plots are explained at http://oscovida.github.io/plots.html # * [Execute this Jupyter Notebook using myBinder](https://mybinder.org/v2/gh/oscovida/binder/master?filepath=ipynb/Germany-Bayern-LK-Dachau.ipynb) # In[ ]: import datetime import time start = datetime.datetime.now() print(f"Notebook executed on: {start.strftime('%d/%m/%Y %H:%M:%S%Z')} {time.tzname[time.daylight]}") # In[ ]: get_ipython().run_line_magic('config', "InlineBackend.figure_formats = ['svg']") from oscovida import * # In[ ]: overview(country="Germany", subregion="LK Dachau", weeks=5); # In[ ]: overview(country="Germany", subregion="LK Dachau"); # In[ ]: compare_plot(country="Germany", subregion="LK Dachau", dates="2020-03-15:"); # In[ ]: # load the data cases, deaths = germany_get_region(landkreis="LK Dachau") # get population of the region for future normalisation: inhabitants = population(country="Germany", subregion="LK Dachau") print(f'Population of country="Germany", subregion="LK Dachau": {inhabitants} people') # compose into one table table = compose_dataframe_summary(cases, deaths) # show tables with up to 500 rows pd.set_option("max_rows", 500) # display the table table # # Explore the data in your web browser # # - 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-Dachau.ipynb) # - and wait (~1 to 2 minutes) # - Then press SHIFT+RETURN to advance code cell to code cell # - See http://jupyter.org for more details on how to use Jupyter Notebook # # Acknowledgements: # # - Johns Hopkins University provides data for countries # - Robert Koch Institute provides data for within Germany # - Atlo Team for gathering and providing data from Hungary (https://atlo.team/koronamonitor/) # - Open source and scientific computing community for the data tools # - Github for hosting repository and html files # - Project Jupyter for the Notebook and binder service # - The H2020 project Photon and Neutron Open Science Cloud ([PaNOSC](https://www.panosc.eu/)) # # -------------------- # In[ ]: print(f"Download of data from Johns Hopkins university: cases at {fetch_cases_last_execution()} and " f"deaths at {fetch_deaths_last_execution()}.") # In[ ]: # to force a fresh download of data, run "clear_cache()" # In[ ]: print(f"Notebook execution took: {datetime.datetime.now()-start}")