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
| Rule | Meaning |
|---|---|
| Times carry a timezone | Every returned datetime is timezone-aware and compares correctly with times in other zones |
| Dates are Taiwan dates | today, tomorrow and each forecast day use the Taiwan date at query time |
| Forecast periods include the start and exclude the end | A 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()
Units
| Quantity | Unit |
|---|---|
| Temperature | °C |
| Relative humidity, probability of precipitation | % |
| Wind speed | m/s |
| Pressure | hPa |
| Rainfall | mm |
| Distance, depth | km |
| Coordinates | WGS84 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:
| Field | Meaning |
|---|---|
dataset_id | The dataset ID, such as O-A0001-001 |
retrieved_at | When the SDK fetched the data |
issued_at, updated_at, observed_at | Issue, update or observation time given by the CWA, or None |
stale | True when the data is older than expected |
partial | True when the response was incomplete |
Datasets used by each feature:
| Feature | Datasets |
|---|---|
| Township forecasts | F-D0047-001 to F-D0047-091, the three-day and one-week forecast for each county |
| Station observations | O-A0001-001 |
| Felt earthquakes | E-A0015-001, E-A0016-001 |
| Warnings | W-C0033-001, W-C0033-002, W-C0034-001 |
| Typhoons | W-C0034-005 |
Data comes from the