Skip to content

Commit 05d2f8c

Browse files
committed
update naming and constants
1 parent e505076 commit 05d2f8c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/acquisition/rvdss/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
# Regions are groups of provinces that are geographically close together. Some single provinces are reported as their own region (e.g. Québec, Ontario).
5252
REGIONS = ['atlantic','atl','at','province of québec','québec','qc','province of ontario','ontario','on',
5353
'prairies', 'pr', "british columbia",'bc',"territories",'terr',]
54-
NATION = ["canada","can",'ca',]
54+
NATION = ["canada","can",'ca']
5555

5656
# Construct dashboard and data report URLS.
5757
DASHBOARD_BASE_URL = "https://health-infobase.canada.ca/src/data/respiratory-virus-detections/"

src/acquisition/rvdss/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,15 @@ def preprocess_table_columns(table):
100100
table.columns = [re.sub("canada","can",t) for t in table.columns]
101101
table.columns = [re.sub(r"\bcb\b","bc",t) for t in table.columns]
102102

103-
table.columns =[re.sub(r"h1n1 2009 |h1n12009|a_h1|ah1\b", "ah1n1pdm09", s)for s in table.columns]
103+
table.columns =[re.sub(r"h1n1 2009 |h1n12009|a_h1|ah1\b|ah1pdm09", "ah1n1pdm09", s)for s in table.columns]
104104
table.columns =[re.sub(r"a_uns", "auns", s)for s in table.columns]
105105
table.columns =[re.sub(r"a_h3", "ah3", s)for s in table.columns]
106106

107107
table.columns =[abbreviate_virus(col) for col in table.columns] # abbreviate viruses
108108
table.columns = [re.sub(r"flu a","flua",t) for t in table.columns]
109109
table.columns = [re.sub(r"flu b","flub",t) for t in table.columns]
110110
table.columns = [re.sub(r"flutest\b","flu test", col) for col in table.columns]
111-
table.columns = [re.sub(r"other hpiv|other_hpiv","hpivother",t) for t in table.columns]
111+
table.columns = [re.sub(r"other hpiv|other_hpiv|hpiv other|hpiv_other","hpivother",t) for t in table.columns]
112112

113113
table.columns=[re.sub(r'bpositive','b_positive',c) for c in table.columns]
114114
table.columns=[re.sub(r'apositive','a_positive',c) for c in table.columns]

0 commit comments

Comments
 (0)