← Nazaj na blog

Radarske padavine — Slovenija

What began as a small Python script that scraped Slovenia's weather-radar image to flag incoming storms has grown into a small dockerized service. It continuously ingests ARSO's national radar frame, decodes it into precipitation (mm/h), and keeps a queryable history — all behind a FastAPI API.

GitHub repository API docs (Swagger)

Latest radar frame

Straight from the service — the most recent ARSO radar image, refreshed roughly every 10 minutes:

Live · ARSO Slovenia Latest ARSO weather radar over Slovenia
Source: Environmental Agency of Slovenia (ARSO), via /radar/latest.

Precipitation in Ljubljana

The same radar, queried for a single point. Below is the recent precipitation over Ljubljana, pulled live from /precip/by-address?address=ljubljana:

Ljubljana · mm/h

Loading live data…

How it works

  1. Ingestor — on a fixed interval (10 minutes by default) it downloads the radar GIF and weather XML from ARSO.
  2. Decode — the radar image is turned into a precipitation grid (mm/h per cell); full-resolution frames are archived too.
  3. Store — readings land in TimescaleDB hypertables: the precipitation grid, named locations, archived frames, and weather observations.
  4. Serve — a FastAPI app exposes query endpoints and an interactive map GUI; click any point to read its precipitation history.

Features

  • Radar precipitation imagery ingested every ~10 minutes (configurable).
  • "Click-anywhere" precipitation history for any coordinate in Slovenia.
  • Address search, geocoded to the nearest radar cell.
  • Named locations with storm alerts and a configurable alert radius.
  • Surface weather observations — temperature, pressure, humidity, wind.
  • Full-resolution frame archival, laying the groundwork for an ML predictive radar.

A few endpoints

  • GET /radar/latest — the latest radar GIF (shown above).
  • GET /precip/by-address?address= — precipitation history for an address.
  • GET /precip/history?lat&lon — history for exact coordinates.
  • GET /locations — registered locations; POST /locations to add one.
  • GET /weather/history?lat&lon — nearest-station weather.
  • GET /health — service status and ingest stats.

The full, interactive reference lives in the Swagger docs.

Stack

Python · FastAPI
TimescaleDB (PostgreSQL hypertables)
Docker + Docker Compose
Data source: ARSO Slovenia weather radar