River levels block
- shawn
- Newbie

- Posts: 7
- Joined: Tue Jan 23, 2018 7:25 am
- Location: Evesham
- Station model: Davis Vue
- Software: CumulusMX
- Contact:
River levels block
Hi Guys, How easy would it be to have a river level block? Bit like the tides block.
- EveshamWeather
- Observer

- Posts: 20
- Joined: Sat Sep 02, 2017 11:11 am
- Location: Evesham, UK
- Station model: Davis Vantage Vue
- Software: Weewx
- Contact:
Re: River levels block
It would need a reliable data source from which data can be extracted. I have quickly looked at the Environment Agency website for the UK and there is an API for flood warnings, which may also give river levels in there somewhere - https://environment.data.gov.uk/flood-m ... /reference.
A quick search on Evesham has not returned any data for river level though (https://environment.data.gov.uk/flood-m ... wn=Evesham) so it may not be possible to get the information required from this api but it will need further investigation. Edit to add, I have found the river level (http://environment.data.gov.uk/flood-mo ... 5_min-mASD or https://environment.data.gov.uk/flood-m ... eter=level - the value field listed under the latest reading section) which appears to be accurate to what the web page levels show. The downside I found is that not all stations have a river level, and the station ID (2002 for Evesham) is not always the same for the API and the EA website (Slad Brook Merrywalks is 2204 on the website but 2206 on the API) so it will not be easy for anyone to find the required station ID to use the API.
This data source could be used for providing a flood warnings block though I guess.
Also it appears this API will only work for England. Welsh levels have an API @ https://api-portal.naturalresources.wales/ and there are separate agencies controlling data for Scotland and NI.
A quick search on Evesham has not returned any data for river level though (https://environment.data.gov.uk/flood-m ... wn=Evesham) so it may not be possible to get the information required from this api but it will need further investigation. Edit to add, I have found the river level (http://environment.data.gov.uk/flood-mo ... 5_min-mASD or https://environment.data.gov.uk/flood-m ... eter=level - the value field listed under the latest reading section) which appears to be accurate to what the web page levels show. The downside I found is that not all stations have a river level, and the station ID (2002 for Evesham) is not always the same for the API and the EA website (Slad Brook Merrywalks is 2204 on the website but 2206 on the API) so it will not be easy for anyone to find the required station ID to use the API.
This data source could be used for providing a flood warnings block though I guess.
Also it appears this API will only work for England. Welsh levels have an API @ https://api-portal.naturalresources.wales/ and there are separate agencies controlling data for Scotland and NI.
Vince

- shawn
- Newbie

- Posts: 7
- Joined: Tue Jan 23, 2018 7:25 am
- Location: Evesham
- Station model: Davis Vue
- Software: CumulusMX
- Contact:
Re: River levels block
Thanks for your reply Vince.
I use this site www.riverlevels.uk/river-avon-evesham#.WmzuQahl9PY to monitor the river by me and i was wondering if a block could be made with the same info at the top of the page and the 2 graphs further down?
Shawn
I use this site www.riverlevels.uk/river-avon-evesham#.WmzuQahl9PY to monitor the river by me and i was wondering if a block could be made with the same info at the top of the page and the 2 graphs further down?
Shawn
- EveshamWeather
- Observer

- Posts: 20
- Joined: Sat Sep 02, 2017 11:11 am
- Location: Evesham, UK
- Station model: Davis Vantage Vue
- Software: Weewx
- Contact:
Re: River levels block
That site looks like it uses the API's I listed and generates the data from those, so it would be possible to create a block (for current information) and possibly a plugin giving more detailed information (like history graphs etc). Jachym may be able to sort something way faster than I can though (as I need to do some learning first!).
Vince

- shawn
- Newbie

- Posts: 7
- Joined: Tue Jan 23, 2018 7:25 am
- Location: Evesham
- Station model: Davis Vue
- Software: CumulusMX
- Contact:
Re: River levels block
Yes same, I need to go back a few years and relearn. My head is spinning just looking at the code :-/
Shawn
Shawn