marola.water
Members list
Type members
Classlikes
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Serves the last successful fetch when the agency cannot be reached.
Serves the last successful fetch when the agency cannot be reached.
The agencies go down. IMA/SC spent 2026-09-08 serving a self-signed certificate on its production host, and every floripa beach on marola.dev read "no data" for hours. Nothing about the data had changed — only our ability to re-download it.
Serving the cache is not serving stale data: WaterQuality.fresh already ages samples out at 45 days on the agency's own sample dates, which do not move because our fetch failed. A bulletin downloaded yesterday is exactly as valid today as one downloaded a minute ago. When the cached samples genuinely age out, the existing rule turns them into "no data" without help from here.
Writes only on a non-empty fetch: an agency that answers with nothing must not erase a good cache.
Attributes
- Companion
- object
- Supertypes
-
trait WaterQualityClientclass Objecttrait Matchableclass Any
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
The primary source, then a backup when it gives nothing.
The primary source, then a backup when it gives nothing.
Written for IMA/SC: its JSON feed went unreachable on 2026-09-08 and Florianópolis lost every verdict, while the same agency's weekly bulletin PDF stayed up the whole time. One agency, two publication channels, and no reason for an outage in one to be a blackout for the user.
"Gives nothing" covers both a thrown failure and an empty answer, because from the map's side they are the same thing. Stacked under CachedWaterQualityClient, the order is: live feed, backup channel, last good fetch.
Attributes
- Companion
- object
- Supertypes
-
trait WaterQualityClientclass Objecttrait Matchableclass Any
IMA/SC from the weekly bulletin PDF, for when the JSON feed is unreachable.
IMA/SC from the weekly bulletin PDF, for when the JSON feed is unreachable.
Two sources, each useless alone. The PDF has a collection date and a verdict per point but no coordinates; the HTTP JSON has coordinates for all 260 points but, unlike the HTTPS one, no samples at all. Joined on the beach and point names they reconstruct what the HTTPS feed used to return in one call.
The bulletin URL is discovered from the portal's index rather than hardcoded — the mistake that left Rio pinned to a June PDF until its samples aged past the 45-day rule and the area went dark with nothing to say so.
Attributes
- Companion
- object
- Supertypes
-
trait WaterQualityClientclass Objecttrait Matchableclass Any
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Santa Catarina's bathing-water programme (IMA — Instituto do Meio Ambiente), via the JSON feed the portal's own map uses: POST /relatorio/mapa, empty body, no auth, ~207KB for all 260 points with their last five samples.
Santa Catarina's bathing-water programme (IMA — Instituto do Meio Ambiente), via the JSON feed the portal's own map uses: POST /relatorio/mapa, empty body, no auth, ~207KB for all 260 points with their last five samples.
Attributes
- Companion
- object
- Supertypes
-
trait WaterQualityClientclass Objecttrait Matchableclass Any
INEA (Rio de Janeiro)'s bathing-water bulletin PDF layout — verified live 2026-09-07 against a real, current bulletin (https://www.inea.rj.gov.br/wp-content/uploads/2026/06/ Zona-sudoeste-e-Zona-sul-17-06-26.pdf, Boletim N°24, 17/06/2026; captured as this parser's test fixture, local/src/test/resources/inea-boletim-zona-sudoeste-sul-2026-06-17.pdf).
INEA (Rio de Janeiro)'s bathing-water bulletin PDF layout — verified live 2026-09-07 against a real, current bulletin (https://www.inea.rj.gov.br/wp-content/uploads/2026/06/ Zona-sudoeste-e-Zona-sul-17-06-26.pdf, Boletim N°24, 17/06/2026; captured as this parser's test fixture, local/src/test/resources/inea-boletim-zona-sudoeste-sul-2026-06-17.pdf).
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
IneaPdfParser.type
INEA's bathing-water bulletins for the state of Rio de Janeiro (MIP-0031, #488): each city page links the latest dated PDF per zone, found there rather than pinned, parsed by IneaPdfParser.
INEA's bathing-water bulletins for the state of Rio de Janeiro (MIP-0031, #488): each city page links the latest dated PDF per zone, found there rather than pinned, parsed by IneaPdfParser.
Attributes
- Companion
- object
- Supertypes
-
trait WaterQualityClientclass Objecttrait Matchableclass Any
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Bahia's INEMA bathing-water bulletin (MIP-0031 §4.3/§5) — fetched as a live PDF (no JSON/HTML feed exists for this institute, confirmed live 2026-09-07: INEMA's own search form just wraps a plain GET to this same endpoint) and parsed by InemaPdfParser.
Bahia's INEMA bathing-water bulletin (MIP-0031 §4.3/§5) — fetched as a live PDF (no JSON/HTML feed exists for this institute, confirmed live 2026-09-07: INEMA's own search form just wraps a plain GET to this same endpoint) and parsed by InemaPdfParser.
Attributes
- Companion
- object
- Supertypes
-
trait WaterQualityClientclass Objecttrait Matchableclass Any
Parses INEMA's (Bahia) real water-quality bulletin PDF — fetched via geraBoletim?idcampanha=N, the only mechanism confirmed live for this institute (MIP-0031 §4.3/§11: no JSON/HTML alternative exists, INEMA's own search form just wraps a GET to this same PDF endpoint) — into rows of (point code, point name, description, category).
Parses INEMA's (Bahia) real water-quality bulletin PDF — fetched via geraBoletim?idcampanha=N, the only mechanism confirmed live for this institute (MIP-0031 §4.3/§11: no JSON/HTML alternative exists, INEMA's own search form just wraps a GET to this same PDF endpoint) — into rows of (point code, point name, description, category).
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
InemaPdfParser.type
Loads a hand-curated point-code → coordinate lookup table from a bundled JSON resource — the mechanism MIP-0031 §5 introduces because neither INEA's nor INEMA's bulletin PDF carries coordinates (verified live, MIP-0031 §4.3/§11).
Loads a hand-curated point-code → coordinate lookup table from a bundled JSON resource — the mechanism MIP-0031 §5 introduces because neither INEA's nor INEMA's bulletin PDF carries coordinates (verified live, MIP-0031 §4.3/§11).
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type