Endpoint: droughts/monitor

The droughts/monitor endpoint provides access to the US drought monitor information from the National Drought Mitigation Center.  Coverage of this endpoint is for the US only, and data is updated weekly.

https://api.aerisapi.com/droughts/monitor

Data CoverageContinental US

Included With API Developer,  API Premium

Supported Actions

The following actions are supported with the droughts/monitor endpoint:

:id Requesting data by using the :id action is used for returning data for a particular item that has an ID associated with it. This is the primary method for requesting general weather information for a single location (observations, forecasts, advisories, etc.) as the location's name or a zip code serves as the id. Other endpoints may expect a certain value for the ID, such as storm cells whose ID value is a combination of the radar site identifier and unique identifier assigned to every storm cell. Refer to an enpoint's detailed documentation for specific information regarding how to use the :id action.
affects The affects action requests all places affected by a particular type of event, such as earthquake or storm cell. The query for places affected is unique for each endpoint it belongs to and can be a polygon (e.g., storm cell forecasts or warnings) or a circle with the center being the location of the event (e.g., earthquakes or fires). Instead of returning an array of objects specific to the endpoint, the affects action will always return an array of place objects in the same format as the within action on the places endpoint.

Note: Not all endpoints support this action, so refer to each endpoint's complete documentation to determine if supported and its usage.
contains The contains action returns data that a specified location is contained within. This action is normally associated with endpoints that contain polygon data, allowing to return only the polygons a point / geometry is contained in. This action can be considered the opposite of the within endpoint.
search The search action is used as a more general query method and expects the query to be defined with the custom query for the request. Unlike the closest action, results will not be returned in any particular order.
within The within action allows for returning data within a variety of different geometrical regions. Currently supported geometries include a circle (requires a center point and radius), square (requires two coordinate points defining the top-left and bottom-right corners) and polygon (requires at least three coordinate points). Unlike the closest action, the results will not be returned in any particular order based on distance.

Supported Parameters

The following parameters are options unless otherwise noted:

callback callback=:functionName Used with JSONP implementation.

Defines the callback function to use for the response. The response will be enclosed as C(response), where C is the callback function provided.
filter filter=:string Predefined filters for limiting the results. The filter value can be a single, comma-delimited or a semicolon delimited string of filter names.
limit limit=:total The total number of results to return as an integer. Each endpoint may have a set maximum for this value depending on usage.

The default limit is 1 if not specified.
p p=:place Defines the location to query data for. Refer to the list of supported place value formats.
radius radius=:distance:unit When requesting the closest results within a circle, the radius determines how far from the specified location to search. A valid unit value must be included in your radius value, e.g., "5mi", "10km", "50miles". If no unit is provided, your value is assumed to be in meters by default.

The default radius is 25 miles if not specified.
query query=:string Used to filter results based on certain fields in the data set. See Advanced Queries for more details.
skip skip=:number Used to skip over a specific number of results in the data set.
sort sort=:string Used to sort results based on certain fields in the data set. See Sorting for more details.
to to=:string Returns the results between now* and the value specified. When used in conjunction with the from parameter, the value of to will be relative to the value of from, not relative to the current time.

Supports a UNIX timestamp a specific date string, or a string supported by the PHP strtotime() function.

Examples:
to=+6hours
to=+5days
to=1302883980
to=7/10/2011
to=2011/07/10
from from=:string Returns the results starting form the value specified.

Supports a UNIX timestamp a specific date string, or a string supported by the PHP strtotime() function.

Examples:
from=tomorrow
from=friday
from=1302883980
from=7/10/2011
from=2011/07/10
from=+2hours
fields fields=:string Provides a comma separated list of values for the API to return. This parameter is often used to limit the amount of data returned. See Reducing Output.

Supported Filters

The following filters can be passed to the filter parameter to reduce the results that are returned:

all All drought monitor intensity levels
d0 Intensity level 0 - Abnormally Dry
d1 Intensity level 1 - Moderate Drought
d2 Intensity level 2 - Severe Drought
d3 Intensity level 3 - Extreme Drought
d4 Intensity level 4 - Exceptional Drought

