HERE Technologies LogoHERE
APIs

6 min read

28 May 2026

Medical Weather Type: Origin, Calculation with HERE Weather API

banner medical weather type

Growing up in Latvia, it was common for weather forecasts on the radio to end with something called the medical weather type. Reported on a simple scale from 1 to 4, it indicated how favorable or unfavorable the upcoming weather conditions might be for human well‑being:

  • 1 meant positive,

  • 4 meant negative.

I vividly remember my grandmother preparing herself mentally whenever a negative medical weather type was forecasted for the next day. The term was so embedded in everyday life that I never questioned its origin. Only much later did I realize that many other countries do not use this concept at all.

Digging deeper, I discovered that medical weather is closely related to the scientific fields of biometeorology and meteorological medicine. The latter can be traced back as far as ancient Greece, where Hippocrates already discussed the relationship between weather conditions and human health. Much later, in 1957, the launch of the International Journal of Biometeorology marked a more formal and international scientific recognition of these ideas.

Interestingly, this timeline aligns closely with medical‑meteorological studies conducted by Latvian scientists in Ķemeri around the same period. It is reasonable to assume that Latvian research in this area was influenced by broader international developments in biometeorology, including the emerging scientific literature of the time.

In this blog post, we will explore the most common terms used in biometeorology and take a closer look at how Latvia calculates its well‑known medical weather type. From theory to practice, we will then use the HERE Weather API to calculate and forecast similar biometeorological indicators.

Biometeorology

Medical meteorology, also known as biometeorology, studies the interactions between weather conditions and living organisms - humans, plants, and animals. This interdisciplinary field of science analyzes how meteorological factors - air temperature, relative humidity, atmospheric pressure, wind speed and direction, solar radiation - affect human health and wellbeing. Weather changes can intensify existing disease symptoms, promote the emergence of new conditions, and cause temporary physiological changes in the body.

Classical biometeorology relies on a small but powerful set of atmospheric variables, most of which are already available via modern weather APIs. While advanced thermal indices such as UTCI and PET require radiation data, many operational medical weather concepts, including the Latvian medical weather type, can be realistically implemented using HERE Weather API alone for simplified or partial implementations.

Category

Classical parameter

HERE Weather API

Thermal

Air temperature

Thermal

Apparent temperature

Moisture

Relative humidity

Moisture

Dew point

Dynamics

Wind speed / direction

Pressure

Barometric pressure & trend

Hydrology

Rain / snow

Radiation

Mean radiant temperature

Radiation

Solar fluxes

Indices

Heat index / wind chill

Indices

UTCI / PET (full)

❌ (proxy only)

Access the data

Extract the necessary parameters from the API response by requesting the HERE Weather API observations. Construct the request as follows:

1https://weather.hereapi.com/v3/report?products=observation&q=Riga,Latvia&apiKey=WEATHER_API_KEY

Where:

  • products specifies the data type to retrieve (in this case, observation)

  • q defines the location query (city and country)

  • apiKey is your authentication key for accessing the API

A valuable note: when you define an approximate location such as Riga,Latvia, the response can include multiple observations (nearby places or stations). Therefore, in the next section, when structuring the Python dictionary, select the first observation entry ([0]).

Create a function that structures weather data into a Python dictionary, making it easily accessible for further processing

python
1def extract_weather_params(weather_data):
2 # The response structure is typically:
3 # weather_data["places"][0]["observations"][0]
4 observation = weather_data["places"][0]["observations"][0]
5
6 params = {
7 "temperature": observation.get("temperature"),
8 "humidity": observation.get("humidity"),
9 "wind_speed": observation.get("windSpeed"),
10 "wind_direction": observation.get("windDirection"),
11 "pressure": observation.get("barometerPressure"),
12 "pressure_trend": observation.get("barometerTrend"),
13 "description": observation.get("description"),
14 "icon": observation.get("iconName"),
15 "time": observation.get("time"),
16 }
17
18 return params
19
20weather_params = extract_weather_params(weather_data)
21
22print(f"Temperature: {weather_params['temperature']}°C")
23print(f"Humidity: {weather_params['humidity']}%")
24print(f"Wind speed: {weather_params['wind_speed']}") # Unit depends on the API response/settings
25print(f"Pressure: {weather_params['pressure']} hPa")
26

Calculating medical weather type

After obtaining weather data from HERE Weather API, we can calculate supporting thermal indices and then classify the medical weather type. Let us start with a Heat Index calculation, which considers temperature and humidity.

