updating data

This commit is contained in:
frankknoll
2022-03-31 08:52:11 +02:00
parent e91b8aa260
commit 9d7da96de9
388 changed files with 614 additions and 487 deletions

View File

@@ -25,7 +25,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"26.03.2022, 17:10:27 Uhr\n"
"31.03.2022, 08:46:18 Uhr\n"
]
}
],
@@ -133,8 +133,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
" lastUpdated: 2022-03-25 15:14:00\n",
"lastUpdatedDataSource: 2022-03-26 12:33:00\n",
" lastUpdated: 2022-03-29 13:32:00\n",
"lastUpdatedDataSource: 2022-03-30 13:32:00\n",
"needsUpdate: True\n"
]
}
@@ -313,40 +313,40 @@
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>277547</th>\n",
" <td>2022-03-26</td>\n",
" <th>279131</th>\n",
" <td>2022-03-30</td>\n",
" <td>06</td>\n",
" <td>06437</td>\n",
" <td>9</td>\n",
" <td>117</td>\n",
" <td>7</td>\n",
" <td>119</td>\n",
" </tr>\n",
" <tr>\n",
" <th>277546</th>\n",
" <td>2022-03-26</td>\n",
" <th>279130</th>\n",
" <td>2022-03-30</td>\n",
" <td>06</td>\n",
" <td>06436</td>\n",
" <td>0</td>\n",
" <td>22</td>\n",
" <td>1</td>\n",
" <td>23</td>\n",
" </tr>\n",
" <tr>\n",
" <th>277545</th>\n",
" <td>2022-03-26</td>\n",
" <th>279129</th>\n",
" <td>2022-03-30</td>\n",
" <td>06</td>\n",
" <td>06435</td>\n",
" <td>6</td>\n",
" <td>75</td>\n",
" <td>11</td>\n",
" <td>70</td>\n",
" </tr>\n",
" <tr>\n",
" <th>277543</th>\n",
" <td>2022-03-26</td>\n",
" <th>279127</th>\n",
" <td>2022-03-30</td>\n",
" <td>06</td>\n",
" <td>06433</td>\n",
" <td>2</td>\n",
" <td>21</td>\n",
" <td>19</td>\n",
" </tr>\n",
" <tr>\n",
" <th>277816</th>\n",
" <td>2022-03-26</td>\n",
" <th>279400</th>\n",
" <td>2022-03-30</td>\n",
" <td>16</td>\n",
" <td>16077</td>\n",
" <td>5</td>\n",
@@ -354,7 +354,7 @@
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>277817 rows × 5 columns</p>\n",
"<p>279401 rows × 5 columns</p>\n",
"</div>"
],
"text/plain": [
@@ -365,13 +365,13 @@
"265 2020-04-24 09 09463 9 25\n",
"264 2020-04-24 09 09462 12 51\n",
"... ... ... ... ... ...\n",
"277547 2022-03-26 06 06437 9 117\n",
"277546 2022-03-26 06 06436 0 22\n",
"277545 2022-03-26 06 06435 6 75\n",
"277543 2022-03-26 06 06433 2 21\n",
"277816 2022-03-26 16 16077 5 27\n",
"279131 2022-03-30 06 06437 7 119\n",
"279130 2022-03-30 06 06436 1 23\n",
"279129 2022-03-30 06 06435 11 70\n",
"279127 2022-03-30 06 06433 2 19\n",
"279400 2022-03-30 16 16077 5 27\n",
"\n",
"[277817 rows x 5 columns]"
"[279401 rows x 5 columns]"
]
},
"execution_count": 11,
@@ -717,52 +717,52 @@
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>277547</th>\n",
" <td>2022-03-26</td>\n",
" <th>279131</th>\n",
" <td>2022-03-30</td>\n",
" <td>06</td>\n",
" <td>06437</td>\n",
" <td>9</td>\n",
" <td>117</td>\n",
" <td>7</td>\n",
" <td>119</td>\n",
" <td>Odenwaldkreis</td>\n",
" <td>96754.0</td>\n",
" <td>Hessen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>277546</th>\n",
" <td>2022-03-26</td>\n",
" <th>279130</th>\n",
" <td>2022-03-30</td>\n",
" <td>06</td>\n",
" <td>06436</td>\n",
" <td>0</td>\n",
" <td>22</td>\n",
" <td>1</td>\n",
" <td>23</td>\n",
" <td>Main-Taunus-Kreis</td>\n",
" <td>239264.0</td>\n",
" <td>Hessen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>277545</th>\n",
" <td>2022-03-26</td>\n",
" <th>279129</th>\n",
" <td>2022-03-30</td>\n",
" <td>06</td>\n",
" <td>06435</td>\n",
" <td>6</td>\n",
" <td>75</td>\n",
" <td>11</td>\n",
" <td>70</td>\n",
" <td>Main-Kinzig-Kreis</td>\n",
" <td>421689.0</td>\n",
" <td>Hessen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>277543</th>\n",
" <td>2022-03-26</td>\n",
" <th>279127</th>\n",
" <td>2022-03-30</td>\n",
" <td>06</td>\n",
" <td>06433</td>\n",
" <td>2</td>\n",
" <td>21</td>\n",
" <td>19</td>\n",
" <td>Groß-Gerau</td>\n",
" <td>275807.0</td>\n",
" <td>Hessen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>277816</th>\n",
" <td>2022-03-26</td>\n",
" <th>279400</th>\n",
" <td>2022-03-30</td>\n",
" <td>16</td>\n",
" <td>16077</td>\n",
" <td>5</td>\n",
@@ -773,7 +773,7 @@
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>277817 rows × 8 columns</p>\n",
"<p>279401 rows × 8 columns</p>\n",
"</div>"
],
"text/plain": [
@@ -784,11 +784,11 @@
"265 2020-04-24 09 09463 9 25 \n",
"264 2020-04-24 09 09462 12 51 \n",
"... ... ... ... ... ... \n",
"277547 2022-03-26 06 06437 9 117 \n",
"277546 2022-03-26 06 06436 0 22 \n",
"277545 2022-03-26 06 06435 6 75 \n",
"277543 2022-03-26 06 06433 2 21 \n",
"277816 2022-03-26 16 16077 5 27 \n",
"279131 2022-03-30 06 06437 7 119 \n",
"279130 2022-03-30 06 06436 1 23 \n",
"279129 2022-03-30 06 06435 11 70 \n",
"279127 2022-03-30 06 06433 2 19 \n",
"279400 2022-03-30 16 16077 5 27 \n",
"\n",
" Kreis Einwohnerzahl Bundesland \n",
"0 Flensburg, Stadt 89934.0 Schleswig-Holstein \n",
@@ -797,13 +797,13 @@
"265 Coburg 40842.0 Bayern \n",
"264 Bayreuth 74048.0 Bayern \n",
"... ... ... ... \n",
"277547 Odenwaldkreis 96754.0 Hessen \n",
"277546 Main-Taunus-Kreis 239264.0 Hessen \n",
"277545 Main-Kinzig-Kreis 421689.0 Hessen \n",
"277543 Groß-Gerau 275807.0 Hessen \n",
"277816 Altenburger Land 88356.0 Thüringen \n",
"279131 Odenwaldkreis 96754.0 Hessen \n",
"279130 Main-Taunus-Kreis 239264.0 Hessen \n",
"279129 Main-Kinzig-Kreis 421689.0 Hessen \n",
"279127 Groß-Gerau 275807.0 Hessen \n",
"279400 Altenburger Land 88356.0 Thüringen \n",
"\n",
"[277817 rows x 8 columns]"
"[279401 rows x 8 columns]"
]
},
"execution_count": 15,
@@ -1179,43 +1179,43 @@
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>697</th>\n",
" <td>2022-03-22</td>\n",
" <td>20513</td>\n",
" <td>3973</td>\n",
" <td>82658396.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>698</th>\n",
" <td>2022-03-23</td>\n",
" <td>20634</td>\n",
" <td>3876</td>\n",
" <td>82658396.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>699</th>\n",
" <td>2022-03-24</td>\n",
" <td>20709</td>\n",
" <td>3864</td>\n",
" <td>82658396.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>700</th>\n",
" <td>2022-03-25</td>\n",
" <td>20595</td>\n",
" <td>3846</td>\n",
" <td>82658396.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>701</th>\n",
" <td>2022-03-26</td>\n",
" <td>20268</td>\n",
" <td>3930</td>\n",
" <td>3924</td>\n",
" <td>82658396.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>702</th>\n",
" <td>2022-03-27</td>\n",
" <td>19921</td>\n",
" <td>4187</td>\n",
" <td>82658396.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>703</th>\n",
" <td>2022-03-28</td>\n",
" <td>20123</td>\n",
" <td>4263</td>\n",
" <td>82658396.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>704</th>\n",
" <td>2022-03-29</td>\n",
" <td>20656</td>\n",
" <td>3904</td>\n",
" <td>82658396.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>705</th>\n",
" <td>2022-03-30</td>\n",
" <td>20828</td>\n",
" <td>3772</td>\n",
" <td>82658396.0</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>702 rows × 4 columns</p>\n",
"<p>706 rows × 4 columns</p>\n",
"</div>"
],
"text/plain": [
@@ -1226,13 +1226,13 @@
"3 2020-04-27 18803 12537 82360711.0\n",
"4 2020-04-28 19345 12207 82504802.0\n",
".. ... ... ... ...\n",
"697 2022-03-22 20513 3973 82658396.0\n",
"698 2022-03-23 20634 3876 82658396.0\n",
"699 2022-03-24 20709 3864 82658396.0\n",
"700 2022-03-25 20595 3846 82658396.0\n",
"701 2022-03-26 20268 3930 82658396.0\n",
"701 2022-03-26 20268 3924 82658396.0\n",
"702 2022-03-27 19921 4187 82658396.0\n",
"703 2022-03-28 20123 4263 82658396.0\n",
"704 2022-03-29 20656 3904 82658396.0\n",
"705 2022-03-30 20828 3772 82658396.0\n",
"\n",
"[702 rows x 4 columns]"
"[706 rows x 4 columns]"
]
},
"execution_count": 28,
@@ -4794,7 +4794,7 @@
"test_createMedianOfFreeBedsByKreisTable (__main__.MedianOfFreeBedsByKreisTableFactoryTest) ... ok\n",
"\n",
"----------------------------------------------------------------------\n",
"Ran 2 tests in 0.063s\n",
"Ran 2 tests in 0.019s\n",
"\n",
"OK\n"
]
@@ -4802,7 +4802,7 @@
{
"data": {
"text/plain": [
"<unittest.main.TestProgram at 0x7f2e491158e0>"
"<unittest.main.TestProgram at 0x7f7609c09640>"
]
},
"execution_count": 32,
@@ -4816,7 +4816,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 33,
"id": "f10704f3",
"metadata": {},
"outputs": [],
@@ -4828,7 +4828,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 34,
"id": "396cb4f8",
"metadata": {},
"outputs": [],
@@ -4842,7 +4842,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 35,
"id": "b4247571",
"metadata": {},
"outputs": [],
@@ -4902,7 +4902,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 36,
"id": "d1b75357",
"metadata": {},
"outputs": [],
@@ -4916,10 +4916,137 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 37,
"id": "9de2f34e",
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"{'data': {'publicId': 'dYmYb',\n",
" 'language': 'de-DE',\n",
" 'theme': 'datawrapper',\n",
" 'id': 'dYmYb',\n",
" 'type': 'd3-maps-choropleth',\n",
" 'title': 'Median freier Intensivbetten im Zeitraum 24.04.2020 bis 30.03.2022',\n",
" 'lastEditStep': 5,\n",
" 'publishedAt': '2022-03-31T06:50:23.522Z',\n",
" 'publicUrl': 'https://datawrapper.dwcdn.net/dYmYb/41/',\n",
" 'publicVersion': 41,\n",
" 'deleted': False,\n",
" 'deletedAt': None,\n",
" 'forkable': True,\n",
" 'isFork': False,\n",
" 'metadata': {'data': {'transpose': False,\n",
" 'vertical-header': True,\n",
" 'horizontal-header': True,\n",
" 'column-format': {'ags': {'type': 'text'},\n",
" 'Kreis': {'type': 'text'},\n",
" 'Einwohnerzahl': {'type': 'number',\n",
" 'number-append': '',\n",
" 'number-format': 'auto',\n",
" 'number-divisor': 0,\n",
" 'number-prepend': ''},\n",
" 'gemeindeschluessel': {'type': 'text'},\n",
" 'median_free_beds_in_percent': {'type': 'number'}},\n",
" 'upload-method': 'upload'},\n",
" 'describe': {'source-name': 'Landkreis-Daten',\n",
" 'source-url': 'https://www.intensivregister.de/#/aktuelle-lage/downloads',\n",
" 'intro': '',\n",
" 'byline': '',\n",
" 'aria-description': '',\n",
" 'number-format': '-',\n",
" 'number-divisor': 0,\n",
" 'number-append': '',\n",
" 'number-prepend': '',\n",
" 'hide-title': False},\n",
" 'visualize': {'highlighted-series': [],\n",
" 'highlighted-values': [],\n",
" 'labels': {'max': 33, 'type': 'places', 'places': [], 'enabled': False},\n",
" 'legend': {'size': 170,\n",
" 'title': '',\n",
" 'labels': 'ranges',\n",
" 'enabled': True,\n",
" 'reverse': True,\n",
" 'labelMax': 'high',\n",
" 'labelMin': 'low',\n",
" 'position': 'mt',\n",
" 'hideItems': [],\n",
" 'offsetTop': 0,\n",
" 'offsetLeft': 0,\n",
" 'interactive': True,\n",
" 'labelCenter': 'medium',\n",
" 'labelFormat': '0%',\n",
" 'orientation': 'horizontal',\n",
" 'customLabels': ['Group A', 'Group B', 'Group C']},\n",
" 'basemap': 'germany-kreise-2021',\n",
" 'sharing': {'auto': True, 'enabled': False},\n",
" 'tooltip': {'body': 'Median freier Intensivbetten: <b>{{ FORMAT(median_free_beds_in_percent, \"0.0%\") }}</b>\\n\\n',\n",
" 'title': '{{ kreis }}',\n",
" 'sticky': True,\n",
" 'enabled': True},\n",
" 'zoomable': True,\n",
" 'map-align': 'center',\n",
" 'colorscale': {'map': [],\n",
" 'mode': 'discrete',\n",
" 'stops': 'custom',\n",
" 'colors': [{'color': '#F03B20', 'position': 0},\n",
" {'color': '#FEB24C', 'position': 0.5},\n",
" {'color': '#38A800', 'position': 1}],\n",
" 'palette': 0,\n",
" 'rangeMax': '100',\n",
" 'rangeMin': '0',\n",
" 'stopCount': 3,\n",
" 'customStops': [None, '10', '25', None, 45.5, 56.1, None],\n",
" 'rangeCenter': '',\n",
" 'categoryOrder': [],\n",
" 'interpolation': 'equidistant',\n",
" 'categoryLabels': []},\n",
" 'max-height': 650,\n",
" 'map-padding': 0,\n",
" 'map-key-attr': 'ags',\n",
" 'map-type-set': True,\n",
" 'chart-type-set': True,\n",
" 'max-map-height': 650,\n",
" 'min-label-zoom': 1,\n",
" 'zoom-button-pos': 'br',\n",
" 'map-label-format': '0,0.[00]',\n",
" 'text-annotations': [],\n",
" 'hide-empty-regions': False,\n",
" 'avoid-label-overlap': True},\n",
" 'publish': {'embed-width': 600,\n",
" 'embed-height': 785,\n",
" 'blocks': {'logo': {'enabled': False},\n",
" 'embed': True,\n",
" 'download-pdf': False,\n",
" 'download-svg': False,\n",
" 'get-the-data': True,\n",
" 'download-image': True},\n",
" 'embed-codes': {'embed-method-responsive': '<iframe title=\"Median freier Intensivbetten im Zeitraum 24.04.2020 bis 30.03.2022\" aria-label=\"Karte\" id=\"datawrapper-chart-dYmYb\" src=\"https://datawrapper.dwcdn.net/dYmYb/41/\" scrolling=\"no\" frameborder=\"0\" style=\"width: 0; min-width: 100% !important; border: none;\" height=\"785\"></iframe><script type=\"text/javascript\">!function(){\"use strict\";window.addEventListener(\"message\",(function(e){if(void 0!==e.data[\"datawrapper-height\"]){var t=document.querySelectorAll(\"iframe\");for(var a in e.data[\"datawrapper-height\"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data[\"datawrapper-height\"][a]+\"px\"}}}))}();\\n</script>',\n",
" 'embed-method-iframe': '<iframe title=\"Median freier Intensivbetten im Zeitraum 24.04.2020 bis 30.03.2022\" aria-label=\"Karte\" id=\"datawrapper-chart-dYmYb\" src=\"https://datawrapper.dwcdn.net/dYmYb/41/\" scrolling=\"no\" frameborder=\"0\" style=\"border: none;\" width=\"600\" height=\"785\"></iframe>'},\n",
" 'chart-height': 673.13330078125},\n",
" 'annotate': {'notes': ''},\n",
" 'axes': {'keys': 'gemeindeschluessel',\n",
" 'values': 'median_free_beds_in_percent'},\n",
" 'json_error': None},\n",
" 'externalData': '',\n",
" 'keywords': '. . landkreis-daten. . . ',\n",
" 'utf8': False,\n",
" 'createdAt': '2022-03-25T16:27:58.000Z',\n",
" 'lastModifiedAt': '2022-03-31T06:50:23.522Z',\n",
" 'forkedFrom': None,\n",
" 'organizationId': None,\n",
" 'authorId': 433861,\n",
" 'folderId': None},\n",
" 'version': 41,\n",
" 'url': 'https://datawrapper.dwcdn.net/dYmYb/41/'}"
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from decouple import AutoConfig\n",
"\n",