From 49db8cde8f7ece598c55ce8a1df9f67f4afa8d65 Mon Sep 17 00:00:00 2001 From: frankknoll Date: Fri, 31 Mar 2023 12:40:58 +0200 Subject: [PATCH] refactoring --- src/HowBadIsMyBatch.ipynb | 40 ++++++++++++++++++++++++++++----------- src/help.txt | 1 + 2 files changed, 30 insertions(+), 11 deletions(-) diff --git a/src/HowBadIsMyBatch.ipynb b/src/HowBadIsMyBatch.ipynb index 476fa7a2503..191d6ba3dbe 100644 --- a/src/HowBadIsMyBatch.ipynb +++ b/src/HowBadIsMyBatch.ipynb @@ -197,30 +197,48 @@ "metadata": {}, "outputs": [], "source": [ - "#res = pd.merge(\n", - "# batchCodeTable,\n", - "# countriesByClickedBatchcode,\n", - "# how = 'left',\n", - "# left_index = True,\n", - "# right_index = True,\n", - "# validate = 'one_to_one')\n", - "#res" + "from BatchCodeTableFactory import BatchCodeTableFactory\n", + "\n", + "batchCodeTable = BatchCodeTableFactory(internationalVaersCovid19).createGlobalBatchCodeTable(countriesAsList = True)\n", + "batchCodeTable" ] }, { "cell_type": "code", "execution_count": null, - "id": "b36ea0d4", + "id": "96d4a25c", "metadata": {}, "outputs": [], "source": [ - "# res[~res['batchCodeTableCountries guessed'].isna()].to_excel('tmp/tableWithCountriesGuessed.xlsx')" + "batchCodeTable['Countries']" ] }, { "cell_type": "code", "execution_count": null, - "id": "89c65459", + "id": "cefbcdc3", + "metadata": {}, + "outputs": [], + "source": [ + "countriesByBatchcodeBeforeDeletion['Countries']" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d9b2bc07", + "metadata": {}, + "outputs": [], + "source": [ + "from CountriesMerger import CountriesMerger\n", + "\n", + "CountriesMerger.mergeSrcIntoDst(dst = batchCodeTable['Countries'], src = countriesByBatchcodeBeforeDeletion['Countries'])" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "40321fd4", "metadata": {}, "outputs": [], "source": [ diff --git a/src/help.txt b/src/help.txt index 72fc8945b8e..506525ecb88 100644 --- a/src/help.txt +++ b/src/help.txt @@ -4,6 +4,7 @@ FK-FIXME: FK-TODO: - add google captcha to batchCodeTable.html +- remove batch code tables for countries (UI, GA event, code, ...) anacron job: sudo cp src/intensivstationen_howbadismybatch.sh /etc/cron.daily/intensivstationen_howbadismybatch