Skip to content

Commit bf73c71

Browse files
authored
Merge branch 'deploy-jhu' into main
2 parents d6eedf5 + 5350d2c commit bf73c71

File tree

2 files changed

+15
-2
lines changed
  • google_health/delphi_google_health
  • jhu/delphi_jhu

2 files changed

+15
-2
lines changed

google_health/delphi_google_health/run.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ def run_module():
3434
cache_dir = params["cache_dir"]
3535
wip_signal = params["wip_signal"]
3636

37+
# if missing start_date, set to today (GMT) minus 5 days
38+
if start_date == "":
39+
now = datetime.datetime.now(datetime.timezone.utc)
40+
start_date = (now - datetime.timedelta(days=4)).strftime("%Y-%m-%d")
41+
3742
# if missing start_date, set to today (GMT) minus 5 days
3843
if start_date == "":
3944
now = datetime.datetime.now(datetime.timezone.utc)

jhu/delphi_jhu/run.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@
4747
"incidence": ("incidence_prop", False),
4848
"cumulative_prop": ("cumulative_prop", False),
4949
}
50+
# Temporarily added for wip_ signals
51+
# WIP_SENSOR_NAME_MAP = {
52+
# "new_counts": ("incid_num", False),
53+
# "cumulative_counts": ("cumul_num", False),
54+
# "incidence": ("incid_prop", False),
55+
# "cumulative_prop": ("cumul_prop", False),
56+
# }
5057
SMOOTHERS_MAP = {
5158
"unsmoothed": (identity, ''),
5259
"seven_day_average": (seven_day_moving_average, '7dav_'),
@@ -92,8 +99,9 @@ def run_module():
9299
# Drop early entries where data insufficient for smoothing
93100
df = df.loc[~df["val"].isnull(), :]
94101
sensor_name = SENSOR_NAME_MAP[sensor][0]
95-
if SENSOR_NAME_MAP[sensor][1]:
96-
metric = f"wip_{metric}"
102+
# if (SENSOR_NAME_MAP[sensor][1] or SMOOTHERS_MAP[smoother][2]):
103+
# metric = f"wip_{metric}"
104+
# sensor_name = WIP_SENSOR_NAME_MAP[sensor][0]
97105
sensor_name = SMOOTHERS_MAP[smoother][1] + sensor_name
98106
create_export_csv(
99107
df,

0 commit comments

Comments
 (0)