{ "cells": [ { "cell_type": "code", "execution_count": null, "id": "9de5907f-18f5-4cb1-903e-26028ff1fa03", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "\n", "pd.set_option('display.max_rows', 100)\n", "pd.set_option('display.max_columns', None)\n", "\n", "from VAERSFileDownloader import updateVAERSFiles\n", "from datetime import datetime\n", "from DateProvider import DateProvider\n", "from InternationalVaersCovid19Provider import getInternationalVaersCovid19\n", "from BatchCodeTableHtmlUpdater import updateBatchCodeTableHtmlFile" ] }, { "cell_type": "code", "execution_count": null, "id": "d1e4fa9e", "metadata": {}, "outputs": [], "source": [ "print(datetime.now().strftime(\"%d.%m.%Y, %H:%M:%S Uhr\"))\n" ] }, { "cell_type": "code", "execution_count": null, "id": "ffad1c04", "metadata": {}, "outputs": [], "source": [ "dateProvider = DateProvider()\n", "print(' lastUpdated:', dateProvider.getLastUpdated())\n", "print('lastUpdatedDataSource:', dateProvider.getLastUpdatedDataSource()) \n", "needsUpdate = dateProvider.needsUpdate()\n", "print('needsUpdate:', needsUpdate)" ] }, { "cell_type": "code", "execution_count": null, "id": "e673b947", "metadata": {}, "outputs": [], "source": [ "def getWorkingDirectory():\n", " pwd = ! \"pwd\"\n", " return pwd[0]" ] }, { "cell_type": "code", "execution_count": null, "id": "e313a06c", "metadata": {}, "outputs": [], "source": [ "getWorkingDirectory()" ] }, { "cell_type": "markdown", "id": "9514f5be", "metadata": {}, "source": [ "## Download VAERS-Data" ] }, { "cell_type": "code", "execution_count": null, "id": "a793dff0", "metadata": {}, "outputs": [], "source": [ "updateVAERSFiles(needsUpdate, getWorkingDirectory())" ] }, { "cell_type": "code", "execution_count": null, "id": "781ac80e", "metadata": {}, "outputs": [], "source": [ "internationalVaersCovid19 = getInternationalVaersCovid19(years = [2020, 2021, 2022])\n", "internationalVaersCovid19" ] }, { "cell_type": "code", "execution_count": null, "id": "8d6507ca", "metadata": {}, "outputs": [], "source": [ "updateBatchCodeTableHtmlFile(internationalVaersCovid19, batchCodeTableHtmlFile=\"../docs/batchCodeTable.html\")" ] }, { "cell_type": "code", "execution_count": null, "id": "8de69f66", "metadata": {}, "outputs": [], "source": [ "def publishGitHubPages():\n", " %cd /home/frankknoll/Dokumente/Corona/projects/HowBadIsMyBatch-pages\n", " ! git add -A\n", " ! git commit -m \"updating data for batch codes\"\n", " ! git push" ] }, { "cell_type": "markdown", "id": "3c7319f3", "metadata": {}, "source": [ "### see https://knollfrank.github.io/HowBadIsMyBatch/batchCodeTable.html" ] }, { "cell_type": "code", "execution_count": null, "id": "865df645", "metadata": {}, "outputs": [], "source": [ "publishGitHubPages()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3.10.7 64-bit", "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.10.7" }, "vscode": { "interpreter": { "hash": "916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1" } } }, "nbformat": 4, "nbformat_minor": 5 }