rivers
is a Go client library and a CLI utility for reading water level and water temperature data from stations located in rivers in Ireland. The tool reads data from more than 450 sensors located in 28 rivers.
Import the library using:
import "github.com/qba73/rivers"
Creat a new Client
object by calling rivers.NewClient()
:
client := rivers.NewClient()
client.GetLatestWaterLevels()
or
rivers.GetLatestWaterLevels()
You can see an example programs which retrieves water level data in the examples/stations folder.
If you find a bug in the rivers
client or library, please open an issue. Similarly, if you'd like a feature added or improved, let me know via an issue.
Not all the functionality of the water level is implemented yet.
Pull requests welcome!
Get readings from stations (water level in millimeters):
$ waterlevel
[...]
time: 2022-07-04 00:15:00 +0000 UTC, station: Innisconnell Pier, id: 36084, level: 1152
time: 2022-07-04 09:30:00 +0000 UTC, station: Clonconwal, id: 38001, level: 619
time: 2022-07-04 09:30:00 +0000 UTC, station: Glenties, id: 38010, level: 810
time: 2022-07-03 11:30:00 +0000 UTC, station: New Mills, id: 39001, level: 210
time: 2022-07-04 09:30:00 +0000 UTC, station: Tullyarvan, id: 39003, level: 327
[...]
Save readings to a file:
$ waterlevel > levels.txt
rivers
project processes Irish Public Sector Information licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0), licence provided by the Office of Public Works.
Data is licensed under the Creative Commons By Attribution (CC-BY) version 4.0 license - see summary.
This is in line with Irish Government PER Circular 12 of 2016 and policy on Open Data data.gov.ie.