Skip to content

NVE/skredview

Repository files navigation

skredview

This project is supposed to visualize data generated by the SatSkred project.

Structure of the project

Frontend

The frontend is written in plain TypeScript and utilizes Highcharts for showing charts, and OpenLayers for maps. The entry point is in ts/main.ts and the client compiles into static/js/skredview.js.

The charts are mostly controlled from within ts/charts.ts, and the maps from within ts/ol.ts, though map layers are set up in ts/ol/layer.ts.

What may be relevant to understand about the frontend is that the statistics were originally calculated on the client, when the amount of detections were a small fraction of the current amount. The statistics aggregation was later moved to the database (or rather to the database queries run by the backend).

Backend

You find the backend in src/main.py. It's basically just a home-made connection pool and some SQL queries. The queries became a bit more extensie after the statistics calculations were moved here.

The API justs sends the values of the different charts (/api/events/points/), as well as a GeoJSON of avalanche geometries /api/events/polygons/within/<w>/<s>/<e>/<n>/.

Prerequisites

  • conda
  • npm

Cloning

git clone [email protected]:NVE/skredview.git

or

git clone https://github.com/NVE/skredview.git

Installation

conda create --file skredview.yml
conda activate skredview
npm install

Compilation

npm run build

Settings

Add usernames and passwords for database and Geonorge in src/settings.py.

Run development server

python src/main.py 4321

About

Visualises satellite-borne remote avalanche detections in Norway

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •