modules/data/datasources/eauk.js

/**
 * Data gov uk: provides API for free datasets from the UK and other parts of the world.
 * For more information about the service, please visit:
 * https://environment.data.gov.uk/apiportal
 * Note: Different data sources may have different limitations
 * Endpoints have a default limit of 500 items.
 * The service does not require an API key, but, size limitations should be
 * considered when downloading data. Moreover, its better to bulk on
 * data if required. The files can be obtained in JSON, CSV or ZIP format.
 * For more information on the historical flooding data, visit:
 * https://environment.data.gov.uk/flood-monitoring/archive
 * Coordinates in WGS84.
 * Dates in format YYYY-MM-DDThh:mm:ss
 * @type {Object}
 * @name EAUK
 * @memberof datasources
 */

export default {
  //returns flood warnings as historic for a given area within the UK.
  "flood-warnings": {
    endpoint: "http://environment.data.gov.uk/flood-monitoring/id/floods",
    params: {
      "min-severity": null,
      county: null,
      lat: null,
      long: null,
    },
    methods: {
      type: "json",
      method: "GET",
    },
  },

  "flood-areas": {
    endpoint:
      "http://environment.data.gov.uk/flood-monitoring/id/floodAreas/context.jsonId",
    params: {
      search: null,
      lat: null,
      long: null,
      dist: null,
    },
    methods: {
      type: "json",
      method: "GET",
    },
  },

  //historic of flood stations that have been used for flood monitoring purposes.
  "flood-stations": {
    endpoint: "http://environment.data.gov.uk/flood-monitoring/id/stations",
    params: {
      parameterName: null,
      qualifier: null,
      label: null,
      town: null,
      catchmentName: null,
      search: null,
      //and more...
    },
    methods: {
      type: "json",
      method: "GET",
    },
  },

  //List of stations within a certain area. Add parameter = rainfall.
  "list-floodstations": {
    endpoint: "http://environment.data.gov.uk/flood-monitoring/id/stations",
    params: {
      parameter: null,
      label: null,
      stationReference: null,
      search: null,
      lat: null,
      long: null,
      dist: null,
    },
    methods: {
      type: "json",
      method: "GET",
    },
  },

  //find historic of rainfall information for a given rainfall station, using id parameter.
  "data-floodstations": {
    endpoint: "http://environment.data.gov.uk/flood-monitoring/data/readings",
    params: {
      parameter: null,
      latest: null,
      today: null,
      date: null,
      startdate: null,
      enddate: null,
      since: null,
      stationReference: null,
    },
    methods: {
      type: "json",
      method: "GET",
    },
  },

    //list of sampling points for a given region or area
    "list-wq-sampling": {
      endpoint: "http://environment.data.gov.uk/water-quality/id/sampling-point",
      params: {
        lat: null,
        lon: null,
        easting: null,
        northing: null,
        dist: null,
      },
      methods: {
        type: "json",
        method: "GET",
      },
    },

        //returns the data for a particular site a specified date range
        "data-wqsite": {
          endpoint: "http://environment.data.gov.uk/water-quality/id/sampling-point/{id}/measurements",
          params: {
            startDate: null,
            endDate: null,
            year: null,
            purpose: null,
          },
          methods: {
            type: "json",
            method: "GET",
          },
        },

  //set of requirements from the source. If different methods for dat retrieval can be used, then "GET" is default.
  requirements: {
    needProxy: true,
    requireskey: false,
  },
};