Swimability

marola.scoring.Swimability
object Swimability

Pure decision logic over one already-fetched hourly forecast slice — no I/O, no Kyo effect type, trivially unit-testable (see SwimabilitySpec).

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

Tie-breaker among equally scored hours: distance from 10:00.

Tie-breaker among equally scored hours: distance from 10:00.

Attributes

def isWhaleSeason(time: LocalDateTime): Boolean
def score(hour: HourlyConditions, water: WaterVerdict = ...): (Int, List[String])

0-100, higher = better conditions for open-water swimming, plus the reasons behind any deduction (empty when conditions are simply good).

0-100, higher = better conditions for open-water swimming, plus the reasons behind any deduction (empty when conditions are simply good).

Attributes

def waterVerdict(water: Option[WaterQuality], today: LocalDate): WaterVerdict

MIP-0001 §6, verbatim: every fresh matched point IMPRÓPRIA → veto (score 0); some IMPRÓPRIA → −20 and name the spots to avoid; all PRÓPRIA → nothing; no match / provider none → nothing (absence of data is not evidence of pollution); every sample older than 45 days → treated as no data, but say so.

MIP-0001 §6, verbatim: every fresh matched point IMPRÓPRIA → veto (score 0); some IMPRÓPRIA → −20 and name the spots to avoid; all PRÓPRIA → nothing; no match / provider none → nothing (absence of data is not evidence of pollution); every sample older than 45 days → treated as no data, but say so.

Attributes

Informational only — unlike jellyfishRisk, this never feeds into score: whether you might spot a whale doesn't make an hour more or less safe/pleasant to swim in.

Informational only — unlike jellyfishRisk, this never feeds into score: whether you might spot a whale doesn't make an hour more or less safe/pleasant to swim in.

Attributes

def windLevel(kmh: Option[Double]): Option[WindLevel]

The one place the wind thresholds turn into a band.

The one place the wind thresholds turn into a band.

Attributes