-
Notifications
You must be signed in to change notification settings - Fork 16
Add hsanci to nssp #2162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add hsanci to nssp #2162
Changes from 1 commit
a1c2f61
80bb904
c5d5dcc
d51b420
615572d
d4b2642
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,7 @@ | |
| "state", | ||
| "county", | ||
| "hhs", | ||
| "hsanci", | ||
| ] | ||
|
|
||
| SIGNALS_MAP = { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -137,6 +137,11 @@ def run_module(params, logger=None): | |
| df = geo_mapper.add_geocode(df, "state_code", "hhs", from_col="state_code", new_col="geo_id") | ||
| df = geo_mapper.aggregate_by_weighted_sum(df, "geo_id", "val", "timestamp", "population") | ||
| df = df.rename(columns={"weighted_val": "val"}) | ||
| elif geo == "hsanci": | ||
| df = df[["hsa_nci_id", "val", "timestamp"]] | ||
| df = df[df["hsa_nci_id"] != "All"] | ||
| df = df.groupby(["hsa_nci_id", "timestamp"])['val'].min().reset_index() | ||
|
||
| df = df.rename(columns={"hsa_nci_id": "geo_id"}) | ||
| else: | ||
| df = df[df["county"] != "All"] | ||
| df["geo_id"] = df["fips"] | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.