refactoring
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import pandas as pd
|
||||
from InternationalVaersCovid19Provider import getInternationalVaersCovid19
|
||||
from InternationalVaersCovid19Provider import getInternationalVaersCovid19BeforeDeletion
|
||||
from CountryCountsByBatchcodeTablesMerger import CountryCountsByBatchcodeTablesMerger
|
||||
|
||||
|
||||
@@ -10,17 +10,12 @@ def getCountryCountsByBatchcodeTable():
|
||||
|
||||
|
||||
def _getCountryCountsByBatchcodeBeforeDeletion():
|
||||
internationalVaersCovid19 = _getInternationalVaersCovid19BeforeDeletion()
|
||||
return (internationalVaersCovid19
|
||||
return (getInternationalVaersCovid19BeforeDeletion()
|
||||
.groupby('VAX_LOT')
|
||||
['COUNTRY'].value_counts()
|
||||
.to_frame(name = 'COUNTRY_COUNT_BY_VAX_LOT'))
|
||||
|
||||
|
||||
def _getInternationalVaersCovid19BeforeDeletion():
|
||||
return getInternationalVaersCovid19(dataDir = 'VAERS/VAERSBeforeDeletion', years = [2020, 2021, 2022])
|
||||
|
||||
|
||||
def _combineCountryCountsByBatchcodeTables(countryCountsByClickedBatchcode, countryCountsByBatchcodeBeforeDeletion):
|
||||
countryCountsByBatchcode = pd.merge(
|
||||
countryCountsByClickedBatchcode,
|
||||
@@ -35,8 +30,8 @@ def _combineCountryCountsByBatchcodeTables(countryCountsByClickedBatchcode, coun
|
||||
return countryCountsByBatchcode
|
||||
|
||||
|
||||
def getDateRangeOfVAERSReportsBeforeDeletionOfCountryCodes():
|
||||
dates = _getInternationalVaersCovid19BeforeDeletion()['RECVDATE']
|
||||
def getDateRangeOfVAERSReports(internationalVaersCovid19):
|
||||
dates = internationalVaersCovid19['RECVDATE']
|
||||
return dates.min(), dates.max()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user