python
1def calculate_heat_index(temperature_c, humidity_percent):
2 """Calculate Heat Index in Celsius. Returns None for cool conditions."""
3 # Heat Index is mainly meaningful for warm/humid conditions (roughly >= 27°C).
4 if temperature_c < 27:
5 return None
6
7 # Convert to Fahrenheit for calculation
8 T = temperature_c * 9/5 + 32
9 RH = humidity_percent
10
11 # Rothfusz regression
12 HI = (-42.379 + 2.04901523*T + 10.14333127*RH
13 - 0.22475541*T*RH - 0.00683783*T*T
14 - 0.05481717*RH*RH + 0.00122874*T*T*RH
15 + 0.00085282*T*RH*RH - 0.00000199*T*T*RH*RH)
16
17 # Convert back to Celsius
18 HI_celsius = (HI - 32) * 5/9
19 return round(HI_celsius, 1)
20
21# Usage
22weather_params = extract_weather_params(weather_data)
23
24# Convert humidity to float/int if it arrives as a string
25temperature = float(weather_params["temperature"])
26humidity = float(weather_params["humidity"])
27
28heat_index = calculate_heat_index(temperature, humidity)
29
30print(f"Temperature: {temperature}°C")
31print(f"Humidity: {humidity}%")
32print(f"Heat index: {heat_index}°C" if heat_index is not None else "Heat index: not applicable")
33

The Heat Index shows how hot the weather feels to a person, taking into account both temperature and humidity.

Wind Chill (cold conditions)

For colder weather conditions, we use the Wind Chill index. This formula expects wind speed in km/h. Wind speed units depend on the API units parameter (for example, metric responses commonly use m/s), so conversion may be required before applying formulas.

python
1def calculate_wind_chill(temperature_c, wind_speed_kmh):
2 """Calculate Wind Chill in Celsius. wind_speed_kmh must be in km/h."""
3 # Wind Chill formula is valid if T <= 10°C and wind >= 4.8 km/h
4 if temperature_c <= 10 and wind_speed_kmh >= 4.8:
5 WC = (13.12 + 0.6215 * temperature_c
6 - 11.37 * (wind_speed_kmh ** 0.16)
7 + 0.3965 * temperature_c * (wind_speed_kmh ** 0.16))
8 return round(WC, 1)
9 return temperature_c
10
11wind_speed = float(weather_params["wind_speed"]) # treated as km/h
12wind_chill = calculate_wind_chill(temperature, wind_speed)
13
14print(f"Wind chill: {wind_chill}°C")
15

Classify Latvian medical weather type (1–4)

And then all that is left to create a function that classifies weather conditions. This is a simplified heuristic approximation and does not represent an official Latvian meteorological standard.

python
1def classify_latvian_medical_weather_type(pressure_hpa, pressure_trend=None):
2 """
3 Heuristic Latvian Medical Weather Type classification (1–4).
4 Uses pressure and optional trend label (Steady/Rising/Falling).
5 """
6 # Baseline classification by absolute pressure (sea-level hPa).
7 if pressure_hpa >= 1020:
8 t = 1
9 elif 1000 <= pressure_hpa < 1020:
10 t = 2
11 elif 985 <= pressure_hpa < 1000:
12 t = 3
13 else:
14 t = 4
15
16 # Conservative adjustment using trend.
17 if pressure_trend:
18 trend = pressure_trend.lower()
19 if "fall" in trend and t < 4:
20 t += 1
21
22 explanation = {
23 1: "Slightly elevated and stable pressure (especially favorable).",
24 2: "Normal or slightly low pressure (favorable).",
25 3: "Low pressure or notable decrease (unfavorable).",
26 4: "Very low pressure, often persistent in colder seasons (especially unfavorable).",
27 }[t]
28
29 return t, explanation
30
31pressure = float(weather_params["pressure"])
32pressure_trend = weather_params.get("pressure_trend")
33
34medical_type, reason = classify_latvian_medical_weather_type(pressure, pressure_trend)
35
36print("\nMedical weather type:")
37print(f"Type: {medical_type}")
38print(f"Reason: {reason}")
39

This code demonstrates a simplified heuristic medical weather type classification using HERE Weather API observations, combining supporting thermal indices with a pressure-driven medical weather type.

Conclusion

HERE Weather API integration with Python provides an accessible and efficient way to implement medical weather type calculations in practical applications. By combining classical biometeorological principles with modern weather data, developers can translate raw atmospheric parameters into meaningful, human‑centric insights. Using the approaches and code examples described in this article, it is possible to build customized solutions for a wide range of use cases—from simple mobile applications that explain daily weather impact, to more advanced decision support systems in healthcare, urban planning, and public information services.

References

Portrait of Alberts Jekabsons

Alberts Jekabsons

Sr. Developer Evangelist

Share article

Sign up for our newsletter

Why sign up:

  • Latest offers and discounts

  • Tailored content delivered weekly

  • Exclusive events

  • One click to unsubscribe