❯ poetry run bna run lorraine metz
/Users/rgreinhofer/projects/PeopleForBikes/brokenspoke-analyzer/.venv/lib/python3.10/site-packages/geopandas/_compat.py:112: UserWarning: The Shapely GEOS version (3.10.2-CAPI-1.16.0) is incompatible with the GEOS version PyGEOS was compiled with (3.10.1-CAPI-1.16.0). Conversions between both will be slow.
warnings.warn(
2022-08-07 09:15:19.581 | DEBUG | brokenspoke_analyzer.core.analysis:retrieve_city_boundaries:125 - Query used to retrieve the boundaries: metz, lorraine
/Users/rgreinhofer/projects/PeopleForBikes/brokenspoke-analyzer/brokenspoke_analyzer/core/analysis.py:130: UserWarning: Column names longer than 10
characters will be truncated when saved to ESRI Shapefile.
city_gdf.to_file(output / f"{slug}.shp")
[09:15:19] Boundary files ready. cli.py:100
OSM Region file downloaded. cli.py:106
OSM file for metz ready. cli.py:115
2022-08-07 09:15:20.010 | DEBUG | brokenspoke_analyzer.core.processhelper:run:13 - cmd='docker run --rm -e PFB_SHPFILE="/data/metz-lorraine.shp" -e PFB_OSM_FILE="/data/metz-lorraine.osm" -e PFB_STATE=al -e PFB_STATE_FIPS=91 -e NB_OUTPUT_DIR=/data -e PFB_DEBUG=1 -v "/Users/rgreinhofer/projects/PeopleForBikes/brokenspoke-analyzer/data":/data azavea/analyzer:13-3.1'
"docker run --rm -e PFB_SHPFILE="/data/metz-lorraine.shp" -e PFB_OSM_FILE="/data/metz-lorraine.osm" -e PFB_STATE=al -e PFB_STATE_FIPS=91 -e
NB_OUTPUT_DIR=/data -e PFB_DEBUG=1 -v "/Users/rgreinhofer/projects/PeopleForBikes/brokenspoke-analyzer/data":/data azavea/analyzer:13-3.1" failed to
execute with error code 3 for the following reason:
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
initdb: warning: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
NOTICE: empty string is not a valid password, clearing password
2022-08-07 14:15:55.403 UTC [14] LOG: starting PostgreSQL 13.7 (Debian 13.7-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6)
10.2.1 20210110, 64-bit
2022-08-07 14:15:55.408 UTC [14] LOG: listening on IPv4 address "0.0.0.0", port 5432
2022-08-07 14:15:55.408 UTC [14] LOG: listening on IPv6 address "::", port 5432
2022-08-07 14:15:55.412 UTC [14] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-08-07 14:15:55.440 UTC [275] LOG: database system was shut down at 2022-08-07 14:15:55 UTC
2022-08-07 14:15:55.462 UTC [14] LOG: database system is ready to accept connections
+ '[' ./scripts/import.sh = ./scripts/import.sh ']'
+ '[' /data/metz-lorraine.shp = --help ']'
+ '[' -z /data/metz-lorraine.shp ']'
+ ../import/import_neighborhood.sh /data/metz-lorraine.shp 91
+ '[' ../import/import_neighborhood.sh = ../import/import_neighborhood.sh ']'
+ '[' /data/metz-lorraine.shp = --help ']'
+ '[' -z /data/metz-lorraine.shp ']'
+ NB_BOUNDARY_FILE=/data/metz-lorraine.shp
+ NB_STATE_FIPS=91
++ mktemp -d
+ NB_TEMPDIR=/tmp/tmp.9ObXVP2Q62/import_neighborhood
+ mkdir -p /tmp/tmp.9ObXVP2Q62/import_neighborhood
+ NB_BOUNDARY_BUFFER=2680
+ update_status IMPORTING 'Importing boundary shapefile'
+ echo 'Updating job status: IMPORTING' 'Importing boundary shapefile'
+ '[' -n '' ']'
+ import_and_transform_shapefile /data/metz-lorraine.shp neighborhood_boundary 4326
+ IMPORT_FILE=/data/metz-lorraine.shp
+ IMPORT_TABLENAME=neighborhood_boundary
+ IMPORT_SRID=4326
+ echo 'START: Importing neighborhood_boundary'
+ shp2pgsql -I -p -D -s 4326 /data/metz-lorraine.shp neighborhood_boundary
+ psql -h localhost -U gis -d pfb
Field bbox_north is an FTDouble with width 24 and precision 15
Field bbox_south is an FTDouble with width 24 and precision 15
Field bbox_east is an FTDouble with width 24 and precision 15
Field bbox_west is an FTDouble with width 24 and precision 15
Field place_id is an FTDouble with width 18 and precision 0
Field osm_id is an FTDouble with width 18 and precision 0
Field lat is an FTDouble with width 24 and precision 15
Field lon is an FTDouble with width 24 and precision 15
Field importance is an FTDouble with width 24 and precision 15
Shapefile type: Polygon
Postgis type: MULTIPOLYGON[2]
+ shp2pgsql -I -d -D -s 4326 /data/metz-lorraine.shp neighborhood_boundary
+ psql -h localhost -U gis -d pfb
Field bbox_north is an FTDouble with width 24 and precision 15
Field bbox_south is an FTDouble with width 24 and precision 15
Field bbox_east is an FTDouble with width 24 and precision 15
Field bbox_west is an FTDouble with width 24 and precision 15
Field place_id is an FTDouble with width 18 and precision 0
Field osm_id is an FTDouble with width 18 and precision 0
Field lat is an FTDouble with width 24 and precision 15
Field lon is an FTDouble with width 24 and precision 15
Field importance is an FTDouble with width 24 and precision 15
Shapefile type: Polygon
Postgis type: MULTIPOLYGON[2]
+ psql -h localhost -U gis -d pfb -c 'ALTER TABLE neighborhood_boundary ALTER COLUMN geom TYPE geometry(MultiPolygon,32632) USING
ST_Force2d(ST_Transform(geom,32632));'
+ echo 'DONE: Importing neighborhood_boundary'
+ update_status IMPORTING 'Downloading water blocks'
+ echo 'Updating job status: IMPORTING' 'Downloading water blocks'
+ '[' -n '' ']'
+ psql -h localhost -U gis -d pfb -c '
CREATE TABLE IF NOT EXISTS "water_blocks" (
"STATEFP10" integer,
"COUNTYFP10" integer,
"TRACTCE10" integer,
"BLOCKCE10" integer,
GEOID varchar(15),
"NAME10" char(10),
"MTFCC10" char(5),
"UR10" char(1),
"UACE10" integer,
"UATYP10" char(1),
"FUNCSTAT10" char(1),
"ALAND10" integer,
"AWATER10" bigint,
"INTPTLAT10" decimal,
"INTPTLON10" decimal
);'
+ WATER_FILENAME=censuswaterblocks
+ WATER_DOWNLOAD=/tmp/tmp.9ObXVP2Q62/import_neighborhood/censuswaterblocks.zip
+ wget -nv -O /tmp/tmp.9ObXVP2Q62/import_neighborhood/censuswaterblocks.zip https://s3.amazonaws.com/pfb-public-documents/censuswaterblocks.zip
2022-08-07 14:16:04 URL:https://s3.amazonaws.com/pfb-public-documents/censuswaterblocks.zip [13306081/13306081] ->
"/tmp/tmp.9ObXVP2Q62/import_neighborhood/censuswaterblocks.zip" [1]
+ unzip /tmp/tmp.9ObXVP2Q62/import_neighborhood/censuswaterblocks.zip -d /tmp/tmp.9ObXVP2Q62/import_neighborhood
+ psql -h localhost -U gis -d pfb -c '\copy water_blocks FROM /tmp/tmp.9ObXVP2Q62/import_neighborhood/censuswaterblocks.csv delimiter '\'','\'' csv
header'
+ echo 'DONE: Importing water blocks'
+ update_status IMPORTING 'Downloading census blocks'
+ echo 'Updating job status: IMPORTING' 'Downloading census blocks'
+ '[' -n '' ']'
+ NB_BLOCK_FILENAME=tabblock2010_91_pophu
+ S3_PATH=s3:///data/tabblock2010_91_pophu.zip
+ '[' -f /data/tabblock2010_91_pophu.zip ']'
+ echo 'Using local census blocks file'
+ BLOCK_DOWNLOAD=/data/tabblock2010_91_pophu.zip
+ unzip /data/tabblock2010_91_pophu.zip -d /tmp/tmp.9ObXVP2Q62/import_neighborhood
+ update_status IMPORTING 'Loading census blocks'
+ echo 'Updating job status: IMPORTING' 'Loading census blocks'
+ '[' -n '' ']'
+ import_and_transform_shapefile /tmp/tmp.9ObXVP2Q62/import_neighborhood/tabblock2010_91_pophu.shp neighborhood_census_blocks 4326
+ IMPORT_FILE=/tmp/tmp.9ObXVP2Q62/import_neighborhood/tabblock2010_91_pophu.shp
+ IMPORT_TABLENAME=neighborhood_census_blocks
+ IMPORT_SRID=4326
+ echo 'START: Importing neighborhood_census_blocks'
+ shp2pgsql -I -p -D -s 4326 /tmp/tmp.9ObXVP2Q62/import_neighborhood/tabblock2010_91_pophu.shp neighborhood_census_blocks
+ psql -h localhost -U gis -d pfb
Field pop10 is an FTDouble with width 18 and precision 0
Shapefile type: Polygon
Postgis type: MULTIPOLYGON[2]
+ psql -h localhost -U gis -d pfb
+ shp2pgsql -I -d -D -s 4326 /tmp/tmp.9ObXVP2Q62/import_neighborhood/tabblock2010_91_pophu.shp neighborhood_census_blocks
Field pop10 is an FTDouble with width 18 and precision 0
Shapefile type: Polygon
Postgis type: MULTIPOLYGON[2]
+ psql -h localhost -U gis -d pfb -c 'ALTER TABLE neighborhood_census_blocks ALTER COLUMN geom TYPE geometry(MultiPolygon,32632) USING
ST_Force2d(ST_Transform(geom,32632));'
+ echo 'DONE: Importing neighborhood_census_blocks'
+ update_status IMPORTING 'Applying boundary buffer'
+ echo 'Updating job status: IMPORTING' 'Applying boundary buffer'
+ '[' -n '' ']'
+ echo 'START: Removing blocks outside buffer with size 2680'
+ psql -h localhost -U gis -d pfb -c 'DELETE FROM neighborhood_census_blocks AS blocks USING neighborhood_boundary AS boundary WHERE
NOT ST_DWithin(blocks.geom, boundary.geom, 2680);'
+ echo 'DONE: Finished removing blocks outside buffer'
+ update_status IMPORTING 'Removing water blocks'
+ echo 'Updating job status: IMPORTING' 'Removing water blocks'
+ '[' -n '' ']'
+ echo 'START: Removing blocks that are 100% water from analysis'
+ psql -h localhost -U gis -d pfb -c 'DELETE FROM neighborhood_census_blocks AS blocks USING water_blocks AS water WHERE
blocks.BLOCKID10 = water.geoid;'
+ echo 'DONE: FINISHED removing blocks that are 100% water'
++ psql -h localhost -U gis -d pfb -t -c 'SELECT count(*) as total_census_blocks FROM neighborhood_census_blocks;'
+ BLOCK_COUNT=' 0'
+ echo 'Census Blocks in analysis: 0'
+ set_job_attr census_block_count ' 0'
+ '[' -n '' ']'
+ rm -rf /tmp/tmp.9ObXVP2Q62/import_neighborhood
+ ../import/import_jobs.sh al
++ dirname ../import/import_jobs.sh
+ source ../import/../scripts/utils.sh
+ '[' ../import/import_jobs.sh = ../import/import_jobs.sh ']'
+ '[' al = --help ']'
+ '[' -z al ']'
+ NB_STATE_ABBREV=al
+ update_status IMPORTING 'Importing jobs data'
+ echo 'Updating job status: IMPORTING' 'Importing jobs data'
+ '[' -n '' ']'
+ import_job_data al main
++ mktemp -d
+ ROOT_TEMPDIR=/tmp/tmp.xsIOzjVHGK
+ NB_TEMPDIR=/tmp/tmp.xsIOzjVHGK/import_jobs
+ mkdir -p /tmp/tmp.xsIOzjVHGK/import_jobs
+ chmod -R 775 /tmp/tmp.xsIOzjVHGK
+ NB_STATE_ABBREV=al
+ NB_DATA_TYPE=main
+ NB_JOB_FILENAME=al_od_main_JT00_2018.csv
+ S3_PATH=s3:///data/al_od_main_JT00_2018.csv.gz
+ '[' -f /data/al_od_main_JT00_2018.csv.gz ']'
+ '[' '' ']'
+ JOB_DOWNLOAD=/tmp/tmp.xsIOzjVHGK/import_jobs/al_od_main_JT00_2018.csv.gz
+ set +e
+ wget -nv -O /tmp/tmp.xsIOzjVHGK/import_jobs/al_od_main_JT00_2018.csv.gz
http://lehd.ces.census.gov/data/lodes/LODES7/al/od/al_od_main_JT00_2018.csv.gz
2022-08-07 14:16:31 URL:https://lehd.ces.census.gov/data/lodes/LODES7/al/od/al_od_main_JT00_2018.csv.gz [10203041/10203041] ->
"/tmp/tmp.xsIOzjVHGK/import_jobs/al_od_main_JT00_2018.csv.gz" [1]
+ WGET_STATUS=0
+ set -e
+ [[ 0 -eq 8 ]]
+ '[' '' ']'
+ gunzip -c /tmp/tmp.xsIOzjVHGK/import_jobs/al_od_main_JT00_2018.csv.gz
+ psql -h localhost -U gis -d pfb -c '
CREATE TABLE IF NOT EXISTS "state_od_main_JT00" (
w_geocode varchar(15),
h_geocode varchar(15),
"S000" integer,
"SA01" integer,
"SA02" integer,
"SA03" integer,
"SE01" integer,
"SE02" integer,
"SE03" integer,
"SI01" integer,
"SI02" integer,
"SI03" integer,
createdate VARCHAR(32)
);'
+ psql -h localhost -U gis -d pfb -c 'TRUNCATE TABLE "state_od_main_JT00";'
+ psql -h localhost -U gis -d pfb -c '\copy "state_od_main_JT00"(w_geocode, h_geocode, "S000", "SA01", "SA02", "SA03", "SE01", "SE02", "SE03", "SI01",
"SI02", "SI03", createdate) FROM '\''/tmp/tmp.xsIOzjVHGK/import_jobs/al_od_main_JT00_2018.csv'\'' DELIMITER '\'','\'' CSV HEADER;'
+ rm -rf /tmp/tmp.xsIOzjVHGK/import_jobs
+ import_job_data al aux
+ ROOT_TEMPDIR=/tmp/tmp.xsIOzjVHGK/import_jobs
+ NB_TEMPDIR=/tmp/tmp.xsIOzjVHGK/import_jobs/import_jobs
+ mkdir -p /tmp/tmp.xsIOzjVHGK/import_jobs/import_jobs
+ chmod -R 775 /tmp/tmp.xsIOzjVHGK/import_jobs
+ NB_STATE_ABBREV=al
+ NB_DATA_TYPE=aux
+ NB_JOB_FILENAME=al_od_aux_JT00_2018.csv
+ S3_PATH=s3:///data/al_od_aux_JT00_2018.csv.gz
+ '[' -f /data/al_od_aux_JT00_2018.csv.gz ']'
+ '[' '' ']'
+ JOB_DOWNLOAD=/tmp/tmp.xsIOzjVHGK/import_jobs/import_jobs/al_od_aux_JT00_2018.csv.gz
+ set +e
+ wget -nv -O /tmp/tmp.xsIOzjVHGK/import_jobs/import_jobs/al_od_aux_JT00_2018.csv.gz
http://lehd.ces.census.gov/data/lodes/LODES7/al/od/al_od_aux_JT00_2018.csv.gz
2022-08-07 14:16:57 URL:http://lehd.ces.census.gov/data/lodes/LODES7/al/od/al_od_aux_JT00_2018.csv.gz [665598/665598] ->
"/tmp/tmp.xsIOzjVHGK/import_jobs/import_jobs/al_od_aux_JT00_2018.csv.gz" [1]
+ WGET_STATUS=0
+ set -e
+ [[ 0 -eq 8 ]]
+ '[' '' ']'
+ gunzip -c /tmp/tmp.xsIOzjVHGK/import_jobs/import_jobs/al_od_aux_JT00_2018.csv.gz
+ psql -h localhost -U gis -d pfb -c '
CREATE TABLE IF NOT EXISTS "state_od_aux_JT00" (
w_geocode varchar(15),
h_geocode varchar(15),
"S000" integer,
"SA01" integer,
"SA02" integer,
"SA03" integer,
"SE01" integer,
"SE02" integer,
"SE03" integer,
"SI01" integer,
"SI02" integer,
"SI03" integer,
createdate VARCHAR(32)
);'
+ psql -h localhost -U gis -d pfb -c 'TRUNCATE TABLE "state_od_aux_JT00";'
+ psql -h localhost -U gis -d pfb -c '\copy "state_od_aux_JT00"(w_geocode, h_geocode, "S000", "SA01", "SA02", "SA03", "SE01", "SE02", "SE03", "SI01",
"SI02", "SI03", createdate) FROM '\''/tmp/tmp.xsIOzjVHGK/import_jobs/import_jobs/al_od_aux_JT00_2018.csv'\'' DELIMITER '\'','\'' CSV HEADER;'
+ rm -rf /tmp/tmp.xsIOzjVHGK/import_jobs/import_jobs
+ ../import/import_osm.sh /data/metz-lorraine.osm
NOTICE: table "neighborhood_ways" does not exist, skipping
NOTICE: table "neighborhood_ways_intersections" does not exist, skipping
NOTICE: table "neighborhood_relations_ways" does not exist, skipping
NOTICE: table "neighborhood_osm_nodes" does not exist, skipping
NOTICE: table "neighborhood_osm_relations" does not exist, skipping
NOTICE: table "neighborhood_osm_way_classes" does not exist, skipping
NOTICE: table "neighborhood_osm_way_tags" does not exist, skipping
NOTICE: table "neighborhood_osm_way_types" does not exist, skipping
NOTICE: table "neighborhood_cycwys_ways" does not exist, skipping
NOTICE: table "neighborhood_cycwys_ways_vertices_pgr" does not exist, skipping
NOTICE: table "neighborhood_cycwys_relations_ways" does not exist, skipping
NOTICE: table "neighborhood_cycwys_osm_nodes" does not exist, skipping
NOTICE: table "neighborhood_cycwys_osm_relations" does not exist, skipping
NOTICE: table "neighborhood_cycwys_osm_way_classes" does not exist, skipping
NOTICE: table "neighborhood_cycwys_osm_way_tags" does not exist, skipping
NOTICE: table "neighborhood_cycwys_osm_way_types" does not exist, skipping
osmconvert Error: use border format: -b="x1,y1,x2,y2"
2022-08-07 14:17:10.633 UTC [14] LOG: received fast shutdown request
2022-08-07 14:17:10.635 UTC [14] LOG: aborting any active transactions
2022-08-07 14:17:10.647 UTC [14] LOG: background worker "logical replication launcher" (PID 284) exited with exit code 1
2022-08-07 14:17:10.690 UTC [277] LOG: shutting down
2022-08-07 14:17:10.843 UTC [14] LOG: database system is shut down
.