Skip to content

Commit

Permalink
fix typo and add missing abbreviation to constants
Browse files Browse the repository at this point in the history
  • Loading branch information
cchuong committed Sep 17, 2024
1 parent 6ee8bb7 commit 8814554
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/acquisition/rvdss/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,16 @@
"canada":"ca",
"can":"ca" ,
"at":"atlantic",
"atl":"atlantic",
"pr" :"prairies" ,
"terr" :"territories"
}

REGIONS = ['atlantic','atl','province of québec','québec','qc','province of ontario','ontario','on',
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']

BASHBOARD_BASE_URLS_2023=["https://health-infobase.canada.ca/src/data/respiratory-virus-detections/archive/2024-06-20/",
DASHBOARD_BASE_URLS_2023=["https://health-infobase.canada.ca/src/data/respiratory-virus-detections/archive/2024-06-20/",
"https://health-infobase.canada.ca/src/data/respiratory-virus-detections/archive/2024-06-27/",
"https://health-infobase.canada.ca/src/data/respiratory-virus-detections/archive/2024-07-04/",
"https://health-infobase.canada.ca/src/data/respiratory-virus-detections/archive/2024-07-11/",
Expand Down
4 changes: 2 additions & 2 deletions src/acquisition/rvdss/rvdss_historic.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from datetime import datetime,timedelta
import math

from constants import BASHBOARD_BASE_URLS_2023, HISTORIC_SEASON_URL, ALTENRATIVE_SEASON_BASE_URL, SEASON_BASE_URL, LAST_WEEK_OF_YEAR
from constants import DASHBOARD_BASE_URLS_2023, HISTORIC_SEASON_URL, ALTENRATIVE_SEASON_BASE_URL, SEASON_BASE_URL, LAST_WEEK_OF_YEAR
from utils import abbreviate_virus,abbreviate_geo,create_geo_types,check_date_format,get_revised_data,get_weekly_data
#%% Functions

Expand Down Expand Up @@ -420,7 +420,7 @@ def get_season_reports(url):
old_detection_data = pd.read_csv('season_2023_2024/respiratory_detections.csv').set_index(['epiweek', 'time_value', 'issue', 'geo_type', 'geo_value'])
old_positive_data = pd.read_csv('season_2023_2024/positive_tests.csv').set_index(['epiweek', 'time_value', 'issue', 'geo_type', 'geo_value'])

for base_url in BASHBOARD_BASE_URLS_2023:
for base_url in DASHBOARD_BASE_URLS_2023:
# Get weekly dashboard data
weekly_data = get_weekly_data(base_url,2023).set_index(['epiweek', 'time_value', 'issue', 'geo_type', 'geo_value'])
positive_data = get_revised_data(base_url)
Expand Down

0 comments on commit 8814554

Please sign in to comment.