jriddell / wheres-the-water

Paddle Scotland Where's the Water website
GNU General Public License v3.0
3 stars 2 forks source link

Use graphs from riverzone #30

Closed jriddell closed 4 years ago

jriddell commented 5 years ago

Needs access to their API then working out how to load up the right URL for each river then link

jriddell commented 5 years ago

https://api.riverzone.eu/doc/v2

jriddell commented 5 years ago

Chat on FB Messenger with Tim Lloyd, Sergio Nalin https://riverzone.eu/calibration/115be799-cd1d-56a5-83e7-897e2930f27e.H#height=600&creditName=WtW&title=Findhorn+(Gorge)&zones=,ff0000,Huge|80,ff6060,Very+High|50,ffc004,High|37,ffff33,Medium|30,00ff00,Low|20,ccffcc,Scrapeable|0,cccccc,Empty

https://riverzone.eu/calibration/ ... path.

115be799-cd1d-56a5-83e7-897e2930f27e ... station uuid.

.H ... optional set of sensor selectors ("H" for height, "Q" for flow).

Hash parameters

height=600 ... optional graph height.

creditName=WtW ... optional calibration credit name.

creditUrl ... optional calibration credit url.

title=Findhorn+(Gorge) ... optional section name.

zones=,ff0000,Huge|80,ff6060,Very+High|50,ffc004,High|37,ffff33,Medium|30,00ff00,Low|20,ccffcc,Scrapeable|0,cccccc,Empty

... sequence of calibration zone specifications, separated by "|".

Calibration zone specifications are three fields, separated by "."

1) value: numeric value of the upper bound of the zone. The highest zone has no upper bound and therefore no value.

2) color: the color of the zone in rgb. 6 hex digits, no leading '#'.

3) label: the label text for the zone. Label text should be double quoted if it might contain either of the field delimiters "," or "|". Oops .. Calibration zone specifications are three fields, separated by "," There are some more parameters to tell you about ... from (to) ... an optional start (end) time for the graph. If the value is a positive integer then it is interpreted as a unix Epoch timestamp (in seconds). If the value is a negative integer then it is interpreted as an offset in days; so -7 specifies a time of 1 week in the past.

The default "to" value is now. The default "from" value is -8 days,