@maschinenlesbar.org/hochwasserzentralen-cli
    Preparing search index...

    Function aggregateSituation

    • Aggregate a /data/stations response into a per-state overview (pure). With states (normalised like normalizeStates: trimmed, upper-cased, checked against the 16 codes, else a HochwasserzentralenValidationError), the overview covers exactly those states: each is listed, also one without a gauge in the data (stations: 0, worstClass: null — "no gauges" is not the same as class -1 "Derzeit keine Daten"), and a gauge of any other state in the body is left out of the counts and the national worst class (a server that ignored ?states= can't change the answer). Without states, all 16 are listed and every gauge counts; one whose state isn't among the 16 gets an entry of its own rather than being lost. A null lhpClass counts in the "-1" bucket; an off-scale one throws (see stationClass). client.situation() fetches and aggregates in one call.

      Parameters

      Returns Situation