mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-02-23 10:04:18 -08:00
parent
426328e378
commit
fb4c484e5c
1 changed files with 12 additions and 2 deletions
|
@ -60,6 +60,7 @@ class GeoScoreETL(ExtractTransformLoad):
|
||||||
field_names.GEOID_TRACT_FIELD
|
field_names.GEOID_TRACT_FIELD
|
||||||
]
|
]
|
||||||
self.GEOMETRY_FIELD_NAME = "geometry"
|
self.GEOMETRY_FIELD_NAME = "geometry"
|
||||||
|
self.LAND_FIELD_NAME = "ALAND10"
|
||||||
|
|
||||||
# We will adjust this upwards while there is some fractional value
|
# We will adjust this upwards while there is some fractional value
|
||||||
# in the score. This is a starting value.
|
# in the score. This is a starting value.
|
||||||
|
@ -86,13 +87,22 @@ class GeoScoreETL(ExtractTransformLoad):
|
||||||
)
|
)
|
||||||
|
|
||||||
logger.info("Reading US GeoJSON (~6 minutes)")
|
logger.info("Reading US GeoJSON (~6 minutes)")
|
||||||
self.geojson_usa_df = gpd.read_file(
|
full_geojson_usa_df = gpd.read_file(
|
||||||
self.CENSUS_USA_GEOJSON,
|
self.CENSUS_USA_GEOJSON,
|
||||||
dtype={self.GEOID_FIELD_NAME: "string"},
|
dtype={self.GEOID_FIELD_NAME: "string"},
|
||||||
usecols=[self.GEOID_FIELD_NAME, self.GEOMETRY_FIELD_NAME],
|
usecols=[
|
||||||
|
self.GEOID_FIELD_NAME,
|
||||||
|
self.GEOMETRY_FIELD_NAME,
|
||||||
|
self.LAND_FIELD_NAME,
|
||||||
|
],
|
||||||
low_memory=False,
|
low_memory=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# We only want to keep tracts to visualize that have non-0 land
|
||||||
|
self.geojson_usa_df = full_geojson_usa_df[
|
||||||
|
full_geojson_usa_df[self.LAND_FIELD_NAME] > 0
|
||||||
|
]
|
||||||
|
|
||||||
logger.info("Reading score CSV")
|
logger.info("Reading score CSV")
|
||||||
self.score_usa_df = pd.read_csv(
|
self.score_usa_df = pd.read_csv(
|
||||||
self.TILE_SCORE_CSV,
|
self.TILE_SCORE_CSV,
|
||||||
|
|
Loading…
Add table
Reference in a new issue