使用指南
健康氣象
鄉鎮的熱傷害、冷傷害與溫差提醒指數。
| 函式 | 內容 |
|---|---|
cwa.health.heat_injury() | 五天逐三小時熱傷害指數 |
cwa.health.cold_injury(hourly=False) | 冷傷害指數,逐日或逐三小時 |
cwa.health.temperature_difference(hourly=False) | 溫差提醒指數,逐日或逐三小時 |
import cwa
forecast = cwa.health.heat_injury("臺北市信義區")
for period in forecast.periods[:4]:
print(period.start, period.index, period.warning) 每個時段有 start、end、index(指數)與 warning(警示等級文字),冷傷害與溫差提醒另有 max_temperature、min_temperature(°C)。
可傳入鄉鎮名稱、Township 或其序列;不傳參數時回傳所有鄉鎮。