Skip to content

Commit 0852419

Browse files
committed
Remove N/A Values for MA at state level
1 parent 83ba3f9 commit 0852419

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

hhs_hosp/delphi_hhs/run.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ def run_module(params):
117117
df=pop_proportion(df, geo_mapper)
118118
df = make_geo(df, geo, geo_mapper)
119119
df = smooth_values(df, smoother[0])
120+
# Fix N/A MA values, see issue #1360
121+
if geo == "state" and sensor.startswith(CONFIRMED_FLU):
122+
print(df.shape, geo, smoother, sensor)
123+
df = df[~np.logical_and(np.logical_and(df.val.isna(), df.geo_id == "ma"),
124+
df.timestamp > "08-01-2021")]
125+
print(df.shape)
120126
if df.empty:
121127
continue
122128
sensor_name = sensor + smoother[1]

0 commit comments

Comments
 (0)