Survey the ARPA REST APIs and correct the licence position

Scanned the two public ARPA Piemonte APIs and recorded what they actually
contain, so this question does not get re-litigated from the marketing pages
later. Neither needs a key, a token or a registration.

This corrects something I got wrong. The docs said ARPA states no licence for
its data, based on the open-data page saying only "gratuiti". The site's legal
notice does state one — CC BY 4.0, commercial use explicitly permitted, credit
"Fonte: Arpa Piemonte - www.arpa.piemonte.it" — and both APIs link that notice
from their OpenAPI description, so anything they serve is covered. Only the
radar volumes remain ambiguous, because their own page does not repeat the
licence and the access link is still issued by email; both questions belong in
the same message to ARPA.

The survey's operative findings:

- api_realtime carries 374 stations with coordinates, of which 286 have a rain
  gauge, spanning 74 m to 2820 m of elevation.
- Its observations lag by about 4.5 hours on an hourly cadence, measured
  uniformly across every station sampled. That is the property that decides how
  it can be used: it is an observation archive with a publishing delay, not a
  real-time feed, and it must never sit next to 5-minute radar looking current.
- Only 4 of 143 hydrometer stations publish guard and danger thresholds, and 5
  publish a river name. A river-level warning built on this would be empty for
  97% of stations, so that idea is recorded as rejected rather than pending.
- Meteoweb is a 3.27-million-record historical archive plus a seismic
  catalogue: a research dataset, not app content.

One thing is worth adopting: rain-gauge accumulations as ground truth for the
radar. Radar infers rainfall from reflectivity aloft, gauges measure what
reached the ground, and the network is densest exactly where Alpine terrain
blocks the beam. It belongs behind the worker, clearly timestamped, once the
worker exists.

Also notes that the credit ARPA asks for is the full "Fonte: Arpa Piemonte -
www.arpa.piemonte.it", not the bare name currently in the region config, to be
adopted the moment any ARPA-sourced data is displayed.

