Code Monkey home page Code Monkey logo

smnorris / bcfishpass Goto Github PK

View Code? Open in Web Editor NEW
7.0 4.0 14.0 30.79 MB

Model and monitor aquatic habitat connectivity in BC. Tools to plan and prioritize the assessment and remediation of barriers.

Home Page: https://smnorris.github.io/bcfishpass

License: Apache License 2.0

Shell 18.23% Python 27.32% HTML 4.63% PLpgSQL 34.78% Makefile 14.21% Dockerfile 0.82%
fish-passage fish-observation british-columbia fwa stream-network gradient-barriers pscis roads dra digital-road-atlas

bcfishpass's Introduction

bcfishpass

bcfishpass is a collection of scripts to create and maintain an aquatic connectivity / fish passage database for British Columbia to:

  • track known barriers to fish passage (eg dams, waterfalls)
  • work with assessed BC Provincial Stream Crossing Information System (PSCIS) crossings
  • model potential barriers to fish passage (stream gradient, road/rail stream crossings)
  • model passability/accessibility of streams based on species swimming ability
  • model streams with potential for spawning and rearing activity (for select species)
  • report on habitat/connectivity based indicators to support prioritization of assessment and remediation
  • support mapping in office and field via a comprehensive QGIS layer file

See the Documentation for details.

General requirements

  • bash
  • GDAL (tested with v3.6)
  • a PostgreSQL / PostGIS database (tested with v14/v3.3)
  • Python (tested with v3.11.0)
  • bcdata
  • fwapg
  • bcfishobs

Setup

bcfishpass is a collection of shell/sql/Python scripts. To download and use the latest:

git clone https://github.com/smnorris/bcfishpass.git
cd bcfishpass

Install required tools using your preferred method. For local development, conda can be simplest:

conda env create -f environment.yml
conda activate bcfishpass

A Docker image is also provided:

docker pull ghcr.io/smnorris/bcfishpass:main

If the database you are working with does not already exist, create it:

createdb bcfishpass

All scripts presume that the DATABASE_URL environment variable points to your database. For example:

export DATABASE_URL=postgresql://postgres@localhost:5432/bcfishpass

Set up the database schema:

jobs/setup

Load FWA data:

git clone https://github.com/smnorris/fwapg
cd fwapg
mkdir -p .make; touch .make/db  # just reload data
mkdir -p data
make --debug=basicjobs/load_fwa

Load all additional data:

jobs/load_static
jobs/load_monthly
jobs/load_weekly

Run bcfishobs:

git clone [email protected]:smnorris/bcfishobs.git
cd bcfishobs
mkdir -p .make
make -t .make/setup
make -t .make/load_static
make -t .make/fiss_fish_obsrvtn_pnt_sp
make --debug=basic

Finally, navigate back to the root bcfishpass folder and build bcfishpass:

make

Note that it is possible (and often preferred) to build components of the modelling separately. Refer to the various README files in the subfolders within the model folder for more info.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.