Code

Generating results

The code for the BAM Generalized National Models (GNM) is hosted in the borealbirds/GNM GitHub (git) repository.

The code in the /R folder of the repository includes R scripts for processing the data (observations, offsets, and predictors) and mosaicing together the regional predictive map pieces.

The code in the /graham folder contains code to run on Compute Canada’s Graham cluster. The code includes regional boosted regression models and predictions.

The /www folder of the repository includes scripts to summarize the outputs and organize the results into a presentable format hosted as part of the API repository.

Storing the results

The results from the BAM Generalized National Models (GNM) are hosted in the borealbirds/api GitHub (git) repository.

Assets are served from the /docs folder of the git master branch via GitHub pages.

Benefits of hosting these results via GitHub pages include security (serving assets over https, protection against certain cyber attacks) and speed (via the use of content delivery network). The data can be consumed by other computers because GitHub pages responses have cross-origin resource sharing headers.

The species mean density raster layers are available in GeoTIFF format from this Google Drive folder.

Presenting the results

The results from the BAM Generalized National Models (GNM) are presented via GitHub pages based on the borealbirds/borealbirds.github.io GitHub (git) repository.

The website’s features include:

To install the tools to build the website, follow these steps:

# Install Gridsome CLI tool
npm install --global @gridsome/cli

# Clone the repo
git clone -b dev https://github.com/borealbirds/borealbirds.github.io
cd borealbirds.github.io

# Install dependencies
npm install

# Run development server with hot reloading
gridsome develop

## now look at http://localhost:8080

To locally build and deploy, use the _build.sh script (you will need write access to the GitHub repository).

Automatic build & deployment enabled via GitHub Actions, see setup in the .github/workflows/build.yml file.