Files
HowBadIsMyBatch/src/intensivstationen/Intensivstationen.ipynb
2022-03-16 18:21:45 +01:00

5098 lines
123 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "9de5907f-18f5-4cb1-903e-26028ff1fa03",
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"from urllib import request\n",
"\n",
"pd.set_option('display.max_rows', 100)\n",
"pd.set_option('display.max_columns', None)\n",
"pd.set_option('mode.chained_assignment', 'raise')"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "dfa836ec",
"metadata": {},
"outputs": [],
"source": [
"needsUpdate = False"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "79de4057",
"metadata": {},
"outputs": [],
"source": [
"from bs4 import BeautifulSoup\n",
"import requests\n",
"from datetime import datetime\n",
"from time import sleep\n",
"from selenium import webdriver\n",
"from selenium.webdriver.firefox.options import Options\n",
"\n",
"class DateProvider:\n",
" \n",
" INTENSIVSTATIONEN_DATE_FORMAT = \"%d.%m.%Y, %H:%M Uhr\"\n",
"\n",
" def __init__(self):\n",
" self.lastUpdatedIntensivstationen = None\n",
" self.lastUpdatedOriginal = None\n",
"\n",
" def needsUpdate(self):\n",
" return self.getLastUpdatedIntensivstationen() < self.getLastUpdatedOriginal()\n",
" \n",
" def getLastUpdatedIntensivstationen(self):\n",
" if self.lastUpdatedIntensivstationen is None:\n",
" htmlContent = requests.get(\"https://knollfrank.github.io/HowBadIsMyBatch/intensivstationen.html\").text\n",
" soup = BeautifulSoup(htmlContent, \"lxml\")\n",
" dateStr = soup.find(id = \"Datenstand\").text\n",
" self.lastUpdatedIntensivstationen = datetime.strptime(dateStr, DateProvider.INTENSIVSTATIONEN_DATE_FORMAT)\n",
" \n",
" return self.lastUpdatedIntensivstationen\n",
"\n",
" def getLastUpdatedOriginal(self):\n",
" if self.lastUpdatedOriginal is None:\n",
" html = self._getOriginalHtml()\n",
" lastUpdatedColumn = 'Letzte Änderung'\n",
" dataFrame = self._asDataFrame(html, lastUpdatedColumn)\n",
" self.lastUpdatedOriginal = dataFrame.loc['Landkreis-Daten', lastUpdatedColumn].to_pydatetime()\n",
"\n",
" return self.lastUpdatedOriginal\n",
"\n",
" def _getOriginalHtml(self):\n",
" options = Options()\n",
" options.headless = True\n",
" driver = webdriver.Firefox(options = options)\n",
" driver.get('https://www.intensivregister.de/#/aktuelle-lage/downloads')\n",
" sleep(10)\n",
" innerHTML = driver.execute_script(\"return document.body.innerHTML\")\n",
" driver.quit()\n",
" return innerHTML\n",
"\n",
" def _asDataFrame(self, html, lastUpdatedColumn):\n",
" dataFrame = pd.read_html(html, parse_dates = [lastUpdatedColumn])[0]\n",
" dataFrame[lastUpdatedColumn] = pd.to_datetime(dataFrame[lastUpdatedColumn], format = \"%d.%m.%Y %H:%M Uhr\")\n",
" dataFrame.set_index('Name', inplace = True)\n",
" return dataFrame\n"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "336f56e6",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"lastUpdatedIntensivstationen: 2022-03-12 12:38:00\n",
"lastUpdatedOriginal: 2022-03-14 12:38:00\n",
"needsUpdate: True\n"
]
}
],
"source": [
"dateProvider = DateProvider()\n",
"print('lastUpdatedIntensivstationen:', dateProvider.getLastUpdatedIntensivstationen())\n",
"print('lastUpdatedOriginal:', dateProvider.getLastUpdatedOriginal()) \n",
"needsUpdate = dateProvider.needsUpdate()\n",
"print('needsUpdate: ', needsUpdate)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "03784154",
"metadata": {},
"outputs": [],
"source": [
"from bs4 import BeautifulSoup\n",
"\n",
"class HtmlTransformerUtil:\n",
" \n",
" def applySoupTransformerToFile(self, file, soupTransformer):\n",
" self._writeSoup(soupTransformer(self._readSoup(file)), file)\n",
"\n",
" def _readSoup(self, file):\n",
" with open(file) as fp:\n",
" soup = BeautifulSoup(fp, 'lxml')\n",
" return soup\n",
"\n",
" def _writeSoup(self, soup, file):\n",
" with open(file, \"w\") as fp:\n",
" fp.write(str(soup)) \n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "af101279",
"metadata": {},
"outputs": [],
"source": [
"def saveLastUpdatedIntensivstationen(lastUpdated):\n",
" def setLastUpdated(soup):\n",
" soup.find(id = \"Datenstand\").string.replace_with(lastUpdated.strftime(DateProvider.INTENSIVSTATIONEN_DATE_FORMAT))\n",
" return soup\n",
"\n",
" HtmlTransformerUtil().applySoupTransformerToFile(\n",
" file = \"../../docs/intensivstationen.html\",\n",
" soupTransformer = setLastUpdated)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "63be303c",
"metadata": {},
"outputs": [],
"source": [
"saveLastUpdatedIntensivstationen(dateProvider.getLastUpdatedOriginal())"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "d021de84",
"metadata": {},
"outputs": [],
"source": [
"def readTimeseries(download = False):\n",
" timeSeriesFile = 'zeitreihe-tagesdaten.csv'\n",
" if download:\n",
" _downloadTimeseries(timeSeriesFile)\n",
"\n",
" timeseries = pd.read_csv(\n",
" timeSeriesFile,\n",
" low_memory = False,\n",
" usecols = ['date', 'bundesland', 'gemeindeschluessel', 'betten_belegt', 'betten_frei'],\n",
" parse_dates = ['date'],\n",
" date_parser = lambda dateStr: pd.to_datetime(dateStr, format = \"%Y-%m-%d\"),\n",
" dtype = {\n",
" 'gemeindeschluessel': 'string',\n",
" 'bundesland': 'string'\n",
" })\n",
" return timeseries.sort_values(by = 'date', ascending = True)\n",
"\n",
"# download https://diviexchange.blob.core.windows.net/%24web/zeitreihe-tagesdaten.csv or https://www.intensivregister.de/#/aktuelle-lage/downloads\n",
"def _downloadTimeseries(timeSeriesFile):\n",
" request.urlretrieve(\n",
" 'https://diviexchange.blob.core.windows.net/%24web/zeitreihe-tagesdaten.csv',\n",
" timeSeriesFile)\n"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "3f992231",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>date</th>\n",
" <th>bundesland</th>\n",
" <th>gemeindeschluessel</th>\n",
" <th>betten_frei</th>\n",
" <th>betten_belegt</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>2020-04-24</td>\n",
" <td>01</td>\n",
" <td>01001</td>\n",
" <td>40</td>\n",
" <td>38</td>\n",
" </tr>\n",
" <tr>\n",
" <th>267</th>\n",
" <td>2020-04-24</td>\n",
" <td>09</td>\n",
" <td>09471</td>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" </tr>\n",
" <tr>\n",
" <th>266</th>\n",
" <td>2020-04-24</td>\n",
" <td>09</td>\n",
" <td>09464</td>\n",
" <td>17</td>\n",
" <td>23</td>\n",
" </tr>\n",
" <tr>\n",
" <th>265</th>\n",
" <td>2020-04-24</td>\n",
" <td>09</td>\n",
" <td>09463</td>\n",
" <td>9</td>\n",
" <td>25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>264</th>\n",
" <td>2020-04-24</td>\n",
" <td>09</td>\n",
" <td>09462</td>\n",
" <td>12</td>\n",
" <td>51</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>272795</th>\n",
" <td>2022-03-14</td>\n",
" <td>06</td>\n",
" <td>06437</td>\n",
" <td>5</td>\n",
" <td>121</td>\n",
" </tr>\n",
" <tr>\n",
" <th>272794</th>\n",
" <td>2022-03-14</td>\n",
" <td>06</td>\n",
" <td>06436</td>\n",
" <td>6</td>\n",
" <td>20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>272793</th>\n",
" <td>2022-03-14</td>\n",
" <td>06</td>\n",
" <td>06435</td>\n",
" <td>8</td>\n",
" <td>74</td>\n",
" </tr>\n",
" <tr>\n",
" <th>272791</th>\n",
" <td>2022-03-14</td>\n",
" <td>06</td>\n",
" <td>06433</td>\n",
" <td>2</td>\n",
" <td>21</td>\n",
" </tr>\n",
" <tr>\n",
" <th>273064</th>\n",
" <td>2022-03-14</td>\n",
" <td>16</td>\n",
" <td>16077</td>\n",
" <td>4</td>\n",
" <td>28</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>273065 rows × 5 columns</p>\n",
"</div>"
],
"text/plain": [
" date bundesland gemeindeschluessel betten_frei betten_belegt\n",
"0 2020-04-24 01 01001 40 38\n",
"267 2020-04-24 09 09471 9 9\n",
"266 2020-04-24 09 09464 17 23\n",
"265 2020-04-24 09 09463 9 25\n",
"264 2020-04-24 09 09462 12 51\n",
"... ... ... ... ... ...\n",
"272795 2022-03-14 06 06437 5 121\n",
"272794 2022-03-14 06 06436 6 20\n",
"272793 2022-03-14 06 06435 8 74\n",
"272791 2022-03-14 06 06433 2 21\n",
"273064 2022-03-14 16 16077 4 28\n",
"\n",
"[273065 rows x 5 columns]"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"timeSeries = readTimeseries(download = needsUpdate)\n",
"timeSeries"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "2d34c6a4",
"metadata": {},
"outputs": [],
"source": [
"def readKreise(download = False):\n",
" kreiseFile = '04-kreise.xlsx'\n",
" if download:\n",
" _downloadKreise(kreiseFile)\n",
" \n",
" kreise = pd.read_excel(\n",
" kreiseFile,\n",
" sheet_name = 'Kreisfreie Städte u. Landkreise',\n",
" header = 5,\n",
" index_col = 0)\n",
" kreise = kreise.rename(columns = {'2': 'Bundesland', 3: 'Kreis', 6: 'Einwohnerzahl'})[['Bundesland', 'Kreis', 'Einwohnerzahl']]\n",
" kreise.index.set_names(\"Key\", inplace = True)\n",
" return kreise\n",
"\n",
"# download https://www.destatis.de/DE/Themen/Laender-Regionen/Regionales/Gemeindeverzeichnis/Administrativ/04-kreise.xlsx?__blob=publicationFile or https://www.destatis.de/DE/Themen/Laender-Regionen/Regionales/Gemeindeverzeichnis/Administrativ/04-kreise.html\n",
"def _downloadKreise(kreiseFile):\n",
" request.urlretrieve(\n",
" 'https://www.destatis.de/DE/Themen/Laender-Regionen/Regionales/Gemeindeverzeichnis/Administrativ/04-kreise.xlsx?__blob=publicationFile',\n",
" kreiseFile)\n"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "74ea4d55",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Bundesland</th>\n",
" <th>Kreis</th>\n",
" <th>Einwohnerzahl</th>\n",
" </tr>\n",
" <tr>\n",
" <th>Key</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>NaN</th>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>01</th>\n",
" <td>Schleswig-Holstein</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>01001</th>\n",
" <td>Kreisfreie Stadt</td>\n",
" <td>Flensburg, Stadt</td>\n",
" <td>89934.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>01002</th>\n",
" <td>Kreisfreie Stadt</td>\n",
" <td>Kiel, Landeshauptstadt</td>\n",
" <td>246601.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>01003</th>\n",
" <td>Kreisfreie Stadt</td>\n",
" <td>Lübeck, Hansestadt</td>\n",
" <td>215846.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2) Die Ergebnisse ab Berichtsjahr 2016 sind aufgrund methodischer Änderungen und technischer Weiterentwicklung\\n nur bedingt mit den Vorjahreswerten vegleichbar. Erläuterungen dazu finden Sie unter www.destatis.de beim Bevölkerungsstand.</th>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>NaN</th>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>© Daten (im Auftrag der Herausgebergemeinschaft Statistische Ämter des Bundes und der Länder)</th>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Statistisches Bundesamt (Destatis), 2021</th>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Vervielfältigung und Verbreitung, auch auszugsweise, mit Quellenangabe gestattet.</th>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>488 rows × 3 columns</p>\n",
"</div>"
],
"text/plain": [
" Bundesland \\\n",
"Key \n",
"NaN NaN \n",
"01 Schleswig-Holstein \n",
"01001 Kreisfreie Stadt \n",
"01002 Kreisfreie Stadt \n",
"01003 Kreisfreie Stadt \n",
"... ... \n",
"2) Die Ergebnisse ab Berichtsjahr 2016 sind auf... NaN \n",
"NaN NaN \n",
"© Daten (im Auftrag der Herausgebergemeinschaft... NaN \n",
" Statistisches Bundesamt (Destatis), 2021 NaN \n",
" Vervielfältigung und Verbreitung, auch aus... NaN \n",
"\n",
" Kreis \\\n",
"Key \n",
"NaN NaN \n",
"01 NaN \n",
"01001 Flensburg, Stadt \n",
"01002 Kiel, Landeshauptstadt \n",
"01003 Lübeck, Hansestadt \n",
"... ... \n",
"2) Die Ergebnisse ab Berichtsjahr 2016 sind auf... NaN \n",
"NaN NaN \n",
"© Daten (im Auftrag der Herausgebergemeinschaft... NaN \n",
" Statistisches Bundesamt (Destatis), 2021 NaN \n",
" Vervielfältigung und Verbreitung, auch aus... NaN \n",
"\n",
" Einwohnerzahl \n",
"Key \n",
"NaN NaN \n",
"01 NaN \n",
"01001 89934.0 \n",
"01002 246601.0 \n",
"01003 215846.0 \n",
"... ... \n",
"2) Die Ergebnisse ab Berichtsjahr 2016 sind auf... NaN \n",
"NaN NaN \n",
"© Daten (im Auftrag der Herausgebergemeinschaft... NaN \n",
" Statistisches Bundesamt (Destatis), 2021 NaN \n",
" Vervielfältigung und Verbreitung, auch aus... NaN \n",
"\n",
"[488 rows x 3 columns]"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"kreise = readKreise(download = False)\n",
"kreise"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "af96fb11",
"metadata": {},
"outputs": [],
"source": [
"class ColumnsAdder:\n",
"\n",
" def __init__(self, kreise):\n",
" self.kreise = kreise\n",
"\n",
" def addKreisAndBundeslandAndEinwohnerzahlColumns(self, dataFrame):\n",
" dataFrame_kreise = pd.merge(dataFrame, self.kreise, how = 'left', left_on = 'gemeindeschluessel', right_index = True)\n",
" dataFrame['Kreis'] = dataFrame_kreise['Kreis']\n",
" dataFrame['Einwohnerzahl'] = dataFrame_kreise['Einwohnerzahl']\n",
" return self._addBundeslandColumn(dataFrame)\n",
" \n",
" def _addBundeslandColumn(self, dataFrame):\n",
" return pd.merge(\n",
" dataFrame,\n",
" self._createBundeslandByKeyTable(),\n",
" how = 'left',\n",
" left_on = 'bundesland',\n",
" right_index = True)\n",
"\n",
" def _createBundeslandByKeyTable(self):\n",
" return self.kreise[self.kreise.index.str.len() == 2][['Bundesland']]\n"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "62a20115",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>date</th>\n",
" <th>bundesland</th>\n",
" <th>gemeindeschluessel</th>\n",
" <th>betten_frei</th>\n",
" <th>betten_belegt</th>\n",
" <th>Kreis</th>\n",
" <th>Einwohnerzahl</th>\n",
" <th>Bundesland</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>2020-04-24</td>\n",
" <td>01</td>\n",
" <td>01001</td>\n",
" <td>40</td>\n",
" <td>38</td>\n",
" <td>Flensburg, Stadt</td>\n",
" <td>89934.0</td>\n",
" <td>Schleswig-Holstein</td>\n",
" </tr>\n",
" <tr>\n",
" <th>267</th>\n",
" <td>2020-04-24</td>\n",
" <td>09</td>\n",
" <td>09471</td>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" <td>Bamberg</td>\n",
" <td>147497.0</td>\n",
" <td>Bayern</td>\n",
" </tr>\n",
" <tr>\n",
" <th>266</th>\n",
" <td>2020-04-24</td>\n",
" <td>09</td>\n",
" <td>09464</td>\n",
" <td>17</td>\n",
" <td>23</td>\n",
" <td>Hof</td>\n",
" <td>45173.0</td>\n",
" <td>Bayern</td>\n",
" </tr>\n",
" <tr>\n",
" <th>265</th>\n",
" <td>2020-04-24</td>\n",
" <td>09</td>\n",
" <td>09463</td>\n",
" <td>9</td>\n",
" <td>25</td>\n",
" <td>Coburg</td>\n",
" <td>40842.0</td>\n",
" <td>Bayern</td>\n",
" </tr>\n",
" <tr>\n",
" <th>264</th>\n",
" <td>2020-04-24</td>\n",
" <td>09</td>\n",
" <td>09462</td>\n",
" <td>12</td>\n",
" <td>51</td>\n",
" <td>Bayreuth</td>\n",
" <td>74048.0</td>\n",
" <td>Bayern</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>272795</th>\n",
" <td>2022-03-14</td>\n",
" <td>06</td>\n",
" <td>06437</td>\n",
" <td>5</td>\n",
" <td>121</td>\n",
" <td>Odenwaldkreis</td>\n",
" <td>96754.0</td>\n",
" <td>Hessen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>272794</th>\n",
" <td>2022-03-14</td>\n",
" <td>06</td>\n",
" <td>06436</td>\n",
" <td>6</td>\n",
" <td>20</td>\n",
" <td>Main-Taunus-Kreis</td>\n",
" <td>239264.0</td>\n",
" <td>Hessen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>272793</th>\n",
" <td>2022-03-14</td>\n",
" <td>06</td>\n",
" <td>06435</td>\n",
" <td>8</td>\n",
" <td>74</td>\n",
" <td>Main-Kinzig-Kreis</td>\n",
" <td>421689.0</td>\n",
" <td>Hessen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>272791</th>\n",
" <td>2022-03-14</td>\n",
" <td>06</td>\n",
" <td>06433</td>\n",
" <td>2</td>\n",
" <td>21</td>\n",
" <td>Groß-Gerau</td>\n",
" <td>275807.0</td>\n",
" <td>Hessen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>273064</th>\n",
" <td>2022-03-14</td>\n",
" <td>16</td>\n",
" <td>16077</td>\n",
" <td>4</td>\n",
" <td>28</td>\n",
" <td>Altenburger Land</td>\n",
" <td>88356.0</td>\n",
" <td>Thüringen</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>273065 rows × 8 columns</p>\n",
"</div>"
],
"text/plain": [
" date bundesland gemeindeschluessel betten_frei betten_belegt \\\n",
"0 2020-04-24 01 01001 40 38 \n",
"267 2020-04-24 09 09471 9 9 \n",
"266 2020-04-24 09 09464 17 23 \n",
"265 2020-04-24 09 09463 9 25 \n",
"264 2020-04-24 09 09462 12 51 \n",
"... ... ... ... ... ... \n",
"272795 2022-03-14 06 06437 5 121 \n",
"272794 2022-03-14 06 06436 6 20 \n",
"272793 2022-03-14 06 06435 8 74 \n",
"272791 2022-03-14 06 06433 2 21 \n",
"273064 2022-03-14 16 16077 4 28 \n",
"\n",
" Kreis Einwohnerzahl Bundesland \n",
"0 Flensburg, Stadt 89934.0 Schleswig-Holstein \n",
"267 Bamberg 147497.0 Bayern \n",
"266 Hof 45173.0 Bayern \n",
"265 Coburg 40842.0 Bayern \n",
"264 Bayreuth 74048.0 Bayern \n",
"... ... ... ... \n",
"272795 Odenwaldkreis 96754.0 Hessen \n",
"272794 Main-Taunus-Kreis 239264.0 Hessen \n",
"272793 Main-Kinzig-Kreis 421689.0 Hessen \n",
"272791 Groß-Gerau 275807.0 Hessen \n",
"273064 Altenburger Land 88356.0 Thüringen \n",
"\n",
"[273065 rows x 8 columns]"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"timeSeries = ColumnsAdder(kreise).addKreisAndBundeslandAndEinwohnerzahlColumns(timeSeries)\n",
"timeSeries"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "356494d3",
"metadata": {},
"outputs": [],
"source": [
"kreisValues = sorted(timeSeries['Kreis'].drop_duplicates().values)"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "05aa0117",
"metadata": {},
"outputs": [],
"source": [
"def getKreisOptions(kreisValues):\n",
" return [getKreisOption(kreis) for kreis in kreisValues]\n",
"\n",
"def getKreisOption(kreis):\n",
" return '<option value=\"{kreis}\">{kreis}</option>'.format(kreis = kreis)\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9c38ca16",
"metadata": {},
"outputs": [],
"source": [
"kreisOptions = ['<option selected=\"\" value=\"de\">Alle Landkreise</option>'] + getKreisOptions(kreisValues)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9eb453d0",
"metadata": {},
"outputs": [],
"source": [
"from bs4 import BeautifulSoup\n",
"\n",
"\n",
"class KreisOptionsSetter:\n",
"\n",
" def setKreisOptions(self, html, options):\n",
" soup = self._setKreisOptions(self._parse(html), self._parseOptions(options))\n",
" return str(soup)\n",
"\n",
" def _setKreisOptions(self, soup, options):\n",
" kreisSelect = soup.find(id = \"kreisSelect\")\n",
" kreisSelect.clear()\n",
" for option in options:\n",
" kreisSelect.append(option)\n",
" return soup\n",
"\n",
" def _parseOptions(self, options):\n",
" return [self._parse(option).option for option in options]\n",
"\n",
" def _parse(self, html):\n",
" return BeautifulSoup(html, 'lxml')\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e4f8fa80",
"metadata": {},
"outputs": [],
"source": [
"import unittest\n",
"\n",
"\n",
"class KreisOptionsSetterTest(unittest.TestCase):\n",
"\n",
" def test_setKreisOptions(self):\n",
" # Given\n",
" kreisOptionsSetter = KreisOptionsSetter()\n",
"\n",
" # When\n",
" htmlActual = kreisOptionsSetter.setKreisOptions(\n",
" html = '''\n",
" <html>\n",
" <body>\n",
" <p>Test<p/>\n",
" <select id=\"kreisSelect\" name=\"kreis\">\n",
" <option selected=\"\" value=\"de\">Alle Landkreise</option>\n",
" <option value=\"Ahrweiler\">Ahrweiler</option>\n",
" <option value=\"Wiesbaden, Landeshauptstadt\">Wiesbaden, Landeshauptstadt</option>\n",
" <option value=\"Aichach-Friedberg\">Aichach-Friedberg</option>\n",
" </select>\n",
" </body>\n",
" </html>\n",
" ''',\n",
" options = [\n",
" '<option selected=\"\" value=\"de\">Alle Landkreise</option>',\n",
" '<option value=\"Ahrweiler\">Ahrweiler</option>',\n",
" '<option value=\"Aichach-Friedberg\">Aichach-Friedberg</option>'])\n",
"\n",
" # Then\n",
" assertEqualHTML(\n",
" htmlActual,\n",
" '''\n",
" <html>\n",
" <body>\n",
" <p>Test<p/>\n",
" <select id=\"kreisSelect\" name=\"kreis\">\n",
" <option selected=\"\" value=\"de\">Alle Landkreise</option>\n",
" <option value=\"Ahrweiler\">Ahrweiler</option>\n",
" <option value=\"Aichach-Friedberg\">Aichach-Friedberg</option>\n",
" </select>\n",
" </body>\n",
" </html>\n",
" ''')\n",
"\n",
"# adapted from https://stackoverflow.com/questions/8006909/pretty-print-assertequal-for-html-strings\n",
"def assertEqualHTML(string1, string2, file1='', file2=''):\n",
" u'''\n",
" Compare two unicode strings containing HTML.\n",
" A human friendly diff goes to logging.error() if they\n",
" are not equal, and an exception gets raised.\n",
" '''\n",
" from bs4 import BeautifulSoup as bs\n",
" import difflib\n",
"\n",
" def short(mystr):\n",
" max = 20\n",
" if len(mystr) > max:\n",
" return mystr[:max]\n",
" return mystr\n",
" p = []\n",
" for mystr, file in [(string1, file1), (string2, file2)]:\n",
" if not isinstance(mystr, str):\n",
" raise Exception(u'string ist not unicode: %r %s' %\n",
" (short(mystr), file))\n",
" soup = bs(mystr)\n",
" pretty = soup.prettify()\n",
" p.append(pretty)\n",
" if p[0] != p[1]:\n",
" for line in difflib.unified_diff(p[0].splitlines(), p[1].splitlines(), fromfile=file1, tofile=file2):\n",
" display(line)\n",
" display(p[0], ' != ', p[1])\n",
" raise Exception('Not equal %s %s' % (file1, file2))\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e80117e5",
"metadata": {},
"outputs": [],
"source": [
"unittest.main(argv = [''], verbosity = 2, exit = False)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "403f8b7b",
"metadata": {},
"outputs": [],
"source": [
"from bs4 import BeautifulSoup\n",
"\n",
"\n",
"def saveKreisOptions(kreisOptions):\n",
" HtmlTransformerUtil().applySoupTransformerToFile(\n",
" file = \"../../docs/intensivstationen.html\",\n",
" soupTransformer = lambda soup: BeautifulSoup(KreisOptionsSetter().setKreisOptions(html = str(soup), options = kreisOptions), 'lxml'))\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5dd8d864",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<option value=\"Ahrweiler\">Ahrweiler</option>\n",
"<option value=\"Aichach-Friedberg\">Aichach-Friedberg</option>\n",
"<option value=\"Alb-Donau-Kreis\">Alb-Donau-Kreis</option>\n",
"<option value=\"Altenburger Land\">Altenburger Land</option>\n",
"<option value=\"Altenkirchen (Westerwald)\">Altenkirchen (Westerwald)</option>\n",
"<option value=\"Altmarkkreis Salzwedel\">Altmarkkreis Salzwedel</option>\n",
"<option value=\"Altötting\">Altötting</option>\n",
"<option value=\"Alzey-Worms\">Alzey-Worms</option>\n",
"<option value=\"Amberg\">Amberg</option>\n",
"<option value=\"Amberg-Sulzbach\">Amberg-Sulzbach</option>\n",
"<option value=\"Ammerland\">Ammerland</option>\n",
"<option value=\"Anhalt-Bitterfeld\">Anhalt-Bitterfeld</option>\n",
"<option value=\"Ansbach\">Ansbach</option>\n",
"<option value=\"Aschaffenburg\">Aschaffenburg</option>\n",
"<option value=\"Augsburg\">Augsburg</option>\n",
"<option value=\"Aurich\">Aurich</option>\n",
"<option value=\"Bad Dürkheim\">Bad Dürkheim</option>\n",
"<option value=\"Bad Kissingen\">Bad Kissingen</option>\n",
"<option value=\"Bad Kreuznach\">Bad Kreuznach</option>\n",
"<option value=\"Bad Tölz-Wolfratshausen\">Bad Tölz-Wolfratshausen</option>\n",
"<option value=\"Baden-Baden, Stadtkreis\">Baden-Baden, Stadtkreis</option>\n",
"<option value=\"Bamberg\">Bamberg</option>\n",
"<option value=\"Barnim\">Barnim</option>\n",
"<option value=\"Bautzen\">Bautzen</option>\n",
"<option value=\"Bayreuth\">Bayreuth</option>\n",
"<option value=\"Berchtesgadener Land\">Berchtesgadener Land</option>\n",
"<option value=\"Bergstraße\">Bergstraße</option>\n",
"<option value=\"Berlin, Stadt\">Berlin, Stadt</option>\n",
"<option value=\"Bernkastel-Wittlich\">Bernkastel-Wittlich</option>\n",
"<option value=\"Biberach\">Biberach</option>\n",
"<option value=\"Bielefeld, Stadt\">Bielefeld, Stadt</option>\n",
"<option value=\"Birkenfeld\">Birkenfeld</option>\n",
"<option value=\"Bochum, Stadt\">Bochum, Stadt</option>\n",
"<option value=\"Bodenseekreis\">Bodenseekreis</option>\n",
"<option value=\"Bonn, Stadt\">Bonn, Stadt</option>\n",
"<option value=\"Borken\">Borken</option>\n",
"<option value=\"Bottrop, Stadt\">Bottrop, Stadt</option>\n",
"<option value=\"Brandenburg an der Havel, Stadt\">Brandenburg an der Havel, Stadt</option>\n",
"<option value=\"Braunschweig, Stadt\">Braunschweig, Stadt</option>\n",
"<option value=\"Breisgau-Hochschwarzwald\">Breisgau-Hochschwarzwald</option>\n",
"<option value=\"Bremen, Stadt\">Bremen, Stadt</option>\n",
"<option value=\"Bremerhaven, Stadt\">Bremerhaven, Stadt</option>\n",
"<option value=\"Burgenlandkreis\">Burgenlandkreis</option>\n",
"<option value=\"Böblingen\">Böblingen</option>\n",
"<option value=\"Börde\">Börde</option>\n",
"<option value=\"Calw\">Calw</option>\n",
"<option value=\"Celle\">Celle</option>\n",
"<option value=\"Cham\">Cham</option>\n",
"<option value=\"Chemnitz, Stadt\">Chemnitz, Stadt</option>\n",
"<option value=\"Cloppenburg\">Cloppenburg</option>\n",
"<option value=\"Coburg\">Coburg</option>\n",
"<option value=\"Cochem-Zell\">Cochem-Zell</option>\n",
"<option value=\"Coesfeld\">Coesfeld</option>\n",
"<option value=\"Cottbus, Stadt\">Cottbus, Stadt</option>\n",
"<option value=\"Cuxhaven\">Cuxhaven</option>\n",
"<option value=\"Dachau\">Dachau</option>\n",
"<option value=\"Dahme-Spreewald\">Dahme-Spreewald</option>\n",
"<option value=\"Darmstadt, Wissenschaftsstadt\">Darmstadt, Wissenschaftsstadt</option>\n",
"<option value=\"Darmstadt-Dieburg\">Darmstadt-Dieburg</option>\n",
"<option value=\"Deggendorf\">Deggendorf</option>\n",
"<option value=\"Delmenhorst, Stadt\">Delmenhorst, Stadt</option>\n",
"<option value=\"Dessau-Roßlau, Stadt\">Dessau-Roßlau, Stadt</option>\n",
"<option value=\"Diepholz\">Diepholz</option>\n",
"<option value=\"Dillingen a.d.Donau\">Dillingen a.d.Donau</option>\n",
"<option value=\"Dingolfing-Landau\">Dingolfing-Landau</option>\n",
"<option value=\"Dithmarschen\">Dithmarschen</option>\n",
"<option value=\"Donau-Ries\">Donau-Ries</option>\n",
"<option value=\"Donnersbergkreis\">Donnersbergkreis</option>\n",
"<option value=\"Dortmund, Stadt\">Dortmund, Stadt</option>\n",
"<option value=\"Dresden, Stadt\">Dresden, Stadt</option>\n",
"<option value=\"Duisburg, Stadt\">Duisburg, Stadt</option>\n",
"<option value=\"Düren\">Düren</option>\n",
"<option value=\"Düsseldorf, Stadt\">Düsseldorf, Stadt</option>\n",
"<option value=\"Ebersberg\">Ebersberg</option>\n",
"<option value=\"Eichsfeld\">Eichsfeld</option>\n",
"<option value=\"Eichstätt\">Eichstätt</option>\n",
"<option value=\"Eifelkreis Bitburg-Prüm\">Eifelkreis Bitburg-Prüm</option>\n",
"<option value=\"Elbe-Elster\">Elbe-Elster</option>\n",
"<option value=\"Emden, Stadt\">Emden, Stadt</option>\n",
"<option value=\"Emmendingen\">Emmendingen</option>\n",
"<option value=\"Emsland\">Emsland</option>\n",
"<option value=\"Ennepe-Ruhr-Kreis\">Ennepe-Ruhr-Kreis</option>\n",
"<option value=\"Enzkreis\">Enzkreis</option>\n",
"<option value=\"Erding\">Erding</option>\n",
"<option value=\"Erfurt, Stadt\">Erfurt, Stadt</option>\n",
"<option value=\"Erlangen\">Erlangen</option>\n",
"<option value=\"Erlangen-Höchstadt\">Erlangen-Höchstadt</option>\n",
"<option value=\"Erzgebirgskreis\">Erzgebirgskreis</option>\n",
"<option value=\"Essen, Stadt\">Essen, Stadt</option>\n",
"<option value=\"Esslingen\">Esslingen</option>\n",
"<option value=\"Euskirchen\">Euskirchen</option>\n",
"<option value=\"Flensburg, Stadt\">Flensburg, Stadt</option>\n",
"<option value=\"Forchheim\">Forchheim</option>\n",
"<option value=\"Frankenthal (Pfalz), kreisfreie Stadt\">Frankenthal (Pfalz), kreisfreie Stadt</option>\n",
"<option value=\"Frankfurt (Oder), Stadt\">Frankfurt (Oder), Stadt</option>\n",
"<option value=\"Frankfurt am Main, Stadt\">Frankfurt am Main, Stadt</option>\n",
"<option value=\"Freiburg im Breisgau, Stadtkreis\">Freiburg im Breisgau, Stadtkreis</option>\n",
"<option value=\"Freising\">Freising</option>\n",
"<option value=\"Freudenstadt\">Freudenstadt</option>\n",
"<option value=\"Freyung-Grafenau\">Freyung-Grafenau</option>\n",
"<option value=\"Friesland\">Friesland</option>\n",
"<option value=\"Fulda\">Fulda</option>\n",
"<option value=\"Fürstenfeldbruck\">Fürstenfeldbruck</option>\n",
"<option value=\"Fürth\">Fürth</option>\n",
"<option value=\"Garmisch-Partenkirchen\">Garmisch-Partenkirchen</option>\n",
"<option value=\"Gelsenkirchen, Stadt\">Gelsenkirchen, Stadt</option>\n",
"<option value=\"Gera, Stadt\">Gera, Stadt</option>\n",
"<option value=\"Germersheim\">Germersheim</option>\n",
"<option value=\"Gießen\">Gießen</option>\n",
"<option value=\"Gifhorn\">Gifhorn</option>\n",
"<option value=\"Goslar\">Goslar</option>\n",
"<option value=\"Gotha\">Gotha</option>\n",
"<option value=\"Grafschaft Bentheim\">Grafschaft Bentheim</option>\n",
"<option value=\"Greiz\">Greiz</option>\n",
"<option value=\"Groß-Gerau\">Groß-Gerau</option>\n",
"<option value=\"Göppingen\">Göppingen</option>\n",
"<option value=\"Görlitz\">Görlitz</option>\n",
"<option value=\"Göttingen\">Göttingen</option>\n",
"<option value=\"Günzburg\">Günzburg</option>\n",
"<option value=\"Gütersloh\">Gütersloh</option>\n",
"<option value=\"Hagen, Stadt der FernUniversität\">Hagen, Stadt der FernUniversität</option>\n",
"<option value=\"Halle (Saale), Stadt\">Halle (Saale), Stadt</option>\n",
"<option value=\"Hamburg, Freie und Hansestadt\">Hamburg, Freie und Hansestadt</option>\n",
"<option value=\"Hameln-Pyrmont\">Hameln-Pyrmont</option>\n",
"<option value=\"Hamm, Stadt\">Hamm, Stadt</option>\n",
"<option value=\"Harburg\">Harburg</option>\n",
"<option value=\"Harz\">Harz</option>\n",
"<option value=\"Havelland\">Havelland</option>\n",
"<option value=\"Haßberge\">Haßberge</option>\n",
"<option value=\"Heidekreis\">Heidekreis</option>\n",
"<option value=\"Heidelberg, Stadtkreis\">Heidelberg, Stadtkreis</option>\n",
"<option value=\"Heidenheim\">Heidenheim</option>\n",
"<option value=\"Heilbronn\">Heilbronn</option>\n",
"<option value=\"Heilbronn, Stadtkreis\">Heilbronn, Stadtkreis</option>\n",
"<option value=\"Heinsberg\">Heinsberg</option>\n",
"<option value=\"Helmstedt\">Helmstedt</option>\n",
"<option value=\"Herford\">Herford</option>\n",
"<option value=\"Herne, Stadt\">Herne, Stadt</option>\n",
"<option value=\"Hersfeld-Rotenburg\">Hersfeld-Rotenburg</option>\n",
"<option value=\"Herzogtum Lauenburg\">Herzogtum Lauenburg</option>\n",
"<option value=\"Hildburghausen\">Hildburghausen</option>\n",
"<option value=\"Hildesheim\">Hildesheim</option>\n",
"<option value=\"Hochsauerlandkreis\">Hochsauerlandkreis</option>\n",
"<option value=\"Hochtaunuskreis\">Hochtaunuskreis</option>\n",
"<option value=\"Hof\">Hof</option>\n",
"<option value=\"Hohenlohekreis\">Hohenlohekreis</option>\n",
"<option value=\"Holzminden\">Holzminden</option>\n",
"<option value=\"Höxter\">Höxter</option>\n",
"<option value=\"Ilm-Kreis\">Ilm-Kreis</option>\n",
"<option value=\"Ingolstadt\">Ingolstadt</option>\n",
"<option value=\"Jena, Stadt\">Jena, Stadt</option>\n",
"<option value=\"Jerichower Land\">Jerichower Land</option>\n",
"<option value=\"Kaiserslautern\">Kaiserslautern</option>\n",
"<option value=\"Kaiserslautern, kreisfreie Stadt\">Kaiserslautern, kreisfreie Stadt</option>\n",
"<option value=\"Karlsruhe\">Karlsruhe</option>\n",
"<option value=\"Karlsruhe, Stadtkreis\">Karlsruhe, Stadtkreis</option>\n",
"<option value=\"Kassel\">Kassel</option>\n",
"<option value=\"Kassel, documenta-Stadt\">Kassel, documenta-Stadt</option>\n",
"<option value=\"Kaufbeuren\">Kaufbeuren</option>\n",
"<option value=\"Kelheim\">Kelheim</option>\n",
"<option value=\"Kempten (Allgäu)\">Kempten (Allgäu)</option>\n",
"<option value=\"Kiel, Landeshauptstadt\">Kiel, Landeshauptstadt</option>\n",
"<option value=\"Kitzingen\">Kitzingen</option>\n",
"<option value=\"Kleve\">Kleve</option>\n",
"<option value=\"Koblenz, kreisfreie Stadt\">Koblenz, kreisfreie Stadt</option>\n",
"<option value=\"Konstanz\">Konstanz</option>\n",
"<option value=\"Krefeld, Stadt\">Krefeld, Stadt</option>\n",
"<option value=\"Kronach\">Kronach</option>\n",
"<option value=\"Kulmbach\">Kulmbach</option>\n",
"<option value=\"Kusel\">Kusel</option>\n",
"<option value=\"Kyffhäuserkreis\">Kyffhäuserkreis</option>\n",
"<option value=\"Köln, Stadt\">Köln, Stadt</option>\n",
"<option value=\"Lahn-Dill-Kreis\">Lahn-Dill-Kreis</option>\n",
"<option value=\"Landau in der Pfalz, kreisfreie Stadt\">Landau in der Pfalz, kreisfreie Stadt</option>\n",
"<option value=\"Landkreis Rostock\">Landkreis Rostock</option>\n",
"<option value=\"Landsberg am Lech\">Landsberg am Lech</option>\n",
"<option value=\"Landshut\">Landshut</option>\n",
"<option value=\"Leer\">Leer</option>\n",
"<option value=\"Leipzig\">Leipzig</option>\n",
"<option value=\"Leipzig, Stadt\">Leipzig, Stadt</option>\n",
"<option value=\"Leverkusen, Stadt\">Leverkusen, Stadt</option>\n",
"<option value=\"Lichtenfels\">Lichtenfels</option>\n",
"<option value=\"Limburg-Weilburg\">Limburg-Weilburg</option>\n",
"<option value=\"Lindau (Bodensee)\">Lindau (Bodensee)</option>\n",
"<option value=\"Lippe\">Lippe</option>\n",
"<option value=\"Ludwigsburg\">Ludwigsburg</option>\n",
"<option value=\"Ludwigshafen am Rhein, kreisfreie Stadt\">Ludwigshafen am Rhein, kreisfreie Stadt</option>\n",
"<option value=\"Ludwigslust-Parchim\">Ludwigslust-Parchim</option>\n",
"<option value=\"Lörrach\">Lörrach</option>\n",
"<option value=\"Lübeck, Hansestadt\">Lübeck, Hansestadt</option>\n",
"<option value=\"Lüchow-Dannenberg\">Lüchow-Dannenberg</option>\n",
"<option value=\"Lüneburg\">Lüneburg</option>\n",
"<option value=\"Magdeburg, Landeshauptstadt\">Magdeburg, Landeshauptstadt</option>\n",
"<option value=\"Main-Kinzig-Kreis\">Main-Kinzig-Kreis</option>\n",
"<option value=\"Main-Spessart\">Main-Spessart</option>\n",
"<option value=\"Main-Tauber-Kreis\">Main-Tauber-Kreis</option>\n",
"<option value=\"Main-Taunus-Kreis\">Main-Taunus-Kreis</option>\n",
"<option value=\"Mainz, kreisfreie Stadt\">Mainz, kreisfreie Stadt</option>\n",
"<option value=\"Mainz-Bingen\">Mainz-Bingen</option>\n",
"<option value=\"Mannheim, Stadtkreis\">Mannheim, Stadtkreis</option>\n",
"<option value=\"Mansfeld-Südharz\">Mansfeld-Südharz</option>\n",
"<option value=\"Marburg-Biedenkopf\">Marburg-Biedenkopf</option>\n",
"<option value=\"Mayen-Koblenz\">Mayen-Koblenz</option>\n",
"<option value=\"Mecklenburgische Seenplatte\">Mecklenburgische Seenplatte</option>\n",
"<option value=\"Meißen\">Meißen</option>\n",
"<option value=\"Memmingen\">Memmingen</option>\n",
"<option value=\"Merzig-Wadern\">Merzig-Wadern</option>\n",
"<option value=\"Mettmann\">Mettmann</option>\n",
"<option value=\"Miesbach\">Miesbach</option>\n",
"<option value=\"Miltenberg\">Miltenberg</option>\n",
"<option value=\"Minden-Lübbecke\">Minden-Lübbecke</option>\n",
"<option value=\"Mittelsachsen\">Mittelsachsen</option>\n",
"<option value=\"Märkisch-Oderland\">Märkisch-Oderland</option>\n",
"<option value=\"Märkischer Kreis\">Märkischer Kreis</option>\n",
"<option value=\"Mönchengladbach, Stadt\">Mönchengladbach, Stadt</option>\n",
"<option value=\"Mühldorf a.Inn\">Mühldorf a.Inn</option>\n",
"<option value=\"Mülheim an der Ruhr, Stadt\">Mülheim an der Ruhr, Stadt</option>\n",
"<option value=\"München\">München</option>\n",
"<option value=\"München, Landeshauptstadt\">München, Landeshauptstadt</option>\n",
"<option value=\"Münster, Stadt\">Münster, Stadt</option>\n",
"<option value=\"Neckar-Odenwald-Kreis\">Neckar-Odenwald-Kreis</option>\n",
"<option value=\"Neu-Ulm\">Neu-Ulm</option>\n",
"<option value=\"Neuburg-Schrobenhausen\">Neuburg-Schrobenhausen</option>\n",
"<option value=\"Neumarkt i.d.OPf.\">Neumarkt i.d.OPf.</option>\n",
"<option value=\"Neumünster, Stadt\">Neumünster, Stadt</option>\n",
"<option value=\"Neunkirchen\">Neunkirchen</option>\n",
"<option value=\"Neustadt a.d.Aisch-Bad Windsheim\">Neustadt a.d.Aisch-Bad Windsheim</option>\n",
"<option value=\"Neustadt an der Weinstraße, kreisfreie Stadt\">Neustadt an der Weinstraße, kreisfreie Stadt</option>\n",
"<option value=\"Neuwied\">Neuwied</option>\n",
"<option value=\"Nienburg (Weser)\">Nienburg (Weser)</option>\n",
"<option value=\"Nordfriesland\">Nordfriesland</option>\n",
"<option value=\"Nordhausen\">Nordhausen</option>\n",
"<option value=\"Nordsachsen\">Nordsachsen</option>\n",
"<option value=\"Nordwestmecklenburg\">Nordwestmecklenburg</option>\n",
"<option value=\"Northeim\">Northeim</option>\n",
"<option value=\"Nürnberg\">Nürnberg</option>\n",
"<option value=\"Nürnberger Land\">Nürnberger Land</option>\n",
"<option value=\"Oberallgäu\">Oberallgäu</option>\n",
"<option value=\"Oberbergischer Kreis\">Oberbergischer Kreis</option>\n",
"<option value=\"Oberhausen, Stadt\">Oberhausen, Stadt</option>\n",
"<option value=\"Oberhavel\">Oberhavel</option>\n",
"<option value=\"Oberspreewald-Lausitz\">Oberspreewald-Lausitz</option>\n",
"<option value=\"Odenwaldkreis\">Odenwaldkreis</option>\n",
"<option value=\"Oder-Spree\">Oder-Spree</option>\n",
"<option value=\"Offenbach\">Offenbach</option>\n",
"<option value=\"Offenbach am Main, Stadt\">Offenbach am Main, Stadt</option>\n",
"<option value=\"Oldenburg\">Oldenburg</option>\n",
"<option value=\"Oldenburg (Oldenburg), Stadt\">Oldenburg (Oldenburg), Stadt</option>\n",
"<option value=\"Olpe\">Olpe</option>\n",
"<option value=\"Ortenaukreis\">Ortenaukreis</option>\n",
"<option value=\"Osnabrück\">Osnabrück</option>\n",
"<option value=\"Osnabrück, Stadt\">Osnabrück, Stadt</option>\n",
"<option value=\"Ostalbkreis\">Ostalbkreis</option>\n",
"<option value=\"Ostallgäu\">Ostallgäu</option>\n",
"<option value=\"Osterholz\">Osterholz</option>\n",
"<option value=\"Ostholstein\">Ostholstein</option>\n",
"<option value=\"Ostprignitz-Ruppin\">Ostprignitz-Ruppin</option>\n",
"<option value=\"Paderborn\">Paderborn</option>\n",
"<option value=\"Passau\">Passau</option>\n",
"<option value=\"Peine\">Peine</option>\n",
"<option value=\"Pfaffenhofen a.d.Ilm\">Pfaffenhofen a.d.Ilm</option>\n",
"<option value=\"Pforzheim, Stadtkreis\">Pforzheim, Stadtkreis</option>\n",
"<option value=\"Pinneberg\">Pinneberg</option>\n",
"<option value=\"Pirmasens, kreisfreie Stadt\">Pirmasens, kreisfreie Stadt</option>\n",
"<option value=\"Plön\">Plön</option>\n",
"<option value=\"Potsdam, Stadt\">Potsdam, Stadt</option>\n",
"<option value=\"Potsdam-Mittelmark\">Potsdam-Mittelmark</option>\n",
"<option value=\"Prignitz\">Prignitz</option>\n",
"<option value=\"Rastatt\">Rastatt</option>\n",
"<option value=\"Ravensburg\">Ravensburg</option>\n",
"<option value=\"Recklinghausen\">Recklinghausen</option>\n",
"<option value=\"Regen\">Regen</option>\n",
"<option value=\"Regensburg\">Regensburg</option>\n",
"<option value=\"Region Hannover\">Region Hannover</option>\n",
"<option value=\"Regionalverband Saarbrücken\">Regionalverband Saarbrücken</option>\n",
"<option value=\"Rems-Murr-Kreis\">Rems-Murr-Kreis</option>\n",
"<option value=\"Remscheid, Stadt\">Remscheid, Stadt</option>\n",
"<option value=\"Rendsburg-Eckernförde\">Rendsburg-Eckernförde</option>\n",
"<option value=\"Reutlingen\">Reutlingen</option>\n",
"<option value=\"Rhein-Erft-Kreis\">Rhein-Erft-Kreis</option>\n",
"<option value=\"Rhein-Hunsrück-Kreis\">Rhein-Hunsrück-Kreis</option>\n",
"<option value=\"Rhein-Kreis Neuss\">Rhein-Kreis Neuss</option>\n",
"<option value=\"Rhein-Lahn-Kreis\">Rhein-Lahn-Kreis</option>\n",
"<option value=\"Rhein-Neckar-Kreis\">Rhein-Neckar-Kreis</option>\n",
"<option value=\"Rhein-Sieg-Kreis\">Rhein-Sieg-Kreis</option>\n",
"<option value=\"Rheingau-Taunus-Kreis\">Rheingau-Taunus-Kreis</option>\n",
"<option value=\"Rheinisch-Bergischer Kreis\">Rheinisch-Bergischer Kreis</option>\n",
"<option value=\"Rhön-Grabfeld\">Rhön-Grabfeld</option>\n",
"<option value=\"Rosenheim\">Rosenheim</option>\n",
"<option value=\"Rostock\">Rostock</option>\n",
"<option value=\"Rotenburg (Wümme)\">Rotenburg (Wümme)</option>\n",
"<option value=\"Roth\">Roth</option>\n",
"<option value=\"Rottal-Inn\">Rottal-Inn</option>\n",
"<option value=\"Rottweil\">Rottweil</option>\n",
"<option value=\"Saale-Holzland-Kreis\">Saale-Holzland-Kreis</option>\n",
"<option value=\"Saale-Orla-Kreis\">Saale-Orla-Kreis</option>\n",
"<option value=\"Saalekreis\">Saalekreis</option>\n",
"<option value=\"Saalfeld-Rudolstadt\">Saalfeld-Rudolstadt</option>\n",
"<option value=\"Saarlouis\">Saarlouis</option>\n",
"<option value=\"Saarpfalz-Kreis\">Saarpfalz-Kreis</option>\n",
"<option value=\"Salzgitter, Stadt\">Salzgitter, Stadt</option>\n",
"<option value=\"Salzlandkreis\">Salzlandkreis</option>\n",
"<option value=\"Schaumburg\">Schaumburg</option>\n",
"<option value=\"Schleswig-Flensburg\">Schleswig-Flensburg</option>\n",
"<option value=\"Schmalkalden-Meiningen\">Schmalkalden-Meiningen</option>\n",
"<option value=\"Schwabach\">Schwabach</option>\n",
"<option value=\"Schwalm-Eder-Kreis\">Schwalm-Eder-Kreis</option>\n",
"<option value=\"Schwandorf\">Schwandorf</option>\n",
"<option value=\"Schwarzwald-Baar-Kreis\">Schwarzwald-Baar-Kreis</option>\n",
"<option value=\"Schweinfurt\">Schweinfurt</option>\n",
"<option value=\"Schwerin\">Schwerin</option>\n",
"<option value=\"Schwäbisch Hall\">Schwäbisch Hall</option>\n",
"<option value=\"Segeberg\">Segeberg</option>\n",
"<option value=\"Siegen-Wittgenstein\">Siegen-Wittgenstein</option>\n",
"<option value=\"Sigmaringen\">Sigmaringen</option>\n",
"<option value=\"Soest\">Soest</option>\n",
"<option value=\"Solingen, Klingenstadt\">Solingen, Klingenstadt</option>\n",
"<option value=\"Sonneberg\">Sonneberg</option>\n",
"<option value=\"Speyer, kreisfreie Stadt\">Speyer, kreisfreie Stadt</option>\n",
"<option value=\"Spree-Neiße\">Spree-Neiße</option>\n",
"<option value=\"St. Wendel\">St. Wendel</option>\n",
"<option value=\"Stade\">Stade</option>\n",
"<option value=\"Starnberg\">Starnberg</option>\n",
"<option value=\"Steinburg\">Steinburg</option>\n",
"<option value=\"Steinfurt\">Steinfurt</option>\n",
"<option value=\"Stendal\">Stendal</option>\n",
"<option value=\"Stormarn\">Stormarn</option>\n",
"<option value=\"Straubing\">Straubing</option>\n",
"<option value=\"Straubing-Bogen\">Straubing-Bogen</option>\n",
"<option value=\"Stuttgart, Stadtkreis\">Stuttgart, Stadtkreis</option>\n",
"<option value=\"Städteregion Aachen\">Städteregion Aachen</option>\n",
"<option value=\"Suhl, Stadt\">Suhl, Stadt</option>\n",
"<option value=\"Sächsische Schweiz-Osterzgebirge\">Sächsische Schweiz-Osterzgebirge</option>\n",
"<option value=\"Sömmerda\">Sömmerda</option>\n",
"<option value=\"Südliche Weinstraße\">Südliche Weinstraße</option>\n",
"<option value=\"Südwestpfalz\">Südwestpfalz</option>\n",
"<option value=\"Teltow-Fläming\">Teltow-Fläming</option>\n",
"<option value=\"Tirschenreuth\">Tirschenreuth</option>\n",
"<option value=\"Traunstein\">Traunstein</option>\n",
"<option value=\"Trier, kreisfreie Stadt\">Trier, kreisfreie Stadt</option>\n",
"<option value=\"Trier-Saarburg\">Trier-Saarburg</option>\n",
"<option value=\"Tuttlingen\">Tuttlingen</option>\n",
"<option value=\"Tübingen\">Tübingen</option>\n",
"<option value=\"Uckermark\">Uckermark</option>\n",
"<option value=\"Uelzen\">Uelzen</option>\n",
"<option value=\"Ulm, Stadtkreis\">Ulm, Stadtkreis</option>\n",
"<option value=\"Unna\">Unna</option>\n",
"<option value=\"Unstrut-Hainich-Kreis\">Unstrut-Hainich-Kreis</option>\n",
"<option value=\"Unterallgäu\">Unterallgäu</option>\n",
"<option value=\"Vechta\">Vechta</option>\n",
"<option value=\"Verden\">Verden</option>\n",
"<option value=\"Viersen\">Viersen</option>\n",
"<option value=\"Vogelsbergkreis\">Vogelsbergkreis</option>\n",
"<option value=\"Vogtlandkreis\">Vogtlandkreis</option>\n",
"<option value=\"Vorpommern-Greifswald\">Vorpommern-Greifswald</option>\n",
"<option value=\"Vorpommern-Rügen\">Vorpommern-Rügen</option>\n",
"<option value=\"Vulkaneifel\">Vulkaneifel</option>\n",
"<option value=\"Waldeck-Frankenberg\">Waldeck-Frankenberg</option>\n",
"<option value=\"Waldshut\">Waldshut</option>\n",
"<option value=\"Warendorf\">Warendorf</option>\n",
"<option value=\"Wartburgkreis\">Wartburgkreis</option>\n",
"<option value=\"Weiden i.d.OPf.\">Weiden i.d.OPf.</option>\n",
"<option value=\"Weilheim-Schongau\">Weilheim-Schongau</option>\n",
"<option value=\"Weimar, Stadt\">Weimar, Stadt</option>\n",
"<option value=\"Weimarer Land\">Weimarer Land</option>\n",
"<option value=\"Weißenburg-Gunzenhausen\">Weißenburg-Gunzenhausen</option>\n",
"<option value=\"Werra-Meißner-Kreis\">Werra-Meißner-Kreis</option>\n",
"<option value=\"Wesel\">Wesel</option>\n",
"<option value=\"Wesermarsch\">Wesermarsch</option>\n",
"<option value=\"Westerwaldkreis\">Westerwaldkreis</option>\n",
"<option value=\"Wetteraukreis\">Wetteraukreis</option>\n",
"<option value=\"Wiesbaden, Landeshauptstadt\">Wiesbaden, Landeshauptstadt</option>\n",
"<option value=\"Wilhelmshaven, Stadt\">Wilhelmshaven, Stadt</option>\n",
"<option value=\"Wittenberg\">Wittenberg</option>\n",
"<option value=\"Wittmund\">Wittmund</option>\n",
"<option value=\"Wolfenbüttel\">Wolfenbüttel</option>\n",
"<option value=\"Wolfsburg, Stadt\">Wolfsburg, Stadt</option>\n",
"<option value=\"Worms, kreisfreie Stadt\">Worms, kreisfreie Stadt</option>\n",
"<option value=\"Wunsiedel i.Fichtelgebirge\">Wunsiedel i.Fichtelgebirge</option>\n",
"<option value=\"Wuppertal, Stadt\">Wuppertal, Stadt</option>\n",
"<option value=\"Würzburg\">Würzburg</option>\n",
"<option value=\"Zollernalbkreis\">Zollernalbkreis</option>\n",
"<option value=\"Zweibrücken, kreisfreie Stadt\">Zweibrücken, kreisfreie Stadt</option>\n",
"<option value=\"Zwickau\">Zwickau</option>\n"
]
}
],
"source": [
"saveKreisOptions(kreisOptions)"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "43c2f826",
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"\n",
"\n",
"class IOUtils:\n",
"\n",
" def saveDictAsJson(dict, file):\n",
" IOUtils.ensurePath(file)\n",
" with open(file, 'w') as outfile:\n",
" json.dump(dict, outfile)\n",
"\n",
" @staticmethod\n",
" def ensurePath(file):\n",
" directory = os.path.dirname(file)\n",
" if not os.path.exists(directory):\n",
" os.makedirs(directory)\n"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "997a4bdb",
"metadata": {},
"outputs": [],
"source": [
"def getIntensiveCareBeds(timeSeries, kreis = None):\n",
" if kreis is not None:\n",
" return timeSeries[timeSeries['Kreis'] == kreis][['date', 'betten_belegt', 'betten_frei', 'Einwohnerzahl']]\n",
" else:\n",
" return timeSeries.groupby('date').agg(**{\n",
" 'betten_belegt': pd.NamedAgg(column = 'betten_belegt', aggfunc = 'sum'),\n",
" 'betten_frei': pd.NamedAgg(column = 'betten_frei', aggfunc = 'sum'),\n",
" 'Einwohnerzahl': pd.NamedAgg(column = 'Einwohnerzahl', aggfunc = 'sum') \n",
" }).reset_index()"
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "a97f5b2b",
"metadata": {},
"outputs": [],
"source": [
"import json\n",
"\n",
"\n",
"def getAndPersistIntensiveCareBeds(timeSeries, kreis = None):\n",
" intensiveCareBeds = getIntensiveCareBeds(timeSeries, kreis)\n",
" display(kreis)\n",
" _saveAsJson(intensiveCareBeds, _getFilename(kreis))\n",
" return intensiveCareBeds\n",
"\n",
"\n",
"def _saveAsJson(intensiveCareBeds, file):\n",
" IOUtils.saveDictAsJson(\n",
" {\n",
" 'population': int(intensiveCareBeds.iloc[0]['Einwohnerzahl']),\n",
" 'data': _intensiveCareBeds2Dict(intensiveCareBeds),\n",
" },\n",
" file)\n",
"\n",
"\n",
"def _intensiveCareBeds2Dict(intensiveCareBeds):\n",
" df = intensiveCareBeds[['date', 'betten_belegt', 'betten_frei']].copy()\n",
" df['date'] = df['date'].dt.strftime('%Y-%m-%d')\n",
" return df.to_dict(orient = \"records\")\n",
"\n",
"\n",
"def _getFilename(kreis):\n",
" return '../../docs/data/intensivstationen/intensivstationen-{suffix}.json'.format(suffix = _getSuffix(kreis))\n",
"\n",
"\n",
"def _getSuffix(kreis):\n",
" return kreis if kreis is not None else 'de'\n"
]
},
{
"cell_type": "code",
"execution_count": 19,
"id": "349edd73",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"None"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>date</th>\n",
" <th>betten_belegt</th>\n",
" <th>betten_frei</th>\n",
" <th>Einwohnerzahl</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>2020-04-24</td>\n",
" <td>19237</td>\n",
" <td>12270</td>\n",
" <td>82401553.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2020-04-25</td>\n",
" <td>19100</td>\n",
" <td>12290</td>\n",
" <td>82401553.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>2020-04-26</td>\n",
" <td>18617</td>\n",
" <td>12694</td>\n",
" <td>82401553.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>2020-04-27</td>\n",
" <td>18803</td>\n",
" <td>12537</td>\n",
" <td>82360711.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>2020-04-28</td>\n",
" <td>19345</td>\n",
" <td>12207</td>\n",
" <td>82504802.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>685</th>\n",
" <td>2022-03-10</td>\n",
" <td>20792</td>\n",
" <td>4043</td>\n",
" <td>82658396.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>686</th>\n",
" <td>2022-03-11</td>\n",
" <td>20770</td>\n",
" <td>3954</td>\n",
" <td>82658396.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>687</th>\n",
" <td>2022-03-12</td>\n",
" <td>20301</td>\n",
" <td>4134</td>\n",
" <td>82658396.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>688</th>\n",
" <td>2022-03-13</td>\n",
" <td>20001</td>\n",
" <td>4356</td>\n",
" <td>82658396.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>689</th>\n",
" <td>2022-03-14</td>\n",
" <td>20250</td>\n",
" <td>4328</td>\n",
" <td>82658396.0</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>690 rows × 4 columns</p>\n",
"</div>"
],
"text/plain": [
" date betten_belegt betten_frei Einwohnerzahl\n",
"0 2020-04-24 19237 12270 82401553.0\n",
"1 2020-04-25 19100 12290 82401553.0\n",
"2 2020-04-26 18617 12694 82401553.0\n",
"3 2020-04-27 18803 12537 82360711.0\n",
"4 2020-04-28 19345 12207 82504802.0\n",
".. ... ... ... ...\n",
"685 2022-03-10 20792 4043 82658396.0\n",
"686 2022-03-11 20770 3954 82658396.0\n",
"687 2022-03-12 20301 4134 82658396.0\n",
"688 2022-03-13 20001 4356 82658396.0\n",
"689 2022-03-14 20250 4328 82658396.0\n",
"\n",
"[690 rows x 4 columns]"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"getAndPersistIntensiveCareBeds(timeSeries)"
]
},
{
"cell_type": "code",
"execution_count": 20,
"id": "1b97137f",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'Ahrweiler'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Aichach-Friedberg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Alb-Donau-Kreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Altenburger Land'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Altenkirchen (Westerwald)'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Altmarkkreis Salzwedel'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Altötting'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Alzey-Worms'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Amberg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Amberg-Sulzbach'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Ammerland'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Anhalt-Bitterfeld'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Ansbach'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Aschaffenburg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Augsburg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Aurich'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Bad Dürkheim'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Bad Kissingen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Bad Kreuznach'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Bad Tölz-Wolfratshausen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Baden-Baden, Stadtkreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Bamberg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Barnim'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Bautzen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Bayreuth'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Berchtesgadener Land'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Bergstraße'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Berlin, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Bernkastel-Wittlich'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Biberach'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Bielefeld, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Birkenfeld'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Bochum, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Bodenseekreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Bonn, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Borken'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Bottrop, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Brandenburg an der Havel, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Braunschweig, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Breisgau-Hochschwarzwald'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Bremen, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Bremerhaven, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Burgenlandkreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Böblingen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Börde'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Calw'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Celle'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Cham'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Chemnitz, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Cloppenburg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Coburg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Cochem-Zell'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Coesfeld'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Cottbus, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Cuxhaven'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Dachau'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Dahme-Spreewald'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Darmstadt, Wissenschaftsstadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Darmstadt-Dieburg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Deggendorf'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Delmenhorst, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Dessau-Roßlau, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Diepholz'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Dillingen a.d.Donau'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Dingolfing-Landau'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Dithmarschen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Donau-Ries'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Donnersbergkreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Dortmund, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Dresden, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Duisburg, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Düren'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Düsseldorf, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Ebersberg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Eichsfeld'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Eichstätt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Eifelkreis Bitburg-Prüm'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Elbe-Elster'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Emden, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Emmendingen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Emsland'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Ennepe-Ruhr-Kreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Enzkreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Erding'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Erfurt, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Erlangen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Erlangen-Höchstadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Erzgebirgskreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Essen, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Esslingen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Euskirchen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Flensburg, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Forchheim'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Frankenthal (Pfalz), kreisfreie Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Frankfurt (Oder), Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Frankfurt am Main, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Freiburg im Breisgau, Stadtkreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Freising'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Freudenstadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Freyung-Grafenau'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Friesland'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Fulda'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Fürstenfeldbruck'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Fürth'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Garmisch-Partenkirchen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Gelsenkirchen, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Gera, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Germersheim'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Gießen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Gifhorn'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Goslar'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Gotha'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Grafschaft Bentheim'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Greiz'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Groß-Gerau'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Göppingen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Görlitz'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Göttingen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Günzburg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Gütersloh'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Hagen, Stadt der FernUniversität'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Halle (Saale), Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Hamburg, Freie und Hansestadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Hameln-Pyrmont'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Hamm, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Harburg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Harz'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Havelland'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Haßberge'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Heidekreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Heidelberg, Stadtkreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Heidenheim'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Heilbronn'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Heilbronn, Stadtkreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Heinsberg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Helmstedt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Herford'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Herne, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Hersfeld-Rotenburg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Herzogtum Lauenburg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Hildburghausen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Hildesheim'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Hochsauerlandkreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Hochtaunuskreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Hof'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Hohenlohekreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Holzminden'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Höxter'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Ilm-Kreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Ingolstadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Jena, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Jerichower Land'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Kaiserslautern'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Kaiserslautern, kreisfreie Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Karlsruhe'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Karlsruhe, Stadtkreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Kassel'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Kassel, documenta-Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Kaufbeuren'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Kelheim'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Kempten (Allgäu)'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Kiel, Landeshauptstadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Kitzingen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Kleve'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Koblenz, kreisfreie Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Konstanz'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Krefeld, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Kronach'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Kulmbach'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Kusel'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Kyffhäuserkreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Köln, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Lahn-Dill-Kreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Landau in der Pfalz, kreisfreie Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Landkreis Rostock'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Landsberg am Lech'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Landshut'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Leer'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Leipzig'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Leipzig, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Leverkusen, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Lichtenfels'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Limburg-Weilburg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Lindau (Bodensee)'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Lippe'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Ludwigsburg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Ludwigshafen am Rhein, kreisfreie Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Ludwigslust-Parchim'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Lörrach'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Lübeck, Hansestadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Lüchow-Dannenberg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Lüneburg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Magdeburg, Landeshauptstadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Main-Kinzig-Kreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Main-Spessart'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Main-Tauber-Kreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Main-Taunus-Kreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Mainz, kreisfreie Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Mainz-Bingen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Mannheim, Stadtkreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Mansfeld-Südharz'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Marburg-Biedenkopf'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Mayen-Koblenz'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Mecklenburgische Seenplatte'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Meißen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Memmingen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Merzig-Wadern'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Mettmann'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Miesbach'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Miltenberg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Minden-Lübbecke'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Mittelsachsen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Märkisch-Oderland'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Märkischer Kreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Mönchengladbach, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Mühldorf a.Inn'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Mülheim an der Ruhr, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'München'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'München, Landeshauptstadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Münster, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Neckar-Odenwald-Kreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Neu-Ulm'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Neuburg-Schrobenhausen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Neumarkt i.d.OPf.'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Neumünster, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Neunkirchen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Neustadt a.d.Aisch-Bad Windsheim'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Neustadt an der Weinstraße, kreisfreie Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Neuwied'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Nienburg (Weser)'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Nordfriesland'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Nordhausen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Nordsachsen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Nordwestmecklenburg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Northeim'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Nürnberg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Nürnberger Land'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Oberallgäu'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Oberbergischer Kreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Oberhausen, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Oberhavel'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Oberspreewald-Lausitz'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Odenwaldkreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Oder-Spree'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Offenbach'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Offenbach am Main, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Oldenburg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Oldenburg (Oldenburg), Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Olpe'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Ortenaukreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Osnabrück'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Osnabrück, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Ostalbkreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Ostallgäu'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Osterholz'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Ostholstein'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Ostprignitz-Ruppin'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Paderborn'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Passau'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Peine'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Pfaffenhofen a.d.Ilm'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Pforzheim, Stadtkreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Pinneberg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Pirmasens, kreisfreie Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Plön'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Potsdam, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Potsdam-Mittelmark'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Prignitz'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Rastatt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Ravensburg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Recklinghausen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Regen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Regensburg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Region Hannover'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Regionalverband Saarbrücken'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Rems-Murr-Kreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Remscheid, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Rendsburg-Eckernförde'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Reutlingen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Rhein-Erft-Kreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Rhein-Hunsrück-Kreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Rhein-Kreis Neuss'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Rhein-Lahn-Kreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Rhein-Neckar-Kreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Rhein-Sieg-Kreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Rheingau-Taunus-Kreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Rheinisch-Bergischer Kreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Rhön-Grabfeld'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Rosenheim'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Rostock'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Rotenburg (Wümme)'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Roth'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Rottal-Inn'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Rottweil'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Saale-Holzland-Kreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Saale-Orla-Kreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Saalekreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Saalfeld-Rudolstadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Saarlouis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Saarpfalz-Kreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Salzgitter, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Salzlandkreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Schaumburg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Schleswig-Flensburg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Schmalkalden-Meiningen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Schwabach'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Schwalm-Eder-Kreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Schwandorf'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Schwarzwald-Baar-Kreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Schweinfurt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Schwerin'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Schwäbisch Hall'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Segeberg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Siegen-Wittgenstein'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Sigmaringen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Soest'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Solingen, Klingenstadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Sonneberg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Speyer, kreisfreie Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Spree-Neiße'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'St. Wendel'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Stade'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Starnberg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Steinburg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Steinfurt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Stendal'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Stormarn'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Straubing'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Straubing-Bogen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Stuttgart, Stadtkreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Städteregion Aachen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Suhl, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Sächsische Schweiz-Osterzgebirge'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Sömmerda'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Südliche Weinstraße'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Südwestpfalz'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Teltow-Fläming'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Tirschenreuth'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Traunstein'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Trier, kreisfreie Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Trier-Saarburg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Tuttlingen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Tübingen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Uckermark'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Uelzen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Ulm, Stadtkreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Unna'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Unstrut-Hainich-Kreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Unterallgäu'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Vechta'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Verden'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Viersen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Vogelsbergkreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Vogtlandkreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Vorpommern-Greifswald'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Vorpommern-Rügen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Vulkaneifel'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Waldeck-Frankenberg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Waldshut'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Warendorf'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Wartburgkreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Weiden i.d.OPf.'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Weilheim-Schongau'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Weimar, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Weimarer Land'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Weißenburg-Gunzenhausen'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Werra-Meißner-Kreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Wesel'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Wesermarsch'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Westerwaldkreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Wetteraukreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Wiesbaden, Landeshauptstadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Wilhelmshaven, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Wittenberg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Wittmund'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Wolfenbüttel'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Wolfsburg, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Worms, kreisfreie Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Wunsiedel i.Fichtelgebirge'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Wuppertal, Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Würzburg'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Zollernalbkreis'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Zweibrücken, kreisfreie Stadt'"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Zwickau'"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"for kreis in kreisValues:\n",
" getAndPersistIntensiveCareBeds(timeSeries, kreis)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0218cdb4",
"metadata": {},
"outputs": [],
"source": [
"def publish():\n",
" %cd /home/frankknoll/Dokumente/Corona/projects/HowBadIsMyBatch-pages\n",
" ! git add -A\n",
" ! git commit -m \"updating data\"\n",
" ! git push"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5f173c2b",
"metadata": {},
"outputs": [],
"source": [
"publish()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"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.9.7"
}
},
"nbformat": 4,
"nbformat_minor": 5
}