Skip to content

Commit

Permalink
comment constants
Browse files Browse the repository at this point in the history
  • Loading branch information
nmdefries committed Sep 23, 2024
1 parent 7720a24 commit 59f79bf
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/acquisition/rvdss/constants.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# The dataset calls the same viruses, provinces, regions (province groups),
# and country by multiple names. Map each of those to a common abbreviation.
VIRUSES = {
"parainfluenza": "hpiv",
"piv": "hpiv",
Expand All @@ -16,7 +18,7 @@
"coro":"hcov",
"respiratory syncytial virus":"rsv",
"influenza":"flu",
"sars-cov-2":"sarscov2"
"sars-cov-2":"sarscov2",
}

GEOS = {
Expand All @@ -40,13 +42,15 @@
"at":"atlantic",
"atl":"atlantic",
"pr" :"prairies" ,
"terr" :"territories"
"terr" :"territories",
}

# Regions are groups of provinces that are geographically close together. Some single provinces are reported as their own region (e.g. Québec, Ontario).
REGIONS = ['atlantic','atl','at','province of québec','québec','qc','province of ontario','ontario','on',
'prairies', 'pr', "british columbia",'bc',"territories",'terr']
NATION = ["canada","can",'ca']
'prairies', 'pr', "british columbia",'bc',"territories",'terr',]
NATION = ["canada","can",'ca',]

# Construct dashboard and data report URLS.
DASHBOARD_BASE_URL_2023 = "https://health-infobase.canada.ca/src/data/respiratory-virus-detections/archive/{date}/"
DASHBOARD_BASE_URLS_2023 = (
DASHBOARD_BASE_URL_2023.format(date = date) for date in
Expand All @@ -69,6 +73,8 @@
ALTERNATIVE_SEASON_BASE_URL = "www.phac-aspc.gc.ca/bid-bmi/dsd-dsm/rvdi-divr/"
HISTORIC_SEASON_REPORTS_URL + "/en/public-health/services/surveillance/respiratory-virus-detections-canada/{year_range}.html"

# Each URL created here points to a list of all data reports made during that season, e.g.
# https://www.canada.ca/en/public-health/services/surveillance/respiratory-virus-detections-canada/2014-2015.html.
HISTORIC_SEASON_URL = (HISTORIC_SEASON_REPORTS_URL.format(year_range = year_range) for year_range in
(
"2013-2014",
Expand Down

0 comments on commit 59f79bf

Please sign in to comment.