From d6fc7bfd5ebe597c0c9ff5527e1100ffbd142137 Mon Sep 17 00:00:00 2001 From: frankknoll Date: Sat, 26 Mar 2022 17:29:48 +0100 Subject: [PATCH] refactoring --- src/intensivstationen/Intensivstationen.ipynb | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/intensivstationen/Intensivstationen.ipynb b/src/intensivstationen/Intensivstationen.ipynb index e18cc56da7b..be983739c35 100644 --- a/src/intensivstationen/Intensivstationen.ipynb +++ b/src/intensivstationen/Intensivstationen.ipynb @@ -676,7 +676,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 43, "id": "f10704f3", "metadata": {}, "outputs": [], @@ -688,24 +688,16 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 50, "id": "396cb4f8", "metadata": {}, "outputs": [], "source": [ - "medianOfFreeBedsByKreisTableFactory = MedianOfFreeBedsByKreisTableFactory(timeSeries)\n", - "medianOfFreeBedsByKreisTable = medianOfFreeBedsByKreisTableFactory.createMedianOfFreeBedsByKreisTable('gemeindeschluessel')\n", - "medianOfFreeBedsByKreisTable = medianOfFreeBedsByKreisTable.reset_index()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "3a1e481f", - "metadata": {}, - "outputs": [], - "source": [ - "medianOfFreeBedsByKreisTable = ColumnsAdder(kreise).addKreisAndEinwohnerzahlColumns(medianOfFreeBedsByKreisTable)\n", + "def createMedianOfFreeBedsByKreisTableForChoroplethMap(medianOfFreeBedsByKreisTableFactory):\n", + " medianOfFreeBedsByKreisTable = medianOfFreeBedsByKreisTableFactory.createMedianOfFreeBedsByKreisTable('gemeindeschluessel').reset_index()\n", + " return ColumnsAdder(kreise).addKreisAndEinwohnerzahlColumns(medianOfFreeBedsByKreisTable)\n", + " \n", + "medianOfFreeBedsByKreisTable = createMedianOfFreeBedsByKreisTableForChoroplethMap(medianOfFreeBedsByKreisTableFactory)\n", "medianOfFreeBedsByKreisTable.to_excel('medianOfFreeBedsByKreisTable.xlsx')" ] },