createBatchCodeTableByCountry() for some countries
This commit is contained in:
@@ -1060,11 +1060,13 @@
|
||||
"source": [
|
||||
"# https://www.howbadismybatch.com/international.html\n",
|
||||
"\n",
|
||||
"def createInternationalLotTable():\n",
|
||||
"def getNonDomesticVaers():\n",
|
||||
" vaersDescr = VaersDescrReader(dataDir = 'VAERS').readNonDomesticVaersDescr()\n",
|
||||
" dataFrame = VaersDescr2DataFrameConverter.createDataFrameFromDescr(vaersDescr)\n",
|
||||
" DataFrameNormalizer.normalize(dataFrame)\n",
|
||||
" return InternationalLotTableFactory.createInternationalLotTable(dataFrame)\n"
|
||||
" return dataFrame\n",
|
||||
"\n",
|
||||
"nonDomesticVaers = getNonDomesticVaers()"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1074,7 +1076,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"internationalLotTable = createInternationalLotTable()"
|
||||
"internationalLotTable = InternationalLotTableFactory.createInternationalLotTable(nonDomesticVaers)"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1090,30 +1092,6 @@
|
||||
"internationalLotTable"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "0f691bf5",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"def createBatchCodeTableByCountry(country):\n",
|
||||
" vaersDescr = VaersDescrReader(dataDir = 'VAERS').readNonDomesticVaersDescr()\n",
|
||||
" dataFrame = VaersDescr2DataFrameConverter.createDataFrameFromDescr(vaersDescr)\n",
|
||||
" DataFrameNormalizer.normalize(dataFrame)\n",
|
||||
" return InternationalLotTableFactory.createBatchCodeTableByCountry(dataFrame, country)\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "59f7e62c",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"batchCodeTable = createBatchCodeTableByCountry('France')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
@@ -1121,6 +1099,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# FK-TODO: jedes zu speichernde Ergebnis in passenden Order speichern\n",
|
||||
"import os\n",
|
||||
"\n",
|
||||
"report_path = 'results/international/'\n",
|
||||
@@ -1135,9 +1114,11 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"batchCodeTable = batchCodeTable[batchCodeTable['Total reports'] > 50]\n",
|
||||
"batchCodeTable.to_excel(report_path + 'france.xlsx')\n",
|
||||
"batchCodeTable"
|
||||
"for country in ['United Kingdom', 'France', 'Germany', 'Japan', 'Italy', 'Austria', 'Netherlands', 'Spain', 'Belgium', 'Sweden', 'Portugal', 'Australia']:\n",
|
||||
" batchCodeTable = InternationalLotTableFactory.createBatchCodeTableByCountry(nonDomesticVaers, country)\n",
|
||||
" batchCodeTable = batchCodeTable[batchCodeTable['Total reports'] > 50]\n",
|
||||
" batchCodeTable.to_excel(report_path + country + '.xlsx')\n",
|
||||
" display(country + \":\", batchCodeTable)"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user