Skip to Content
cwa

Data notes

Rules for time, units, missing values and data sources.

This page covers the rules shared by every result. Each guide describes its own fields.

Time

RuleMeaning
Times carry a timezoneEvery returned datetime is timezone-aware and compares correctly with times in other zones
Dates are Taiwan datestoday, tomorrow and each forecast day use the Taiwan date at query time
Forecast periods include the start and exclude the endA 00:00–03:00 period applies at 00:00 but no longer at 03:00

Queries take no time argument. The forecast’s at() and between() do, and they treat a datetime without a timezone as Taiwan time, so you normally never set one.

Units

QuantityUnit
Temperature°C
Relative humidity, probability of precipitation%
Wind speedm/s
PressurehPa
Rainfallmm
Distance, depthkm
CoordinatesWGS84 latitude and longitude

Missing values

A value the CWA does not provide is always None; the SDK never fills it with 0 or anything else. For example, humidity is None when a station did not report it. Methods that compute a minimum, maximum or mean, such as mean() and max(), skip missing values.

Data sources

Every result records the dataset it came from. Results from one source have source; results combining several, such as forecasts and warnings, have sources:

FieldMeaning
dataset_idThe dataset ID, such as O-A0001-001
retrieved_atWhen the SDK fetched the data
issued_at, updated_at, observed_atIssue, update or observation time given by the CWA, or None
staleTrue when the data is older than expected
partialTrue when the response was incomplete

Datasets used by each feature:

FeatureDatasets
Township forecastsF-D0047-001 to F-D0047-091, the three-day and one-week forecast for each county
Station observationsO-A0001-001
Felt earthquakesE-A0015-001, E-A0016-001
WarningsW-C0033-001, W-C0033-002, W-C0034-001
TyphoonsW-C0034-005

Data comes from the CWA Open Data platform.