View source: R/get_flood_warnings.R
get_flood_warnings | R Documentation |
The Environment Agency issue warnings of floods that cover specific warning or alert areas. The floods API provides a listing of all current such warnings and is updated every 15 minutes.
get_flood_warnings( min_severity = 3, county = NULL, lat = NULL, long = NULL, dist = NULL )
min_severity |
Return only warnings which at least as severe as this level. |
county |
Return only warnings applying to flood areas whose county name contains the submitted string. Can be a list of county names separated by "," in which case alerts which mention any of the named counties will be returned. |
lat, long, dist |
Return only warnings applying to flood areas which are
within |
A warning may be at one of four possible severity levels:
Severe Flood Warning - Severe Flooding, Danger to Life.
Flood Warning - Flooding is Expected, Immediate Action Required.
Flood Alert - Flooding is Possible, Be Prepared.
Warning no Longer in Force - The warning is no longer in force.
A data frame of flood warnings from the Environment Agency API.
Each individual warning with have a URI given by the @id field in the data:
http://environment.data.gov.uk/flood-monitoring/id/floods/id
The id section of this URI is taken from the value of the floodAreaID. Therefore the current warning for a flood area (if any warning exists) will always have the same URI. The severity level and the message field may change through the lifetime of the warning. The data for a warning will include the time at which the severity last changed. At some point after a warning is no longer in force it will disappear from the data feed and the URI for that warning will cease to resolve. If no warning is currently in place for that flood area, then attempting to resolve the URI will return a 404 status code. For approximately 24 hours after a warning has been in place for a flood area, the severity level will be set to 4, "Warning no Longer in Force", before the warning response is removed altogether.
For more information about the returned data, see https://environment.data.gov.uk/flood-monitoring/doc/reference#flood-warnings.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.