services module
- geodisasters.services.aggregate(client: GeoRapidClient, seen_date: date | None = None, format: OutFormat = OutFormat.GEOJSON)
Aggregates the broadcasted news related to natural disasters using a spatial grid and returns the features as hexagonal bins.
The date is optional. When not specified, we return the features from yesterday. The underlying knowledge graph contains locations since 2023-05-24 and yesterday should be the latest available date. The format can be geojson or esri.
- Parameters:
client – The client instance to use for this query.
seen_date – The value for the date of interest. Must be in the range of [2023-05-24, yesterday].
format – Defines the output format.
- Returns:
The aggregated geospatial hexagonal bins using the specified output format.
- geodisasters.services.hotspots(client: GeoRapidClient, seen_date: date | None = None, format: OutFormat = OutFormat.GEOJSON)
Returns the hotspot locations related to natural disasters.
The date is optional. When not specified, we return the features from yesterday. The underlying knowledge graph collects locations since 2023-05-24 and yesterday should be the latest available date. The format can be geojson or esri.
- Parameters:
client – The client instance to use for this query.
seen_date – The value for the date of interest. Must be in the range of [2023-05-24, yesterday].
format – Defines the output format.
- Returns:
The hotspot locations as geospatial point features using the specified output format.
- geodisasters.services.query(client: GeoRapidClient, from_date: date, to_date: date, format: OutFormat = OutFormat.GEOJSON)
Returns the most common locations related to natural disasters using a specific date range. The maximum date range is between 2023-05-24 and yesterday.
- Parameters:
client – The client instance to use for this query.
from_date – The start value for the date range. Must not smaller than 2023-05-24
to_date – The end value for the date range. Must not be greater than yesterday.
format – Defines the output format.
- Returns:
The most common locations as geospatial point features using the specified output format.