Skip to content

uk-gov-mirror/MetOffice.forest-lite

 
 

Repository files navigation

FOREST-lite

FOREST Lite

Minimal implementation of FOREST. It uses FastAPI to expose data via a REST API. The client application uses Redux and React to manage state and components. For visualisation, BokehJS and Turf.js have been chosen for their composability and ease-of-use.

Getting started

To start the FastAPI server run a command similar to the following

CONFIG_FILE=config.yaml python ${REPO_DIR}/server/main.py --port 8080

Then navigate to localhost:8080 to view the application.

Build

For simplicity the repository ships with pre-built assets, e.g. static/lite.min.js. Apart from the Python dependencies found in requirements.txt the app should just work out of the box.

For developers working on the client-side code, the project uses npm and webpack to create the bundled JS and other assets. jest is the preferred test framework.

Documentation

Full documentation is available at https://metoffice.github.io/forest-lite/

Configuration

The specification for config files has not yet been formalised but for now it takes lessons learned from the FOREST project

datasets:
  - label: Satellite outgoing longwave radiation
    palettes:
      default:
        name: Greys
        number: 256
        reverse: true
    driver:
      name: eida50
      settings:
        pattern: path/to/EIDA50_*.nc
        data_vars:
          - data

Note: This schema may change in future releases

REST API

Since the backend is powered by FastAPI to view the API Swagger documentation visit the /docs endpoint, e.g. localhost:8080/docs.

Note: For simplicity / serves index.html. Future releases may decouple the API server from the front-end server thus enabling independent scaling and a discoverable API

Packages

No packages published

Languages

  • JavaScript 31.4%
  • Elm 25.8%
  • CSS 24.5%
  • Python 17.3%
  • Other 1.0%