Supported Query Properties

Use the following supported property keys when creating custom queries for your requests:

id Query by the object ID
type Query by the drought intensity level. D0, D1, D2, D3 or D4
name Query by the drought intensity name
code Query by the drought intensity code:

0 - D0 - Abnormally Dry
1 - D1 - Moderate Drought
2 - D2 - Severe Drought
3 - D3 - Extreme Drought
4 - D4 - Exceptional Drought

Sortable Fields

You can use the following fields to sort the data returned in your response:

id Sort by the object ID
type Sort by the drought intensity level.
name Sort by the drought intensity name
code Sort by the drought intensity code.

Examples

Return all of the drought monitor intensity levels, without the polygons.
/droughts/monitor/search?filter=all

Return all of the drought monitor intensity levels, without the polygons and sorted by intensity from D0 to D4
/droughts/monitor/search?filter=all&sort=code

Return all the drought monitor intensity levels, including polygons and sorted by intensity level from D0 to D4
/droughts/monitor/search?filter=all,geo&sort=code

Return all the drought monitor intensity levels, including polygons and sorted by intensity level from D0 to D4. The object will be in GeoJson format.
/droughts/monitor/search?filter=all,geo&sort=code&format=geojson

Return the drought monitor intensity level D4, without polygons.
/droughts/monitor/search?filter=D4

Return the drought monitor intensity level D4, including polygons.
/droughts/monitor/search?filter=D4,geo

Return the drought monitor information that San Diego, CA is within. This example if useful to quickly check if a location is in a drought and at what level.
This query is equivalent to /droughts/monitor/contains?p=san diego,ca
/droughts/monitor/san diego,ca

Return the drought monitor information that San Diego, CA is within. This example if useful to quickly check if a location is in a drought and at what level.
/droughts/monitor/contains?p=san diego,ca

Returns the drought monitor information for a specified latitude/longitude
/droughts/monitor/contains?p=44.96,-93.27

Return the drought monitor information with id of "ec31f2f9654addad2e4f773522f7b2c3"
/droughts/monitor/ec31f2f9654addad2e4f773522f7b2c3

Return the drought monitor information, including polygon, for object id "ec31f2f9654addad2e4f773522f7b2c3"
/droughts/monitor/ec31f2f9654addad2e4f773522f7b2c3?filter=geo

Returns the top 10 locations, with at least a population of 50,000 that are within the intensity level with id "ec31f2f9654addad2e4f773522f7b2c3"
/droughts/monitor/affects?p=ec31f2f9654addad2e4f773522f7b2c3&pop=50000&limit=10

Response

The following is an example of what each object in the response will consist of. Depending on your requested action, the response may contain multiple instances of this object within an array.


{
   "id":"36d32f658c02e60267f0c936d103c56a",
   "details":{
      "product":"usdm",
      "category":"D0",
      "range":{
         "minTimestamp":1441713600,
         "maxTimestamp":1442318400,
         "minDateTimeISO":"2015-09-08T12:00:00+00:00",
         "maxDateTimeISO":"2015-09-15T12:00:00+00:00"
      },
      "issuedTimestamp":1441843200,
      "issuedDateTimeISO":"2015-09-10T00:00:00+00:00",
      "risk":{
         "type":"D0",
         "name":"Abnormally Dry",
         "code":0
      }
   },
   "geoPoly":{
      "type":"MultiPolygon",
      "coordinates":[
         [
            [
               [
                  -67.881819662988,
                  18.052338682299
               ],
               [
                  -67.891173099296,
                  18.053320533936
               ],
               [
                  -67.895462244321,
                  18.056188576775
               ],

               ...

               [
                  -67.901921800958,
                  18.065257792292
               ],
               [
                  -67.93039552478,
                  18.080295639084
               ],
               [
                  -165.48968763574,
                  66.408711056791
               ],
               [
                  -165.49397759142,
                  66.40686963384
               ],
               [
                  -165.49538717359,
                  66.407764757296
               ],
               [
                  -165.48873162275,
                  66.409021114823
               ]
            ]
         ]
      ]
   }
}
								

Response Properties

The following properties will be provided in every response object: