updating GA data: 20230129-20230329
This commit is contained in:
@@ -3,6 +3,7 @@ from CompletedBatchcodeColumnAdder import CompletedBatchcodeColumnAdder
|
||||
from BatchcodeCompletion import BatchcodeCompletion
|
||||
from CountriesColumnAdder import CountriesColumnAdder
|
||||
from BatchCodeTableFactory import BatchCodeTableFactory
|
||||
from InternationalVaersCovid19Provider import getInternationalVaersCovid19
|
||||
|
||||
def getCountriesByCompletedBatchcode(internationalVaersCovid19):
|
||||
result = _readExploration('data/Country By Batchcode Search Term.csv', indexName = 'Batchcode Search Term')
|
||||
@@ -31,4 +32,10 @@ def _readExploration(csvFile, indexName):
|
||||
exploration.drop(columns='Totals', inplace=True)
|
||||
for column in exploration.columns:
|
||||
exploration[column] = exploration[column].astype('int64')
|
||||
return exploration
|
||||
return exploration
|
||||
|
||||
def getCountriesByBatchcodeBeforeDeletion():
|
||||
internationalVaersCovid19 = getInternationalVaersCovid19(dataDir = 'VAERSBeforeDeletion', years = [2020, 2021, 2022])
|
||||
batchCodeTable = BatchCodeTableFactory(internationalVaersCovid19).createGlobalBatchCodeTable()
|
||||
countriesByBatchcodeBeforeDeletion = batchCodeTable[['Countries']]
|
||||
return countriesByBatchcodeBeforeDeletion
|
||||
|
||||
@@ -5,11 +5,11 @@ from VaersDescrReader import VaersDescrReader
|
||||
from CountryColumnAdder import CountryColumnAdder
|
||||
|
||||
|
||||
def getInternationalVaersCovid19(years):
|
||||
def getInternationalVaersCovid19(dataDir, years):
|
||||
internationalVaers = pd.concat(
|
||||
[
|
||||
VaersReader.getVaersForYears(years),
|
||||
VaersReader.getNonDomesticVaers()
|
||||
VaersReader.getVaersForYears(dataDir, years),
|
||||
VaersReader.getNonDomesticVaers(dataDir)
|
||||
])
|
||||
internationalVaersCovid19 = DataFrameFilter().filterByCovid19(internationalVaers)
|
||||
return internationalVaersCovid19
|
||||
|
||||
@@ -3,23 +3,20 @@ from VaersDescrReader import VaersDescrReader
|
||||
from VaersDescr2DataFrameConverter import VaersDescr2DataFrameConverter
|
||||
from SevereColumnAdder import SevereColumnAdder
|
||||
|
||||
def getVaersForYears(years):
|
||||
def getVaersForYears(dataDir, years):
|
||||
def addCountryColumn(dataFrame):
|
||||
dataFrame['COUNTRY'] = 'United States'
|
||||
return dataFrame
|
||||
|
||||
return _getVaers(
|
||||
_getVaersDescrReader().readVaersDescrsForYears(years),
|
||||
VaersDescrReader(dataDir).readVaersDescrsForYears(years),
|
||||
addCountryColumn)
|
||||
|
||||
def getNonDomesticVaers():
|
||||
def getNonDomesticVaers(dataDir):
|
||||
return _getVaers(
|
||||
[_getVaersDescrReader().readNonDomesticVaersDescr()],
|
||||
[VaersDescrReader(dataDir).readNonDomesticVaersDescr()],
|
||||
addCountryColumn = lambda dataFrame: CountryColumnAdder(dataFrame).addCountryColumn(dataFrame))
|
||||
|
||||
def _getVaersDescrReader():
|
||||
return VaersDescrReader(dataDir = "VAERS")
|
||||
|
||||
def _getVaers(vaersDescrs, addCountryColumn):
|
||||
dataFrame = VaersDescr2DataFrameConverter.createDataFrameFromDescrs(vaersDescrs)
|
||||
dataFrame = addCountryColumn(dataFrame)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
53
src/data/Selected Country.csv
Normal file
53
src/data/Selected Country.csv
Normal file
@@ -0,0 +1,53 @@
|
||||
# ----------------------------------------
|
||||
# HowBadIsMyBatch
|
||||
# Batchcode By Country-Selected Country
|
||||
# 20230129-20230329
|
||||
# ----------------------------------------
|
||||
|
||||
Country,United States,Germany,United Kingdom,Canada,Italy,Totals
|
||||
Item ID,Active users,Active users,Active users,Active users,Active users,Active users
|
||||
,156,138,46,40,27,581,Grand total
|
||||
Global,156,136,46,40,27,578
|
||||
Germany,0,37,0,0,0,40
|
||||
United States,33,1,0,1,0,35
|
||||
New Zealand,0,0,0,0,0,5
|
||||
Australia,0,0,0,0,0,4
|
||||
Canada,0,0,0,4,0,4
|
||||
Japan,0,0,0,0,0,4
|
||||
Switzerland,0,0,0,0,0,4
|
||||
Albania,0,3,0,0,0,3
|
||||
Unknown Country,0,0,3,0,0,3
|
||||
French Polynesia,0,0,0,0,0,2
|
||||
Guatemala,0,1,0,0,0,2
|
||||
Israel,0,0,0,0,0,2
|
||||
Peru,0,0,0,0,0,2
|
||||
Afghanistan,0,1,0,0,0,1
|
||||
Azerbaijan,0,1,0,0,0,1
|
||||
Bahrain,0,1,0,0,0,1
|
||||
Bangladesh,0,1,0,0,0,1
|
||||
Bermuda,0,1,0,0,0,1
|
||||
Brazil,0,1,0,0,0,1
|
||||
Brunei Darussalam,0,1,0,0,0,1
|
||||
Cayman Islands,0,0,0,1,0,1
|
||||
China,0,0,0,0,0,1
|
||||
Colombia,0,1,0,0,0,1
|
||||
Costa Rica,0,0,0,0,0,1
|
||||
Côte d'Ivoire,0,0,0,0,0,1
|
||||
Dominican Republic,0,0,0,0,0,1
|
||||
El Salvador,0,0,0,0,0,1
|
||||
Ghana,0,0,0,0,0,1
|
||||
Indonesia,0,0,0,0,0,1
|
||||
"Iran, Islamic Republic of",0,1,0,0,0,1
|
||||
Iraq,0,0,0,1,0,1
|
||||
Kuwait,0,0,0,0,0,1
|
||||
Macao,0,0,0,0,0,1
|
||||
Mauritius,0,0,0,0,0,1
|
||||
"Moldova, Republic of",1,0,0,0,0,1
|
||||
Nigeria,0,0,0,0,0,1
|
||||
Norway,0,0,0,0,0,1
|
||||
Paraguay,0,0,0,0,0,1
|
||||
South Africa,0,0,0,0,0,1
|
||||
Uruguay,1,0,0,0,0,1
|
||||
"Venezuela, Bolivarian Republic of",1,0,0,0,0,1
|
||||
Viet Nam,0,0,0,0,0,1
|
||||
|
||||
|
Reference in New Issue
Block a user