Skip to Content
cwa
Guides

Health weather

Township heat injury, cold injury and temperature difference indices.

FunctionContents
cwa.health.heat_injury()Five-day, three-hourly heat injury index
cwa.health.cold_injury(hourly=False)Cold injury index, daily or three-hourly
cwa.health.temperature_difference(hourly=False)Temperature difference index, daily or three-hourly
import cwa

forecast = cwa.health.heat_injury("臺北市信義區")
for period in forecast.periods[:4]:
    print(period.start, period.index, period.warning)

Each period has start, end, index and warning (the warning level text). Cold injury and temperature difference periods also have max_temperature and min_temperature in °C.

Pass a township name, a Township or a sequence of them. Without an argument, every township is returned.