Code Monkey home page Code Monkey logo

taswira's Introduction

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/GCBM.Visualisation_Tool
cd GCBM.Visualisation_Tool
  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

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.