heikkipora / sataako-fi

Sataako.fi weather service
https://sataako.fi
MIT License
23 stars 8 forks source link
es6 fmi open-data react weather

Sataako.fi

screenshot

Introduction

I wanted to create a mobile-friendly weather service for Finland which has the simplest possible user interface (in Finnish).

Sataako.fi fetches weather radar images from Finnish Meteorological Institute's Open Data APIs and shows them as a Openlayers image layer after some post-processing. The map tiles are served from OpenStreetMap via a long-caching proxy. The movement of rain clouds is shown as a short animation covering the last hour.

build status

Embedding

If you want to embed the map into another website such as a radiator or a home automation system, you can fix the coordinates and zoom level and automatically hide the side panel using query parameters.

Available query parameters:

Example: https://www.sataako.fi?x=2776307.5078&y=8438349.32742&zoom=7&collapsed=true

Runtime environment

The node.js application runs in Hetzner Cloud with a single vCpu instance. It's deployed there with ansible.

It's responsible for

To be able to serve a decent amount of concurrent users without exceeding the FMI API request rate, the following steps are done:

Radar frame post-processing

FMI provides a WMS compliant HTTP API for fetching a composite radar image covering all of Finland. To be able to use those images on top of the Mapbox map the following steps are taken:

OpenLayers will then reproject those images on the fly to EPSG:3857 projection aka WGS84 Web Mercator which is used by the OpenStreetMap tiles.

Contributing

Pull requests are welcome. Kindly check that your code passes ESLint checks by running npm test first.

Contributors