Add tribal overlap to downloads (#1907)

* Add tribal data to downloads (#1904)

* Update test pickle with current cols (#1904)

* Remove text of tribe names from GeoJSON (#1904)

* Update test data (#1904)

* Add tribal overlap to smoketests (#1904)
This commit is contained in:
Matt Bowen 2022-09-23 15:05:45 -04:00 committed by GitHub
parent 6e0ef33d81
commit 9e85375d9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 41 additions and 3 deletions

View file

@ -380,3 +380,12 @@ fields:
- score_name: Income data has been estimated based on neighbor income - score_name: Income data has been estimated based on neighbor income
label: Income data has been estimated based on geographic neighbor income label: Income data has been estimated based on geographic neighbor income
format: bool format: bool
- score_name: Number of Tribal areas within Census tract
label: Number of Tribal areas within Census tract
format: int64
- score_name: Names of Tribal areas within Census tract
label: Names of Tribal areas within Census tract
format: string
- score_name: Percent of the Census tract that is within Tribal areas
label: Percent of the Census tract that is within Tribal areas
format: percentage

View file

@ -384,3 +384,12 @@ sheets:
- score_name: Income data has been estimated based on neighbor income - score_name: Income data has been estimated based on neighbor income
label: Income data has been estimated based on geographic neighbor income label: Income data has been estimated based on geographic neighbor income
format: bool format: bool
- score_name: Number of Tribal areas within Census tract
label: Number of Tribal areas within Census tract
format: int64
- score_name: Names of Tribal areas within Census tract
label: Names of Tribal areas within Census tract
format: string
- score_name: Percent of the Census tract that is within Tribal areas
label: Percent of the Census tract that is within Tribal areas
format: percentage

View file

@ -379,6 +379,10 @@ TILES_SCORE_COLUMNS = {
field_names.PERCENT_AGE_UNDER_10: "AGE_10", field_names.PERCENT_AGE_UNDER_10: "AGE_10",
field_names.PERCENT_AGE_10_TO_64: "AGE_MIDDLE", field_names.PERCENT_AGE_10_TO_64: "AGE_MIDDLE",
field_names.PERCENT_AGE_OVER_64: "AGE_OLD", field_names.PERCENT_AGE_OVER_64: "AGE_OLD",
field_names.COUNT_OF_TRIBAL_AREAS_IN_TRACT: "TA_COUNT",
field_names.PERCENT_OF_TRIBAL_AREA_IN_TRACT: "TA_PERC",
} }
# columns to round floats to 2 decimals # columns to round floats to 2 decimals
@ -452,4 +456,5 @@ TILES_SCORE_FLOAT_COLUMNS = [
field_names.ELIGIBLE_FUDS_BINARY_FIELD_NAME, field_names.ELIGIBLE_FUDS_BINARY_FIELD_NAME,
field_names.AML_BOOLEAN, field_names.AML_BOOLEAN,
field_names.HISTORIC_REDLINING_SCORE_EXCEEDED, field_names.HISTORIC_REDLINING_SCORE_EXCEEDED,
field_names.PERCENT_OF_TRIBAL_AREA_IN_TRACT
] ]

File diff suppressed because one or more lines are too long

View file

@ -215,3 +215,16 @@ def national_tract_df():
low_memory=False, low_memory=False,
header=None, header=None,
) )
@pytest.fixture()
def tribal_overlap():
tribal_overlap = (
constants.DATA_PATH / "dataset" / "tribal_overlap" / "usa.csv"
)
return pd.read_csv(
tribal_overlap,
dtype={GEOID_TRACT_FIELD: "string"},
low_memory=False,
)

View file

@ -27,6 +27,7 @@ from .fixtures import (
census_2010_df, census_2010_df,
hrs_df, hrs_df,
national_tract_df, national_tract_df,
tribal_overlap,
) )
@ -249,6 +250,7 @@ def test_data_sources(
census_decennial_df, census_decennial_df,
census_2010_df, census_2010_df,
hrs_df, hrs_df,
tribal_overlap,
): ):
data_sources = { data_sources = {
key: value for key, value in locals().items() if key != "final_score_df" key: value for key, value in locals().items() if key != "final_score_df"