Closed TangoYankee closed 1 month ago
@TylerMatteo commit f513c4a44751497b48a6926a3047da2b1ead9ec9 has geospatial data.
The steps to interact with data:
Preamble: update your .env
with the sample.env
variables
1) Spin up the zoning api docker compose from the data-flow branch
docker compose cp cpdb_planned_commitments_23adopt.csv db:var/lib/postgresql/data
docker compose cp cpdb_projects_23adopt.csv db:var/lib/postgresql/data
5) Copy the shp files into the runner containerdocker compose cp cpdb_projects_poly_23adopt runner:.
docker compose cp cpdb_projects_pts_23adopt runner:.
6) Load the shp files into their tablespostgis EXTENSION
sql from the sql/commitments.sql
file in pgadmin. Otherwise, the spatial data will be errant.docker compose exec -it runner bash
bash/import-project.sh
file (I didn't actually make it a bash script. So, copy and paste to the terminal is required)
7) Run the sql/commitments.sql
file in pgadmin Do this! ogr2ogr -nln city_council_districts_source Pg:"dbname=$BUILD_ENGINE_DB host=$BUILD_ENGINE_HOST user=$BUILD_ENGINE_USER port=$BUILD_ENGINE_PORT" nycc_24b -lco precision=NO -lco GEOMETRY_NAME=geom -nlt PROMOTE_TO_MULTI
sql/commitment-funding.sql
is the code under review