scl3/task_scl_report_data
50
Read geojson files generated via SCL Stats task and create summary data for SCL website reports.
Excel based Reports:
Web page reports:
# Service account needs read access to bucket
SERVICE_ACCOUNT_KEY=
# SCL API Database connection
DB_NAME=
DB_USER=
DB_PASSWORD=
DB_HOST=
DB_PORT=
# Database table to write report data
DB_REPORT_TABLE=report_data
Database table creation is managed via in SpeciesConservationLandscapes/scl-api.
For testing purposes, the table creation looks like:
CREATE TABLE IF NOT EXISTS report_data(
id SERIAL PRIMARY KEY,
task_date DATE,
report VARCHAR(50),
updated_on TIMESTAMP WITHOUT TIME ZONE DEFAULT now(),
"data" JSONB,
UNIQUE (task_date, report)
)
usage: task.py [-h] [-d TASKDATE] [--geojson_files_dir GEOJSON_FILES_DIR]
optional arguments:
-h, --help show this help message and exit
-d TASKDATE, --taskdate TASKDATE
--geojson_files_dir GEOJSON_FILES_DIR
Define alternative source of where geojson files are located.
docker pull scl3/task_scl_report_data