From 3ba1c620f54d480c668efdc83026a305132a44be Mon Sep 17 00:00:00 2001 From: Emma Nechamkin <97977170+emma-nechamkin@users.noreply.github.com> Date: Thu, 18 Aug 2022 15:54:44 -0400 Subject: [PATCH] Update to use new FSF files (#1838) backend is partially done! --- .../data_pipeline/content/config/csv.yml | 8 +++++++- .../data_pipeline/content/config/excel.yml | 8 +++++++- .../data_pipeline/etl/score/constants.py | 4 ++-- .../snapshots/downloadable_data_expected.pkl | Bin 16901 -> 17034 bytes .../tests/snapshots/tile_data_expected.pkl | Bin 4376 -> 4385 bytes .../etl/sources/fsf_flood_risk/etl.py | 14 +++----------- .../etl/sources/fsf_wildfire_risk/etl.py | 16 +++------------- data/data-pipeline/data_pipeline/utils.py | 2 ++ 8 files changed, 24 insertions(+), 28 deletions(-) diff --git a/data/data-pipeline/data_pipeline/content/config/csv.yml b/data/data-pipeline/data_pipeline/content/config/csv.yml index dccc8108..6a738e6e 100644 --- a/data/data-pipeline/data_pipeline/content/config/csv.yml +++ b/data/data-pipeline/data_pipeline/content/config/csv.yml @@ -334,4 +334,10 @@ fields: format: bool - score_name: There is at least one Formerly Used Defense Site (FUDS) in the tract and the tract is low income. label: There is at least one Formerly Used Defense Site (FUDS) in the tract and the tract is low income. - format: bool \ No newline at end of file + format: bool + - score_name: Tract-level redlining score meets or exceeds 3.25 and is low income + label: Tract experienced historic underinvestment and remains low income + format: bool + - score_name: Tract-level redlining score meets or exceeds 3.25 + label: Tract experienced historic underinvestment + format: bool diff --git a/data/data-pipeline/data_pipeline/content/config/excel.yml b/data/data-pipeline/data_pipeline/content/config/excel.yml index cdc1362b..c31e4763 100644 --- a/data/data-pipeline/data_pipeline/content/config/excel.yml +++ b/data/data-pipeline/data_pipeline/content/config/excel.yml @@ -338,4 +338,10 @@ sheets: format: bool - score_name: There is at least one Formerly Used Defense Site (FUDS) in the tract and the tract is low income. label: There is at least one Formerly Used Defense Site (FUDS) in the tract and the tract is low income. - format: bool \ No newline at end of file + format: bool + - score_name: Tract-level redlining score meets or exceeds 3.25 and is low income + label: Tract experienced historic underinvestment and remains low income + format: bool + - score_name: Tract-level redlining score meets or exceeds 3.25 + label: Tract experienced historic underinvestment + format: bool diff --git a/data/data-pipeline/data_pipeline/etl/score/constants.py b/data/data-pipeline/data_pipeline/etl/score/constants.py index 081347cc..646cb7a0 100644 --- a/data/data-pipeline/data_pipeline/etl/score/constants.py +++ b/data/data-pipeline/data_pipeline/etl/score/constants.py @@ -303,9 +303,9 @@ TILES_SCORE_COLUMNS = { field_names.FUTURE_FLOOD_RISK_FIELD + field_names.PERCENTILE_FIELD_SUFFIX: "FLD_PFS", field_names.FUTURE_WILDFIRE_RISK_FIELD - + field_names.PERCENTILE_FIELD_SUFFIX: "WF_PFS", + + field_names.PERCENTILE_FIELD_SUFFIX: "WFR_PFS", field_names.HIGH_FUTURE_FLOOD_RISK_FIELD: "FLD_ET", - field_names.HIGH_FUTURE_WILDFIRE_RISK_FIELD: "WF_ET", + field_names.HIGH_FUTURE_WILDFIRE_RISK_FIELD: "WFR_ET", field_names.ADJACENT_TRACT_SCORE_ABOVE_DONUT_THRESHOLD: "ADJ_ET", field_names.SCORE_N_COMMUNITIES + field_names.ADJACENCY_INDEX_SUFFIX: "ADJ_PFS", diff --git a/data/data-pipeline/data_pipeline/etl/score/tests/snapshots/downloadable_data_expected.pkl b/data/data-pipeline/data_pipeline/etl/score/tests/snapshots/downloadable_data_expected.pkl index 3631bea34e74f500b7eaf3cc99ee98382c0d3448..bec606f5eb8aa8f3f981fa74da0c4b6b93a66c0d 100644 GIT binary patch delta 211 zcmZo|VeD#UWNl!XTJN-xwNHXkYw{EcEyj?^`y~Qc7#JBDC-X~+acH$p$x!Tc3fQbG z>CDKP#{dEOn=_^MFf$fxR+IauRNvzmQk0lnqL5lqkXn?PnwOlKqL7hUT#{dunXFKn zmjV>bD@!dd$xY2GQAo^7Q7B5yP0Y+IR>;XOSIEpu&d*Jq(xXMZ8BJDgjWFzZg&fl#?JG6$mJWlxQJ|LO`=I c8AAcHgc`L20dBK89{wVesX=`Kd6OqXV>7=OdjJ3c diff --git a/data/data-pipeline/data_pipeline/etl/score/tests/snapshots/tile_data_expected.pkl b/data/data-pipeline/data_pipeline/etl/score/tests/snapshots/tile_data_expected.pkl index 559fdcf2bfa1157070a65ea50b86efafd58952ec..1fcb590fab1cc6ffa71a093fd4f2af43857c3413 100644 GIT binary patch delta 48 zcmbQCv`~qqfn}=LMwWg25 str: "ALI", "ALJ", "ALK", + "ALL", + "ALM", ] return excel_column_names[index]