Catalog.from_dict#
- classmethod Catalog.from_dict(data: list[dict], include_uncertainties: bool = True, include_ids: bool = True, **kwargs) Catalog#
Create a Catalog from a list of dictionaries.
- Parameters:
data – A list of earthquake event information dictionaries.
include_uncertainties – Whether value columns with uncertainties should be included.
include_ids – Whether event, origin, and magnitude IDs should be included.
- Returns:
Catalog
Examples
>>> from seismostats import Catalog >>> data = [ ... {'longitude': 42.35, 'latitude': 3.34444, ... 'depth': 5.50, 'time': '1900-01-01 05:05:13', ... 'magnitude': 1.0}, ... {'longitude': 1.35, 'latitude': 5.13500, ... 'depth': 10.52, 'time': '1982-04-07 07:07:15', ... 'magnitude': 2.5}] >>> catalog = Catalog.from_dict(data) >>> catalog longitude latitude depth time magnitude 0 42.35 3.34444 5.50 1900-01-01 05:05:13 1.0 1 1.35 5.13500 10.52 1982-04-07 07:07:15 2.5