Skip to content

Add HHS to geomapper util #610

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

Merged
merged 5 commits into from
Dec 9, 2020
Merged

Add HHS to geomapper util #610

merged 5 commits into from
Dec 9, 2020

Conversation

chinandrew
Copy link
Contributor

@chinandrew chinandrew commented Dec 8, 2020

Description

Currently based on the #609 branch for simpler reviewing Rebase to main and merge after #609 is merged

Adds the code to do HHS mapping to the geomapper util, assuming the mapping files are already made.

Changelog

Itemize code/test/documentation changes and files added/removed.

  • Add filenames and keys to load crosswalks
  • Add tests
  • Rename hhs_region_number -> hhs

Fixes

@chinandrew chinandrew requested review from a team, benjaminysmith, sgsmob, krivard, melange396 and eujing and removed request for a team, benjaminysmith, sgsmob, krivard and melange396 December 8, 2020 22:04
Copy link
Contributor

@sgsmob sgsmob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, approving regardless of how you do or don't address my one comment.

@@ -102,8 +106,10 @@ def __init__(self):
"""
self.crosswalk_filepaths = CROSSWALK_FILEPATHS
self.crosswalks = {
"zip": {"fips": None, "hrr": None, "msa": None, "pop": None, "state": None},
"fips": {"zip": None, "hrr": None, "msa": None, "pop": None, "state": None},
"zip": {"fips": None, "hrr": None, "msa": None,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these always going to have None as the value? Might be more scalable/futureproof to write as a dictionary comprehension:

"zip": {x:None for x in ["fips",...]}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, unless we end up preloading crosswalks sometime? I'll add your suggestion.

Copy link
Contributor

@eujing eujing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Base automatically changed from add-hhs to main December 9, 2020 18:49
@krivard krivard merged commit 188c3ce into main Dec 9, 2020
@krivard krivard deleted the add-hhs-to-utils branch December 9, 2020 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants