mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-02-23 10:04:18 -08:00
tuple type
This commit is contained in:
parent
d3efcbdeb3
commit
e539db86ab
2 changed files with 5 additions and 4 deletions
|
@ -196,7 +196,7 @@ Here's a list of commands:
|
||||||
|
|
||||||
## Local development
|
## 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
|
### VSCode
|
||||||
|
|
||||||
|
@ -218,6 +218,7 @@ To install the above-named executables:
|
||||||
|
|
||||||
- gdal: `brew install gdal`
|
- gdal: `brew install gdal`
|
||||||
- Tippecanoe: `brew install tippecanoe`
|
- 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.
|
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
|
- Start a terminal
|
||||||
- Change to this directory (`/data/data-pipeline/`)
|
- 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.
|
- 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`
|
- Install Poetry requirements with `poetry install`
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from typing import List, NamedTuple
|
from typing import List, NamedTuple, Tuple
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
import geopandas as gpd
|
import geopandas as gpd
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ def _prepare_dataframe_for_imputation(
|
||||||
impute_var_named_tup_list: List[NamedTuple],
|
impute_var_named_tup_list: List[NamedTuple],
|
||||||
geo_df: gpd.GeoDataFrame,
|
geo_df: gpd.GeoDataFrame,
|
||||||
geoid_field: str = "GEOID10_TRACT",
|
geoid_field: str = "GEOID10_TRACT",
|
||||||
) -> tuple[list, gpd.GeoDataFrame]:
|
) -> Tuple[list, gpd.GeoDataFrame]:
|
||||||
imputing_cols = [
|
imputing_cols = [
|
||||||
impute_var_pair.raw_field_name
|
impute_var_pair.raw_field_name
|
||||||
for impute_var_pair in impute_var_named_tup_list
|
for impute_var_pair in impute_var_named_tup_list
|
||||||
|
|
Loading…
Add table
Reference in a new issue