Add Score D to USA Low (#629)

* added score D

* Adding Score D to usa-low

* rounding score d

* small vscode update

* last couple of vscode changes

* uncommited bscode changes
This commit is contained in:
Jorge Escobar 2021-09-08 16:44:26 -04:00 committed by GitHub
parent 1953d2fcd8
commit 327e27e713
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 21 deletions

View file

@ -94,15 +94,5 @@
"update"
]
},
{
"name": "upload map tiles to s3",
"type": "bash",
"request": "launch",
"module": "poetry",
"args": [
"update"
]
},
// aws s3 sync ./data_pipeline/data/score/tiles/ s3://justice40-data/data-pipeline/data/score/tiles --acl public-read --delete
]
}

View file

@ -39,15 +39,11 @@
{
"label": "Upload tiles to S3",
"type": "shell",
"command": "aws",
"args": [
"s3",
"sync",
"./data_pipeline/data/score/tiles/",
"s3://justice40-data/data-pipeline/data/score/tiles",
"--acl public-read",
"--delete"
]
"command": "aws s3 sync ./data_pipeline/data/score/tiles/ s3://justice40-data/data-pipeline/data/score/tiles --acl public-read --delete",
"presentation": {
"reveal": "always",
"panel": "new"
}
},
]
}

View file

@ -26,8 +26,8 @@ class GeoScoreETL(ExtractTransformLoad):
self.DATA_PATH / "census" / "geojson" / "us.json"
)
self.TARGET_SCORE_NAME = "Score E (percentile)"
self.TARGET_SCORE_RENAME_TO = "E_SCORE"
self.TARGET_SCORE_NAME = "Score D (percentile)"
self.TARGET_SCORE_RENAME_TO = "D_SCORE"
self.NUMBER_OF_BUCKETS = 10
@ -103,6 +103,10 @@ class GeoScoreETL(ExtractTransformLoad):
crs="EPSG:4326",
)
# round to 2 decimals
decimals = pd.Series([2], index=[self.TARGET_SCORE_RENAME_TO])
self.geojson_score_usa_low = self.geojson_score_usa_low.round(decimals)
def _aggregate_to_tracts(
self, block_group_df: gpd.GeoDataFrame
) -> gpd.GeoDataFrame: