Rain Gauge App

The environment agency has a really cool rain data api. It's free to use and updates every 15 minutes with rainfall from automated gauges all over England. They even have a little demo app that displays the data as a little graph. However it's a little tricky to use and the graph is presented as a tiny png so I decided to try to make something a bit friendlier.

The api itself is surprisingly featureful. You can request a lists of the automated stations and get information about their locations and what measurements they take (at the moment they only seem to have rainfall but its interesting that they seem to have left themselves the option to have more). You can also filter the stations by their location (only stations X km from this point) and by the measurements they take.

Once you have identified a station you can query for it's rain data. This comes as a list of measurements every 15 minutes, with parameters to get data according to date. The json looks like this:

{
  "items": [
    {
      "@id": "http://environment.data.gov.uk/flood-monitoring/data/readings/571479-rainfall-tipping_bucket_raingauge-t-15_min-mm/2017-06-28T09-45-00Z",
      "dateTime": "2017-06-28T09:45:00Z",
      "measure": "http://environment.data.gov.uk/flood-monitoring/id/measures/571479-rainfall-tipping_bucket_raingauge-t-15_min-mm",
      "value": 0.3
    },
    {
      "@id": "http://environment.data.gov.uk/flood-monitoring/data/readings/571479-rainfall-tipping_bucket_raingauge-t-15_min-mm/2017-06-28T09-30-00Z",
      "dateTime": "2017-06-28T09:30:00Z",
      "measure": "http://environment.data.gov.uk/flood-monitoring/id/measures/571479-rainfall-tipping_bucket_raingauge-t-15_min-mm",
      "value": 0.2
    },
    {
      "@id": "http://environment.data.gov.uk/flood-monitoring/data/readings/571479-rainfall-tipping_bucket_raingauge-t-15_min-mm/2017-06-28T09-15-00Z",
      "dateTime": "2017-06-28T09:15:00Z",
      "measure": "http://environment.data.gov.uk/flood-monitoring/id/measures/571479-rainfall-tipping_bucket_raingauge-t-15_min-mm",
      "value": 0.1
    }
  ]
}

I wrote my app in React/Redux. It presents a list of stations, allowing you to pick from ~100 or so in Yorkshire (configurable). Then it displays the rain data which options to configure how far back in time you want data from. Of course a bar graph of 15 minutes intervals is pretty hard to interpret so it also has some configurable binning.

Try it out:

And find it here https://rhyst.github.io/rain/.

And find the source code on Github.

The only disappointment is that unfortunately Natural Resources Wales does not provide a similar api and the Environment Agency gauges stop sharply at the border.