Flu Detector - API

The API is accessible through a single endpoint /api, and requests must be on the following format:

http://fmedia12.cs.ucl.ac.uk/api/<region>/<from-data>/<end-date>/<smoothing>/<weekly>

New results are added daily at around 02:15.

Arguments

region
The region to get results for. Only one region can be requested. Value must be one of the following:
England (e) North of England (n) Midlands and East of England (m) London (l) South of England (s)
from-date
Start date of requested time period, on the format YYYY-MM-DD. A "day" is from 00:00:00 to 23:59:59, british time (summer time dependent on date requested).
end-date
End date of requested time period, on the format YYYY-MM-DD.
smoothing
Amount of days to smooth data over using a moving average filter, as described here.
weekly
Whether only weekly values should be fetched. Set to 0 or 1.

Example

Request:

http://fmedia12.cs.ucl.ac.uk/api/e/2015-04-26/2015-04-28/3/0

Response:

{
  "regioncode": "e",
  "region": "England",
  "scores": [
    {
      "date": "2015-04-26",
      "score": 10.081262999999998
    },
    {
      "date": "2015-04-27",
      "score": 9.436020428571428
    },
    {
      "date": "2015-04-28",
      "score": 8.573879714285715
    }
  ],
  "from": "2015-04-26",
  "to": "2015-04-28"
}