refactoring

This commit is contained in:
frankknoll
2023-06-14 02:15:59 +02:00
parent 05b75756c9
commit 0f20236a15
9101 changed files with 9124 additions and 9112 deletions

View File

@@ -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()