updating GA data: 20230129-20230329

This commit is contained in:
frankknoll
2023-03-30 07:55:06 +02:00
parent c2575da22b
commit 755b164d56
6 changed files with 1151 additions and 756 deletions

View File

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

View File

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

View File

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

View 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
1 # ----------------------------------------
2 # HowBadIsMyBatch
3 # Batchcode By Country-Selected Country
4 # 20230129-20230329
5 # ----------------------------------------
6 Country United States Germany United Kingdom Canada Italy Totals
7 Item ID Active users Active users Active users Active users Active users Active users
8 156 138 46 40 27 581 Grand total
9 Global 156 136 46 40 27 578
10 Germany 0 37 0 0 0 40
11 United States 33 1 0 1 0 35
12 New Zealand 0 0 0 0 0 5
13 Australia 0 0 0 0 0 4
14 Canada 0 0 0 4 0 4
15 Japan 0 0 0 0 0 4
16 Switzerland 0 0 0 0 0 4
17 Albania 0 3 0 0 0 3
18 Unknown Country 0 0 3 0 0 3
19 French Polynesia 0 0 0 0 0 2
20 Guatemala 0 1 0 0 0 2
21 Israel 0 0 0 0 0 2
22 Peru 0 0 0 0 0 2
23 Afghanistan 0 1 0 0 0 1
24 Azerbaijan 0 1 0 0 0 1
25 Bahrain 0 1 0 0 0 1
26 Bangladesh 0 1 0 0 0 1
27 Bermuda 0 1 0 0 0 1
28 Brazil 0 1 0 0 0 1
29 Brunei Darussalam 0 1 0 0 0 1
30 Cayman Islands 0 0 0 1 0 1
31 China 0 0 0 0 0 1
32 Colombia 0 1 0 0 0 1
33 Costa Rica 0 0 0 0 0 1
34 Côte d'Ivoire 0 0 0 0 0 1
35 Dominican Republic 0 0 0 0 0 1
36 El Salvador 0 0 0 0 0 1
37 Ghana 0 0 0 0 0 1
38 Indonesia 0 0 0 0 0 1
39 Iran, Islamic Republic of 0 1 0 0 0 1
40 Iraq 0 0 0 1 0 1
41 Kuwait 0 0 0 0 0 1
42 Macao 0 0 0 0 0 1
43 Mauritius 0 0 0 0 0 1
44 Moldova, Republic of 1 0 0 0 0 1
45 Nigeria 0 0 0 0 0 1
46 Norway 0 0 0 0 0 1
47 Paraguay 0 0 0 0 0 1
48 South Africa 0 0 0 0 0 1
49 Uruguay 1 0 0 0 0 1
50 Venezuela, Bolivarian Republic of 1 0 0 0 0 1
51 Viet Nam 0 0 0 0 0 1