Endpoint Detail: Polygon-aggregate
This page provides detailed information about the /poly-aggregate endpoint. The data from multiple weather stations can be aggregated by providing a polygon. The data from all stations within that polygon will be aggregated (averaged), provided they are available for the selected dates. Only a single polygon can be provided per query.
Datasource
A station source ID is only unique within a datasource, so the same ID can belong to stations in more than one
datasource. When querying by station_src_ids on the v1 endpoint, pass the optional
datasource parameter to select the intended station. Every requested ID must exist in that
datasource, otherwise the request is rejected with "Not found.". Without datasource the
behaviour is unchanged.
Data types
The data_types parameter in the body must be a list of items. Even if querying a single item.
The number of data_types is limited to 5 per query.
Available data types differ per time scale, please refer to the table below:
| Time scale | Available data types |
|---|---|
| Hourly | temperature_mean, temperature_min, temperature_max, rain, solar_radation, sunshine_duration, wind_direction, leaf_wetness, wind_speed_max, wind_speed, evaporation, dew_point, humidity, humidity_min, humidity_max |
| Daily | temperature_mean, temperature_min, temperature_max, temperature_median, rain_sum, solar_radiation_sum, sunshine_duration_sum, wind_direction_mean, wind_direction_median, humidity_mean, humidity_min, humidity_max, humidity_median, leaf_wetness_mean, leaf_wetness_median, leaf_wetnes_min, leaf_wetness_max, wind_speed_mean, wind_speed_min, wind_speed_max, evaporation_sum, dew_point_mean, dew_point_median, dew_point_min, dew_point_max, rain_mean, rain_min, rain_max, solar_rad_std_sum, solar_rad_std_mean, solar_rad_std_min, solar_rad_std_max, et0 |
| Monthly | temperature_mean, temperature_min, temperature_max, temperature_median, rain_sum, solar_radiation_sum, sunshine_duration_sum, wind_direction_mean, wind_direction_median, humidity_mean, humidity_min, humidity_max, humidity_median, leaf_wetness_mean, leaf_wetness_median, leaf_wetnes_min, leaf_wetness_max, wind_speed_mean, wind_speed_min, wind_speed_max, evaporation_sum, dew_point_mean, dew_point_median, dew_point_min, dew_point_max, rain_mean, rain_min, rain_max, solar_rad_std |
Time scales
When querying the nearest station data, a time_scale parameter must be provided in
the options dictionary of the body. Available options are one of the following: "hourly", "daily", "monthly".
The date formats for querying the different time scales are as follows:
| Time scale | Date format |
|---|---|
| Hourly | yyyy-mm-ddThh:mm:ss (where the mm:ss should always be 00:00 as you are only querying hourly data. Hours are from 00:00:00 (midnight) - 23:00:00) |
| Daily | yyyy-mm-dd |
| Monthly | yyyy-mm |