@welldot/utils

getPiperCoordinates

Piper diagram coordinates: cation (Ca, Mg, Na+K) and anion (HCO₃+CO₃, Cl, SO₄) meq percentages of each triangle, and the projected diamond point. Returns undefined when either triangle sums to 0 or is unmeasured.

getPiperCoordinates(sample): PiperCoordinates | undefined

Piper diagram coordinates: cation (Ca, Mg, Na+K) and anion (HCO₃+CO₃, Cl, SO₄) meq percentages of each triangle, and the projected diamond point. Returns undefined when either triangle sums to 0 or is unmeasured.

Parameters

sample

WaterSample

Returns

PiperCoordinates | undefined