Flu Detector - Docs

The API

As well as the graphs, tables, and CSV exports available from the home page, we also provide an API for programatic access to our data.

Scores

To fetch score data use the following URL:

http://fludetector.cs.ucl.ac.uk/api/scores/

Arguments

model
The ID of the model you'd like data for
region
The region to get results for. Value must be one of the following: e (England), n (North of England), m (Midlands and East of England), l (London), or s (South of England)
start
Start date of requested time period, inclusive. In the format YYYY-MM-DD
end
End date of requested time period, non-inclusive. In the format YYYY-MM-DD
smoothing
Number of days to smooth data over using a moving average filter, as described in the Matlab documentation.
resolution
The density of the data points returned, either day or week

Example

Request:

http://fludetector.cs.ucl.ac.uk/api/scores/?start=2007-12-25&end=2008-01-08&region=e&resolution=day&model=3&smoothing=3

Response:

{
    "end": "2008-01-08",
    "model": {id: 3, name: "Google"},
    "region": "e",
    "resolution": "day",
    "scores": [
        {
            "date": "2007-12-25",
            "score": 0.0
        },
        ...],
    "start": "2007-12-25"
}

Models

To fetch a list of models:

http://fludetector.cs.ucl.ac.uk/api/models/

Example

Request:

http://fludetector.cs.ucl.ac.uk/api/models/

Response:

[{id: 3, name: "Google"}, ...]