starting to add dateRange
This commit is contained in:
@@ -7,25 +7,24 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from CountryCountsByBatchcodeTable2BarChartDescriptionTableConverter import CountryCountsByBatchcodeTable2BarChartDescriptionTableConverter\n",
|
||||
"from CountriesByBatchcodeProvider import getCountryCountsByBatchcodeTable, filterByBatchcodes\n",
|
||||
"from Column2DataframeAdder import addColumn2Dataframe\n",
|
||||
"from BatchCodeTableFactory import BatchCodeTableFactory\n",
|
||||
"from HistogramFactoryAndPersister import createAndSaveGlobalHistograms\n",
|
||||
"from SymptomByBatchcodeTableFactory import SymptomByBatchcodeTableFactory\n",
|
||||
"from BatchCodeTablePersister import createGlobalBatchCodeTable\n",
|
||||
"from BatchCodeTableHtmlUpdater import updateBatchCodeTableHtmlFile, saveLastUpdatedBatchCodeTable\n",
|
||||
"from InternationalVaersCovid19Provider import getInternationalVaersCovid19, get_international_VAERSVAX_VAERSSYMPTOMS_Covid19\n",
|
||||
"from DateProvider import DateProvider\n",
|
||||
"from datetime import datetime\n",
|
||||
"from VAERSFileDownloader import updateVAERSFiles\n",
|
||||
"from IOUtils import IOUtils\n",
|
||||
"import os\n",
|
||||
"import pandas as pd\n",
|
||||
"\n",
|
||||
"pd.set_option('display.max_rows', 100)\n",
|
||||
"pd.set_option('display.max_columns', None)\n",
|
||||
"\n",
|
||||
"import os\n",
|
||||
"from IOUtils import IOUtils\n",
|
||||
"from VAERSFileDownloader import updateVAERSFiles\n",
|
||||
"from datetime import datetime\n",
|
||||
"from DateProvider import DateProvider\n",
|
||||
"from InternationalVaersCovid19Provider import getInternationalVaersCovid19, get_international_VAERSVAX_VAERSSYMPTOMS_Covid19\n",
|
||||
"from BatchCodeTableHtmlUpdater import updateBatchCodeTableHtmlFile, saveLastUpdatedBatchCodeTable\n",
|
||||
"from BatchCodeTablePersister import createGlobalBatchCodeTable\n",
|
||||
"from SymptomByBatchcodeTableFactory import SymptomByBatchcodeTableFactory\n",
|
||||
"from HistogramFactoryAndPersister import createAndSaveGlobalHistograms\n",
|
||||
"from BatchCodeTableFactory import BatchCodeTableFactory\n",
|
||||
"from Column2DataframeAdder import addColumn2Dataframe\n",
|
||||
"from CountriesByBatchcodeProvider import getCountryCountsByBatchcodeTable, filterByBatchcodes\n",
|
||||
"from CountryCountsByBatchcodeTable2BarChartDescriptionTableConverter import CountryCountsByBatchcodeTable2BarChartDescriptionTableConverter\n"
|
||||
"pd.set_option('display.max_columns', None)\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -35,7 +34,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"print(datetime.now().strftime(\"%d.%m.%Y, %H:%M:%S Uhr\"))"
|
||||
"print(datetime.now().strftime(\"%d.%m.%Y, %H:%M:%S Uhr\"))\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -49,7 +48,7 @@
|
||||
"print(' lastUpdated:', dateProvider.getLastUpdated())\n",
|
||||
"print('lastUpdatedDataSource:', dateProvider.getLastUpdatedDataSource())\n",
|
||||
"needsUpdate = dateProvider.needsUpdate()\n",
|
||||
"print('needsUpdate:', needsUpdate)"
|
||||
"print('needsUpdate:', needsUpdate)\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -59,7 +58,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"years_from_start_of_COVID_vaccination_to_present = list(range(2020, datetime.now().year + 1))"
|
||||
"years_from_start_of_COVID_vaccination_to_present = list(range(2020, datetime.now().year + 1))\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -91,7 +90,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"international_VAERSVAX_Covid19"
|
||||
"international_VAERSVAX_Covid19\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -101,7 +100,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"international_VAERSSYMPTOMS"
|
||||
"international_VAERSSYMPTOMS\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -200,25 +199,44 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "8e1b471a",
|
||||
"id": "7ebfd53c",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"barChartDescriptionTable['BAR_CHART_DESCRIPTION'].to_json('../docs/data/barChartDescriptionTable.json')"
|
||||
"def dateRange2Str(dateRange):\n",
|
||||
" return {\n",
|
||||
" 'start': _date2Str(dateRange[0]),\n",
|
||||
" 'end': _date2Str(dateRange[1])\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
"def _date2Str(date):\n",
|
||||
" return date.strftime(\"%d.%m.%Y\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "af8b598c",
|
||||
"id": "0ec101b6",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from GoogleAnalyticsReader import GoogleAnalyticsReader\n",
|
||||
"\n",
|
||||
"googleAnalyticsReader = GoogleAnalyticsReader(dataDir = 'data/GoogleAnalytics')\n",
|
||||
"dateRange = googleAnalyticsReader.getDateRange()\n",
|
||||
"dateRange"
|
||||
"dateRange = GoogleAnalyticsReader(dataDir = 'data/GoogleAnalytics').getDateRange()\n",
|
||||
"barChartDescriptions = {\n",
|
||||
" 'dateRange': dateRange2Str(dateRange),\n",
|
||||
" 'barChartDescriptions': barChartDescriptionTable['BAR_CHART_DESCRIPTION'].to_dict()\n",
|
||||
"}\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "163830ba",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"IOUtils.saveDictAsJson(barChartDescriptions, '../docs/data/barChartDescriptionTable.json')\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -350,7 +368,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# vaccineDistributionByZipcode.to_excel('tmp/Amended-22-01962-Pfizer-2022-0426-pulled-2022-0823_sumDoses.xlsx')"
|
||||
"# vaccineDistributionByZipcode.to_excel('tmp/Amended-22-01962-Pfizer-2022-0426-pulled-2022-0823_sumDoses.xlsx')\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user