getDateRangeOfVAERSReportsBeforeDeletionOfCountryCodes()
This commit is contained in:
@@ -127,6 +127,7 @@ class BatchCodeTableInitializer {
|
|||||||
const barChartDescription = barChartDescriptions.barChartDescriptions[batchcode];
|
const barChartDescription = barChartDescriptions.barChartDescriptions[batchcode];
|
||||||
barChartDescription.batchcode = batchcode;
|
barChartDescription.batchcode = batchcode;
|
||||||
barChartDescription['dateRange guessed'] = barChartDescriptions['dateRange guessed'];
|
barChartDescription['dateRange guessed'] = barChartDescriptions['dateRange guessed'];
|
||||||
|
barChartDescription['dateRange before deletion'] = barChartDescriptions['dateRange before deletion'];
|
||||||
return barChartDescription;
|
return barChartDescription;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class BatchcodeByCountryBarChart {
|
|||||||
labels: barChartDescription.countries,
|
labels: barChartDescription.countries,
|
||||||
datasets: [
|
datasets: [
|
||||||
{
|
{
|
||||||
label: "frequencies before deletion", // FK-TODO: daterange einfügen
|
label: `frequencies before deletion ${this.#dateRange2str(barChartDescription['dateRange before deletion'])}`,
|
||||||
data: barChartDescription["frequencies before deletion"]
|
data: barChartDescription["frequencies before deletion"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -10,13 +10,17 @@ def getCountryCountsByBatchcodeTable():
|
|||||||
|
|
||||||
|
|
||||||
def _getCountryCountsByBatchcodeBeforeDeletion():
|
def _getCountryCountsByBatchcodeBeforeDeletion():
|
||||||
internationalVaersCovid19 = getInternationalVaersCovid19(dataDir = 'VAERS/VAERSBeforeDeletion', years = [2020, 2021, 2022])
|
internationalVaersCovid19 = _getInternationalVaersCovid19BeforeDeletion()
|
||||||
return (internationalVaersCovid19
|
return (internationalVaersCovid19
|
||||||
.groupby('VAX_LOT')
|
.groupby('VAX_LOT')
|
||||||
['COUNTRY'].value_counts()
|
['COUNTRY'].value_counts()
|
||||||
.to_frame(name = 'COUNTRY_COUNT_BY_VAX_LOT'))
|
.to_frame(name = 'COUNTRY_COUNT_BY_VAX_LOT'))
|
||||||
|
|
||||||
|
|
||||||
|
def _getInternationalVaersCovid19BeforeDeletion():
|
||||||
|
return getInternationalVaersCovid19(dataDir = 'VAERS/VAERSBeforeDeletion', years = [2020, 2021, 2022])
|
||||||
|
|
||||||
|
|
||||||
def _combineCountryCountsByBatchcodeTables(countryCountsByClickedBatchcode, countryCountsByBatchcodeBeforeDeletion):
|
def _combineCountryCountsByBatchcodeTables(countryCountsByClickedBatchcode, countryCountsByBatchcodeBeforeDeletion):
|
||||||
countryCountsByBatchcode = pd.merge(
|
countryCountsByBatchcode = pd.merge(
|
||||||
countryCountsByClickedBatchcode,
|
countryCountsByClickedBatchcode,
|
||||||
@@ -31,5 +35,10 @@ def _combineCountryCountsByBatchcodeTables(countryCountsByClickedBatchcode, coun
|
|||||||
return countryCountsByBatchcode
|
return countryCountsByBatchcode
|
||||||
|
|
||||||
|
|
||||||
|
def getDateRangeOfVAERSReportsBeforeDeletionOfCountryCodes():
|
||||||
|
dates = _getInternationalVaersCovid19BeforeDeletion()['RECVDATE']
|
||||||
|
return dates.min(), dates.max()
|
||||||
|
|
||||||
|
|
||||||
def filterByBatchcodes(countryCountsByBatchcode, batchcodes2Retain):
|
def filterByBatchcodes(countryCountsByBatchcode, batchcodes2Retain):
|
||||||
return countryCountsByBatchcode.loc[(batchcodes2Retain, slice(None)), :]
|
return countryCountsByBatchcode.loc[(batchcodes2Retain, slice(None)), :]
|
||||||
@@ -221,10 +221,12 @@
|
|||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"from GoogleAnalyticsReader import GoogleAnalyticsReader\n",
|
"from GoogleAnalyticsReader import GoogleAnalyticsReader\n",
|
||||||
|
"from CountriesByBatchcodeProvider import getDateRangeOfVAERSReportsBeforeDeletionOfCountryCodes\n",
|
||||||
"\n",
|
"\n",
|
||||||
"dateRange = GoogleAnalyticsReader(dataDir = 'data/GoogleAnalytics').getDateRange()\n",
|
"dateRange = GoogleAnalyticsReader(dataDir = 'data/GoogleAnalytics').getDateRange()\n",
|
||||||
"barChartDescriptions = {\n",
|
"barChartDescriptions = {\n",
|
||||||
" 'dateRange guessed': dateRange2Str(dateRange),\n",
|
" 'dateRange guessed': dateRange2Str(dateRange),\n",
|
||||||
|
" 'dateRange before deletion': dateRange2Str(getDateRangeOfVAERSReportsBeforeDeletionOfCountryCodes()),\n",
|
||||||
" 'barChartDescriptions': barChartDescriptionTable['BAR_CHART_DESCRIPTION'].to_dict()\n",
|
" 'barChartDescriptions': barChartDescriptionTable['BAR_CHART_DESCRIPTION'].to_dict()\n",
|
||||||
"}\n"
|
"}\n"
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user