Skip to content

Commit 68369d6

Browse files
authored
Explanatory comment from code review
1 parent 7decd07 commit 68369d6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

hhs_hosp/delphi_hhs/run.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ def smooth_values(df, smoother):
147147
def transform_signal(sensor, smoother, geo, df, geo_mapper):
148148
"""Transform base df into specified geo/smoothing/prop configuration."""
149149
df = geo_mapper.add_geocode(df, "state_id", "state_code", from_col="state")
150+
# handling population:
151+
# add population column
152+
# sum admission counts *and* population counts during make_geo
153+
# *then* divide counts by population to get the proportion
150154
if sensor.endswith("_prop"):
151155
df=geo_mapper.add_population_column(df, "state_code")
152156
df = make_geo(df, geo, geo_mapper)

0 commit comments

Comments
 (0)