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