Skip to content

Commit b4fc197

Browse files
authored
hhs whitespace
1 parent dfc255a commit b4fc197

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

hhs_hosp/delphi_hhs/run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def run_module(params):
103103
"state_code",
104104
from_col="state")
105105
if sensor.endswith("_prop"):
106-
df=pop_proportion(df,geo_mapper)
106+
df=pop_proportion(df, geo_mapper)
107107
df = make_geo(df, geo, geo_mapper)
108108
df = smooth_values(df, smoother[0])
109109
if df.empty:
@@ -142,7 +142,7 @@ def smooth_values(df, smoother):
142142
def pop_proportion(df,geo_mapper):
143143
"""Get the population-proportionate variants as the dataframe val."""
144144
pop_val=geo_mapper.add_population_column(df, "state_code")
145-
df["val"]=round(df["val"]/pop_val["population"]*100000,7)
145+
df["val"]=round(df["val"]/pop_val["population"]*100000, 7)
146146
pop_val.drop("population", axis=1, inplace=True)
147147
return df
148148

hhs_hosp/tests/test_run.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from delphi_hhs.run import _date_to_int, int_date_to_previous_day_datetime, generate_date_ranges, \
88
make_signal, make_geo, run_module, pop_proportion
9-
from delphi_hhs.constants import CONFIRMED, SUM_CONF_SUSP, SMOOTHERS, GEOS, SIGNALS,CONFIRMED_PROP, SUM_CONF_SUSP_PROP
9+
from delphi_hhs.constants import CONFIRMED, SUM_CONF_SUSP, SMOOTHERS, GEOS, SIGNALS, CONFIRMED_PROP, SUM_CONF_SUSP_PROP
1010
from delphi_utils.geomap import GeoMapper
1111
from freezegun import freeze_time
1212
import numpy as np
@@ -83,29 +83,29 @@ def test_pop_proportion():
8383
geo_mapper = GeoMapper()
8484
test_df = pd.DataFrame({
8585
'state': ['PA'],
86-
'state_code':[42],
86+
'state_code': [42],
8787
'timestamp': [datetime(year=2020, month=1, day=1)],
8888
'val': [15.],})
8989
pd.testing.assert_frame_equal(
90-
pop_proportion(test_df,geo_mapper),
90+
pop_proportion(test_df, geo_mapper),
9191
pd.DataFrame({
9292
'state': ['PA'],
93-
'state_code':[42],
93+
'state_code': [42],
9494
'timestamp': [datetime(year=2020, month=1, day=1)],
9595
'val': [0.1171693],})
9696
)
9797

9898
test_df= pd.DataFrame({
9999
'state': ['WV'],
100-
'state_code':[54],
100+
'state_code': [54],
101101
'timestamp': [datetime(year=2020, month=1, day=1)],
102102
'val': [150.],})
103103

104104
pd.testing.assert_frame_equal(
105-
pop_proportion(test_df,geo_mapper),
105+
pop_proportion(test_df, geo_mapper),
106106
pd.DataFrame({
107107
'state': ['WV'],
108-
'state_code':[54],
108+
'state_code': [54],
109109
'timestamp': [datetime(year=2020, month=1, day=1)],
110110
'val': [8.3698491],})
111111
)

0 commit comments

Comments
 (0)