No code changes: nothing is integrated yet.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-10 16:33:55 +02:00
co-authored by Claude Opus 5
parent f3a0e3794a
commit e14308bbb6
2 changed files with 88 additions and 23 deletions
+71 -12
View File
@@ -126,26 +126,85 @@ constantly updated, machine-readable and free of charge.
1. **The access link is not public.** The page states that to obtain the real-time link
for radar and radiosonde data *"è necessario inviare una e-mail all'indirizzo
info.meteo@arpa.piemonte.it"*. There is no documented endpoint to call without it.
2. **No licence is stated.** The page says the data is *gratuiti* — free of charge — and
nothing more. Free of charge is not a licence. Rendering these volumes into PNG frames
and republishing them through a CDN to app users is redistribution, and without stated
terms there is no permission to point at. The email should ask for the reuse terms as
well as the link.
2. **The licence is stated site-wide, not on that page.** The open-data page itself says
only that the data is *gratuiti*. ARPA's legal notice at
<https://www.arpa.piemonte.it/note-legali> does state a licence for environmental and
open data: **CC BY 4.0, commercial use permitted**, crediting
*"Fonte: Arpa Piemonte - www.arpa.piemonte.it"*. Logos, emblems and third-party
content are excluded from it.
Until both are answered, `ArpaRadarSource` stays a stub whose every method throws. It is
Both ARPA REST APIs link that same notice from their OpenAPI `description`, so for
them the licence is unambiguous. The radar page does not repeat it, so the safe move
is to ask ARPA to confirm the terms apply to the radar volumes in the same email that
requests the access link.
Until the link exists, `ArpaRadarSource` stays a stub whose every method throws. It is
named by the region config as unavailable so the seam is visible, not because it is
nearly ready.
> Earlier drafts of this document recorded ARPA radar as CC BY 4.0. The open-data page
> does not support that, so the claim has been removed rather than carried forward.
## 3. ARPA Piemonte REST APIs — surveyed 2026-09-10, not yet adopted
## 3. Forecast — out of scope
Two public APIs, **no authentication, no key, no registration**. Both link
<https://www.arpa.piemonte.it/note-legali> from their OpenAPI `description`, so both are
CC BY 4.0 with commercial use permitted.
### `api_realtime` — <https://utility.arpa.piemonte.it/api_realtime>
Spec at `/api_realtime/openapi.json` (the `/docs` page is JS-rendered and cannot be
scraped; fetch the spec instead).
| Endpoint | Content |
|---|---|
| `GET /pie_anag` | Station registry: **374 stations**, `lat`/`lng`, elevation, municipality, province, basin, sensor letters |
| `GET /data_pie` | Hourly observations, last 3 days: `air_temperature`, `humidity`, `cum_rain_1h/3h/6h/12h/24h`, `wind`, `gust_of_wind` + directions, `snow_height`, `hydrometric_level`. Paginated |
| `GET /pie_neve` | Daily validated snow height, 08:00 |
| `GET /ggd` | Heating and cooling degree days |
| `GET /status` | Health check |
Sensor coverage across the 374 stations: **286 with a rain gauge (P)**, 277 temperature,
143 hydrometer (H), 90 wind, 79 snow. Rain gauges span 74 m to 2820 m elevation.
**Measured latency: ~4.5 hours**, uniform across every station sampled at 16:30 on
2026-09-10, on an hourly cadence. This is the single most important property of the feed:
it is an observation archive with a publishing delay, **not** a real-time source, and it
cannot be presented alongside 5-minute radar as if it were current.
**Hydrometric thresholds are effectively absent**: only 4 of 143 hydrometer stations
carry `guard_threshold` / `danger_threshold`, and only 5 carry a river name. A river-level
warning feature built on this would be blank for 97% of stations.
### Meteoweb — <https://utility.arpa.piemonte.it/docs/>
Spec at `/schema/` (YAML). Django REST Framework, hyperlinked, paginated.
Historical archive under `/meteoidro/`: daily and monthly meteo (**3.27 M** daily
records), hydrological (**931 k**), snow, century-long series, annual rainfall maxima,
flow-duration curves and rating curves, plus the station and measurement-point
registries. Latest daily data was one day behind (`2026-09-09`).
Also `/sismica/`: **35 910** seismic events since 2000 with position, depth and
magnitude, and the seismic classification of municipalities.
### Verdict
Only one thing here is on-scope: **rain-gauge accumulations as ground truth for the
radar**. Radar infers rainfall from reflectivity aloft; gauges measure what actually
reached the ground, and the network is dense exactly where Alpine terrain blocks the
radar beam. Worth adding as a clearly-timestamped observations layer once the worker
exists — never as a live reading.
Everything else is out of scope for this app: snow depth, degree days, the historical
archive and the seismic catalogue all belong to a different product. Hydrometric levels
would be valuable during heavy rain but the thresholds that would make them meaningful
are not published.
## 4. Forecast — out of scope
The app shows radar, not forecasts. No forecast provider is integrated, and MET Norway,
ItaliaMeteo ICON-2I and Open-Meteo are all out of scope. See CLAUDE.md for the current
scope boundary.
## 4. Alerts — ARPA Piemonte XML-CAP
## 5. Alerts — ARPA Piemonte XML-CAP
- Feed: `https://www.arpa.piemonte.it/export/xmlcap/allerta.xml`
- Landing page: <https://www.arpa.piemonte.it/rischi_naturali/snippets_arpa/allerta/index.html>
@@ -227,7 +286,7 @@ come from the ARPA zone documentation.
A captured copy of the live feed is kept as a test fixture so the parser is verified
against the real document rather than a hand-written approximation.
## 5. Base map — OpenFreeMap
## 6. Base map — OpenFreeMap
OpenStreetMap vector tiles served by **OpenFreeMap** (<https://openfreemap.org>).
@@ -262,7 +321,7 @@ bounding box — flat background plus the extent outline, no network sources at
deliberately plain so it is never mistaken for a finished map, and it is what the widget
tests run against.
## 6. Lightning — out of scope
## 7. Lightning — out of scope
Not part of the app. If it is ever revisited: **Blitzortung prohibits commercial use**,
and the DPC `LTG` product is the source to reach for instead.