API reference
Earthquakes
earthquakes.latest
def latest(*, language: Language = 'zh-TW') -> Earthquake | None Retrieve the newest available felt earthquake report.
language=“en” reads CWA’s English reports (E-A0015-002, E-A0016-002).
client.earthquakes.latest(*, language: Language = 'zh-TW') -> Earthquake | None
await async_client.earthquakes.latest(*, language: Language = 'zh-TW') -> Earthquake | None earthquakes.recent
def recent(*, limit: int = 20, language: Language = 'zh-TW') -> tuple[Earthquake, ...] Retrieve reports ordered by earthquake occurrence time.
language=“en” reads CWA’s English reports (E-A0015-002, E-A0016-002).
client.earthquakes.recent(*, limit: int = 20, language: Language = 'zh-TW') -> tuple[Earthquake, ...]
await async_client.earthquakes.recent(*, limit: int = 20, language: Language = 'zh-TW') -> tuple[Earthquake, ...] Earthquake
number: str | None
occurred_at: datetime
published_at: datetime | None
revision: str | None
magnitude: float
magnitude_scale: str
depth_km: float
epicenter: Coordinates
epicenter_description: str
maximum_intensity: IntensityLevel | None
intensities: tuple[ReportedIntensity, ...]
source: Source
report_url: str | None
report_type: str | None CWA felt-earthquake report and its original observation scope.
number is the published report number. Small-area reports, which CWA leaves unnumbered, have no number.
Earthquake.distance_to
def distance_to(location: PointInput) -> float
def distance_to(location: Sequence[PointInput]) -> Mapping[Point, float] Return horizontal epicentral distances in kilometres.
Earthquake.intensity_at
def intensity_at(location: IntensityInput) -> IntensityLevel | None
def intensity_at(location: Sequence[IntensityInput]) -> Mapping[IntensityArea, IntensityLevel | None] Look up the published intensity for the exact administrative area.
IntensityLevel
label: str Ordered categories of the CWA intensity scale.
earthquakes.Language
type Language = Literal['zh-TW', 'en'] ReportedIntensity
label: str
level: IntensityLevel | None
county: County | None
township: Township | None
description: str | None
station_id: str | None
station_name: str | None A source intensity label and its ordered category, when recognized.