adding function getCountriesByClickedBatchcode()
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import pandas as pd
|
||||
from BatchCodeTableFactory import BatchCodeTableFactory
|
||||
from InternationalVaersCovid19Provider import getInternationalVaersCovid19
|
||||
from SummationTableFactory import SummationTableFactory
|
||||
|
||||
|
||||
def getCountryCountsByBatchcodeTable():
|
||||
@@ -45,6 +46,17 @@ def _combineCountryCountsByBatchcodeTables(countryCountsByClickedBatchcode, coun
|
||||
return countryCountsByBatchcode
|
||||
|
||||
|
||||
def getCountriesByClickedBatchcode():
|
||||
return (_getCountryCountsByClickedBatchcode()
|
||||
.reset_index(level = 'COUNTRY')
|
||||
.groupby('VAX_LOT')
|
||||
.agg(
|
||||
Countries =
|
||||
pd.NamedAgg(
|
||||
column = 'COUNTRY',
|
||||
aggfunc = SummationTableFactory.sortCountries)))
|
||||
|
||||
|
||||
def getCountriesByBatchcodeBeforeDeletion():
|
||||
internationalVaersCovid19 = getInternationalVaersCovid19(dataDir = 'VAERS/VAERSBeforeDeletion', years = [2020, 2021, 2022])
|
||||
batchCodeTable = BatchCodeTableFactory(internationalVaersCovid19).createGlobalBatchCodeTable(countriesAsList = True)
|
||||
|
||||
Reference in New Issue
Block a user