hydrometric-component v0.1.1
hydrometric-component
Display the latest primary water level for any hydrometric station in Canada, leverages the hydrometric-function repo
<div
id="container"
data-stationid="08HA009"
data-stationname="Lake Cowichan"
data-timezone="pst"
data-sealevel="160.944"
data-gaugemax="4"
data-gaugescale="4"
data-gaugeheight="208"
></div>
<script defer src="https://unpkg.com/hydrometric-component/index.js"></script>Parameters
data-stationidThe ID of any hydrometric station with real-time data available on https://wateroffice.ec.gc.ca
data-stationnameThe name of the sation to be displayed by the widget. This can be whatever you like.
data-timezoneThe local standard timezone the station specified is located in. Environment Canada doesn't adjust for DST and neither do we! Canada has six standard timezones, the three letter abbreviations of which are all valid values:
- PST (Pacific Standard Time)
- MST (Mountain Standard Time)
- CST (Central Standard Time)
- EST (Eastern Standard Time)
- AST (Atlantic Standard Time)
- NST (Newfoundland Standard Time)
data-sealevelThe relative height to sea level in meters of the water level baseline. This can be found in the station info on https://wateroffice.ec.gc.ca
data-gaugemaxThe maximum level the widget will display in number of meters.
data-gaugescaleThe scale the widget will display water gauge markers for. For example: data-gaugescale="4" will display a water gauge with markers displayed denoting every quarter meter
data-gaugeheightThe height in pixels of the gauge component within the widget. This number needs to be a multiple of data-gaugemax * data-gaugescale so that gauge scale markers and the gauge level display correctly