FDSNWSEventClient.get_events#
- FDSNWSEventClient.get_events(start_time: datetime | None = None, end_time: datetime | None = None, min_latitude: float | None = None, max_latitude: float | None = None, min_longitude: float | None = None, max_longitude: float | None = None, min_magnitude: float | None = None, max_magnitude: float | None = None, include_all_magnitudes: bool = False, event_type: str | None = None, delta_m: float | None = 0.1, include_uncertainty: bool = False, include_ids: bool = False, include_quality: bool = False, batch_size: int | None = None, **kwargs) DataFrame#
Downloads an earthquake catalog based on a URL.
- Parameters:
start_time – Start time of the catalog.
end_time – End time of the catalog.
min_latitude – Minimum latitude of the catalog.
max_latitude – Maximum latitude of the catalog.
min_longitude – Minimum longitude of the catalog.
max_longitude – Maximum longitude of the catalog.
min_magnitude – Minimum magnitude of the catalog.
max_magnitude – Maximum magnitude of the catalog.
include_all_magnitudes – Whether to include all magnitudes.
event_type – Filter by the type of events.
delta_m – Magnitude bin size. If >0, then events of magnitude >= (min_magnitude - delta_m/2) will be downloaded.
include_uncertainty – Whether to include uncertainty columns.
include_ids – Whether to include event, magnitude and origin IDs.
include_quality – Whether to include quality columns.
batch_size – If set to None, will download all events in one request. If set, will download events in batches of batch_size, but return the entire catalog.
kwargs – Additional parameters to be passed to the FDSNWS event service.
- Returns:
catalog – The catalog as a Catalog Object.
Examples
>>> from seismostats import FDSNWSEventClient >>> from datetime import datetime >>> url = 'http://eida.ethz.ch/fdsnws/event/1/query' >>> client = FDSNWSEventClient(url) >>> df = client.get_events( ... start_time=datetime(2020, 1, 1), ... end_time=datetime(2022, 1, 1), ... min_magnitude=0.5, ... min_longitude=5, ... max_longitude=11, ... min_latitude=45, ... max_latitude=48) >>> df event_type time latitude longitude magnitude 0 earthquake 2021-12-30 07:43:14 46.051 7.388 2.510 ... 1 earthquake 2021-12-30 01:35:37 46.778 9.476 1.352 ... 2 earthquake 2021-12-29 08:48:59 47.779 7.722 0.817 ... 3 earthquake 2021-12-29 00:14:32 47.715 7.634 1.252 ... 4 earthquake 2021-12-28 11:51:38 45.752 7.080 0.897 ... ... ... ... ... ... ... ...