updating Countries column

This commit is contained in:
frankknoll
2023-04-02 10:37:19 +02:00
parent 0d55399a87
commit f76e3909f9
1028 changed files with 1124 additions and 1254 deletions

View File

@@ -20,7 +20,9 @@
"from BatchCodeTableHtmlUpdater import updateBatchCodeTableHtmlFile\n",
"from BatchCodeTablePersister import createAndSaveBatchCodeTables\n",
"from SymptomByBatchcodeTableFactory import SymptomByBatchcodeTableFactory\n",
"from HistogramFactoryAndPersister import createAndSaveGlobalHistograms, createAndSaveHistogramsForCountries"
"from HistogramFactoryAndPersister import createAndSaveGlobalHistograms, createAndSaveHistogramsForCountries\n",
"from BatchCodeTableFactory import BatchCodeTableFactory\n",
"from BatchCodeTableHavingGuessedCountriesFactory import BatchCodeTableHavingGuessedCountriesFactory\n"
]
},
{
@@ -141,134 +143,6 @@
"internationalVaersCovid19"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4e789358",
"metadata": {},
"outputs": [],
"source": [
"from CountriesByBatchcodeProvider import getCountriesByBatchcodeBeforeDeletion\n",
"\n",
"countriesByBatchcodeBeforeDeletion = getCountriesByBatchcodeBeforeDeletion()\n",
"countriesByBatchcodeBeforeDeletion"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "15ec979e",
"metadata": {},
"outputs": [],
"source": [
"countriesByBatchcodeBeforeDeletion.to_csv('tmp/countriesByBatchcodeBeforeDeletion.csv')"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0e7dae70",
"metadata": {},
"outputs": [],
"source": [
"from CountriesByBatchcodeProvider import getCountriesByCompletedBatchcode\n",
"\n",
"countriesByCompletedBatchcode = getCountriesByCompletedBatchcode(internationalVaersCovid19)\n",
"countriesByCompletedBatchcode"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0087d657",
"metadata": {},
"outputs": [],
"source": [
"from CountriesByBatchcodeProvider import getCountriesByClickedBatchcode\n",
"\n",
"countriesByClickedBatchcode = getCountriesByClickedBatchcode()\n",
"countriesByClickedBatchcode"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d6dd7355",
"metadata": {},
"outputs": [],
"source": [
"from BatchCodeTableFactory import BatchCodeTableFactory\n",
"\n",
"batchCodeTable = BatchCodeTableFactory(internationalVaersCovid19).createGlobalBatchCodeTable(countriesAsList = True)\n",
"batchCodeTable"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "96d4a25c",
"metadata": {},
"outputs": [],
"source": [
"batchCodeTable['Countries']"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "cefbcdc3",
"metadata": {},
"outputs": [],
"source": [
"countriesByBatchcodeBeforeDeletion['Countries']"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d9b2bc07",
"metadata": {},
"outputs": [],
"source": [
"from CountriesMerger import CountriesMerger\n",
"\n",
"mergedCountries = CountriesMerger.mergeSrcIntoDst(dst = batchCodeTable['Countries'], src = countriesByBatchcodeBeforeDeletion['Countries'])\n",
"mergedCountries"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "6ae58448",
"metadata": {},
"outputs": [],
"source": [
"batchCodeTable['Countries'] = mergedCountries\n",
"batchCodeTable"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "12593012",
"metadata": {},
"outputs": [],
"source": [
"mergedCountries.to_excel('tmp/mergedCountries.xlsx')"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "40321fd4",
"metadata": {},
"outputs": [],
"source": [
"country_By_Batchcode_Search_Term.to_excel('tmp/Country_By_Batchcode_Search_Term.xlsx')\n",
"FK-TODO: country_By_Batchcode_Search_Term['Completed Batchcode'] + Country-Spalten dazu verwenden,\n",
" in der BatchCodeTable der Web-Seite fehlende mit 'Unknown Country' markierte Countries nachzutragen."
]
},
{
"cell_type": "code",
"execution_count": null,
@@ -289,6 +163,7 @@
"createAndSaveBatchCodeTables(\n",
" internationalVaersCovid19,\n",
" minADRsForLethality = 100,\n",
" batchCodeTableFactory = BatchCodeTableHavingGuessedCountriesFactory(BatchCodeTableFactory(internationalVaersCovid19)),\n",
" onCountryProcessed = display)"
]
},