Skip to main content

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

📖 💻

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

📖 💻

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

Release files for taswira 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for taswira 0.1.3
File Size Uploaded
taswira-0.1.3.tar.gz 19.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for taswira 0.1.3
File Interpreter ABI Platform
taswira-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 38.6 kB

Release files / taswira-0.1.3.tar.gz

Download URL taswira-0.1.3.tar.gz
Size 19.8 kB
Tags Source
SHA-256 checksum
How to use checksums
28f6df26603281b266f009fc29dde3d6c345f10684332c8140f8f5bb87eea9c1
BLAKE2b-256 checksum
How to use checksums
1cb0939376ad6ebc3895e76b88d635bff7f4be0dd2276528aa53a22d16569fdf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Release files / taswira-0.1.3-py3-none-any.whl

Download URL taswira-0.1.3-py3-none-any.whl
Size 18.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac23ee923004b1d252d679f89edef019d8b299e46c3cdbb88186c5f7fb990f42
BLAKE2b-256 checksum
How to use checksums
3d7fb64e1c70983f8bc05bb8f3d4bb17fde9c46a713ca862be10840c03bdacca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page