Skip to main content

An interactive visualization tool for GCBM

Project description

Taswira

An interactive visualisation tool for GCBM.

Github All Contributors GitHub Workflow Status GitHub

Screenshot of Taswira

Taswira aims to be an easy-to-use utility to help the users of the Generic Carbon Budget Model (GCBM). It takes output generated by GCBM and creates a browser-based UI that allows users to:

  • View previews of the spatial data overlaid on an interactive map.
  • View graphs of ecosystem indicators from the non-spatial output.
  • Visually cycle through the time-series of the spatial output.

Install

Requires Git and Miniconda (or Anaconda) with Python 3.6 or newer.

  1. Clone the repository and cd into it:
git clone https://github.com/moja-global/taswira
cd taswira
  1. Create a conda environment and activate it:
conda env create -f environment.yml

conda activate taswira
  1. Install the Python package:
pip install -e .

Taswira is now installed, see Usage below.

Using Docker

You can also use Taswira through Docker. For that, build a container image:

DOCKER_BUILDKIT=1 docker build -t taswira:latest .

And then use it to run Taswira:

docker run taswira

Usage

usage: taswira [-h] [--allow-unoptimized] config spatial_results db_results

Interactive visualization tool for GCBM

positional arguments:
  config               path to JSON config file
  spatial_results      path to GCBM spatial output directory
  db_results           path to compiled GCBM results database

optional arguments:
  -h, --help           show this help message and exit
  --allow-unoptimized  allow processing unoptimized raster files

NOTE: spatial_results directory should contain GeoTIFFs with filenames that match the pattern {title}_{year}.tiff.

Configuration Schema

config should be a valid JSON file with an array of environment indicator configurations, each of which can have the following keys:

Key Description Required
database_indicator Database column that contains indicator's value Yes
file_pattern Pattern that matches to the filenames of the indicator Yes
palette A valid colormap string Yes
title Human-friendly title of the indicator No
graph_units Unit to use in the graph No

Example config file:

[
  {
    "database_indicator": "NPP",
    "file_pattern": "NPP*.tiff",
    "graph_units": "Ktc",
    "palette": "Greens"
  },
  {
    "database_indicator": "NBP",
    "file_pattern": "NBP*.tiff",
    "palette": "Greens"
  },
  {
    "database_indicator": "NEP",
    "file_pattern": "NEP*.tiff",
    "palette": "Reds"
  },
  {
    "title": "AG Biomass",
    "database_indicator": "Aboveground Biomass",
    "file_pattern": "AG_Biomass_C_*.tiff",
    "palette": "YlGnBu",
    "graph_units": "Mtc"
  }
]

Repository Contributors

Thanks goes to these wonderful people (emoji key):


moja global

📆

Abhineet Tamrakar

📖 💻

kaushik surya sangem

👀

Guy Janssen

📆

This project follows the all-contributors specification. Contributions of any kind are welcome!

Maintainers Reviewers Ambassadors Coaches

The following people are Maintainers Reviewers Ambassadors or Coaches


Abhineet Tamrakar

📖 💻

kaushik surya sangem

👀

Maintainers review and accept proposed changes
Reviewers check proposed changes before they go to the Maintainers
Ambassadors are available to provide training related to this repository
Coaches are available to provide information to new contributors to this repository

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

taswira-0.1.1.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

taswira-0.1.1-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file taswira-0.1.1.tar.gz.

File metadata

  • Download URL: taswira-0.1.1.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for taswira-0.1.1.tar.gz
Algorithm Hash digest
SHA256 dcf9254dd19bcec212018f82faa955faa79274e15601935dad9338ae191b7484
MD5 9eef670728a7daa8930ad6c666fcdc48
BLAKE2b-256 0dce75f7764eb083aa14d897073b0db0eb2ce32ceaeca2573df1046f1c74f1cf

See more details on using hashes here.

File details

Details for the file taswira-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: taswira-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for taswira-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9f5cf9632312a59c03f57e53382125d305d730d6c83cfd73e9d8bf24e9333ced
MD5 57f02ebbbf945730042332244d61007f
BLAKE2b-256 a215e7728dd7cdca473b6085bfc90591719348a4fc5353f186c86a5f34d7e8e4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page