Skip to content

manaakiwhenua/human-footprint-nz

Repository files navigation

manaakiwhenua-standards

Human Footprint NZ

Implementation of https://www.nature.com/articles/s41597-022-01284-8 for New Zealand

Human pressure variables implementation status

  • Built environments
  • Population density
  • Night-time lights
  • Crop land
  • Pasture land
  • Roads
  • Railways
  • Navigable waterways

Human Footprint Index for 2018

NB: the workflow is capable of generating a GeoTIFF (projection: NZGD2000 / NZCS2000) which has an extent and a pressure score for all NZ outlying islands, not just the mainland. This does not include the Ross Dependency (including the Balleny Islands), Tokelau, the Cook Islands, or Niue.

Components of the Human Footprint Index for 2018

Visual workflow summary

Generated with: set -o allexport && source secrets.env && set +o allexport && snakemake --snakefile ./src/Snakefile --profile profiles/default -f all --rulegraph | dot -Tpng > images/rulegraph.png

Reproduction

Secrets

Create a file, secrets.env or similar, and fill it with the following secrets of the form:

LINZ_KEY=abc...
LRIS_KEY=xyz...

Then use this file to set environment variables immediately before running the snakemake command:

set -o allexport && source secrets.env && set +o allexport && snakemake --snakefile ./src/Snakefile --profile ./profiles/default all

These keys are API keys for Koordinates-platform Web Feature Service APIs; they are necessary to download dependent data from Koordinates (LRIS and the LINZ Data Service).

Technnical Dependencies

  1. The workflow depends on Conda (ideally with Mamba)

    • SnakeMake; install via mamba install -c conda-forge -c bioconda snakemake.
    • Beyond that, SnakeMake itself will manage Conda environments for running commands.
  2. The workflow depends on Kart; follow the official installation instructions.

    • The instructions currently lack information about adding a public key to be able to clone Kart repositories. Go to https://id.koordinates.com/ssh-keys/ and click "Add Public Key" to add one. If you don't have an SSH key, work through Github documentation until you do, as the idea is identical, except that you will add your public key to Koordinates rather than to Github.
  3. The workflow depends on git-lfs, due to dependence on static rivers data that cannot be downloaded programmatically.

  4. The workflow depends on Docker (for access to GRASS GIS).

  5. The workflow depends on Singularity.

This workflow has only been run on Linux.

Pre-existing river data

Data for median flow (and wetted width at median flow) for all NZ rivers (REC) were manually downloaded from https://shiny.niwa.co.nz/nzrivermaps/ on 2023-09-07. It does not appear possible to download these data programmatically, as the web interface relies on a session token. Note that these data only exist for the North, South, and Stewart Islands.

Image of download parameters

Contact

  • Oliva Burge (project leader)
  • Richard Law (technical implementation)

About

Implementation of Human Footprint mapping for NZ

Resources

License

Stars

Watchers

Forks

Packages

No packages published