usds / justice40-tool

A tool to identify disadvantaged communities due to environmental, socioeconomic and health burdens
https://screeningtool.geoplatform.gov/
Creative Commons Zero v1.0 Universal
133 stars 42 forks source link

FEMA_COMMUNITIES constant not previously defined and results in exception when running comparison tool #914

Closed ahlusar1989 closed 2 years ago

ahlusar1989 commented 2 years ago

Describe the bug

FEMA_COMMUNITIES variable is not previously defined.

To Reproduce Steps to reproduce the behavior:

In the following comparison tool notebook notebook

There is a variable, FEMA_COMMUNITIES, that does not appear to be used in any of the Index named tuples. One can find this variable by searching (CMD + F) and enter into the search field FEMA_COMMUNITIES.

One will notice it is defined as a keyword argument but not previously set.

Expected behavior

Workflow should output comparison tool without any exceptions

Desktop (please complete the following information):

lucasmbrown-usds commented 2 years ago

Good catch @ahlusar1989 -- that was introduced by this PR, and we just need to delete that index.

Deleting the lines:

        Index(
            method_name=FEMA_COMMUNITIES,
            priority_communities_field=FEMA_COMMUNITIES,
            other_census_tract_fields_to_keep=[],
        ),

Should do the trick. Want to open a PR? Thank you!!

ahlusar1989 commented 2 years ago

@lucasmbrown-usds sure thing - thanks for confirming and for clarifying.