diff --git a/data/data-pipeline/README.md b/data/data-pipeline/README.md index 517c3ccb..3f46b22a 100644 --- a/data/data-pipeline/README.md +++ b/data/data-pipeline/README.md @@ -196,7 +196,7 @@ Here's a list of commands: ## Local development -You can run the Python code locally without Docker to develop, using Poetry. However, to generate the census data you will need the [GDAL library](https://github.com/OSGeo/gdal) installed locally. Also to generate tiles for a local map, you will need [Mapbox tippecanoe](https://github.com/mapbox/tippecanoe). Please refer to the repos for specific instructions for your OS. +You can run the Python code locally without Docker to develop, using Poetry. However, to generate the census data you will need the [GDAL library](https://github.com/OSGeo/gdal) installed locally. For score generation, you will need [libspatialindex](https://libspatialindex.org/en/latest/). And to generate tiles for a local map, you will need [Mapbox tippecanoe](https://github.com/mapbox/tippecanoe). Please refer to the repos for specific instructions for your OS. ### VSCode @@ -218,6 +218,7 @@ To install the above-named executables: - gdal: `brew install gdal` - Tippecanoe: `brew install tippecanoe` +- spatialindex: `brew install spatialindex` Note: For MacOS Monterey or M1 Macs, [you might need to follow these steps](https://stackoverflow.com/a/70880741) to install Scipy. @@ -229,7 +230,7 @@ If you want to run tile generation, please install TippeCanoe [following these i - Start a terminal - Change to this directory (`/data/data-pipeline/`) -- Make sure you have at least Python 3.7 installed: `python -V` or `python3 -V` +- Make sure you have at least Python 3.8 installed: `python -V` or `python3 -V` - We use [Poetry](https://python-poetry.org/) for managing dependencies and building the application. Please follow the instructions on their site to download. - Install Poetry requirements with `poetry install` diff --git a/data/data-pipeline/data_pipeline/etl/sources/census_acs/etl_imputations.py b/data/data-pipeline/data_pipeline/etl/sources/census_acs/etl_imputations.py index 408a3341..22381477 100644 --- a/data/data-pipeline/data_pipeline/etl/sources/census_acs/etl_imputations.py +++ b/data/data-pipeline/data_pipeline/etl/sources/census_acs/etl_imputations.py @@ -1,4 +1,4 @@ -from typing import List, NamedTuple +from typing import List, NamedTuple, Tuple import pandas as pd import geopandas as gpd @@ -41,7 +41,7 @@ def _prepare_dataframe_for_imputation( impute_var_named_tup_list: List[NamedTuple], geo_df: gpd.GeoDataFrame, geoid_field: str = "GEOID10_TRACT", -) -> tuple[list, gpd.GeoDataFrame]: +) -> Tuple[list, gpd.GeoDataFrame]: imputing_cols = [ impute_var_pair.raw_field_name for impute_var_pair in impute_var_named_tup_list