HERE Geocoding & Search API: Developer Insights & Best Practices
Piyush Pelagade — 18 May 2026
6 min read
28 May 2026

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.
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) |
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_KEYWhere:
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
python1def 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 params19
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/settings25print(f"Pressure: {weather_params['pressure']} hPa")26
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.
python1def 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 None6
7 # Convert to Fahrenheit for calculation8 T = temperature_c * 9/5 + 329 RH = humidity_percent10
11 # Rothfusz regression12 HI = (-42.379 + 2.04901523*T + 10.14333127*RH13 - 0.22475541*T*RH - 0.00683783*T*T14 - 0.05481717*RH*RH + 0.00122874*T*T*RH15 + 0.00085282*T*RH*RH - 0.00000199*T*T*RH*RH)16
17 # Convert back to Celsius18 HI_celsius = (HI - 32) * 5/919 return round(HI_celsius, 1)20
21# Usage22weather_params = extract_weather_params(weather_data)23
24# Convert humidity to float/int if it arrives as a string25temperature = 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.
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.
python1def 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/h4 if temperature_c <= 10 and wind_speed_kmh >= 4.8:5 WC = (13.12 + 0.6215 * temperature_c6 - 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_c10
11wind_speed = float(weather_params["wind_speed"]) # treated as km/h12wind_chill = calculate_wind_chill(temperature, wind_speed)13
14print(f"Wind chill: {wind_chill}°C")15
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.
python1def 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 = 19 elif 1000 <= pressure_hpa < 1020:10 t = 211 elif 985 <= pressure_hpa < 1000:12 t = 313 else:14 t = 415
16 # Conservative adjustment using trend.17 if pressure_trend:18 trend = pressure_trend.lower()19 if "fall" in trend and t < 4:20 t += 121
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, explanation30
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.
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.

Alberts Jekabsons
Sr. Developer Evangelist
Share article
Piyush Pelagade — 18 May 2026
Alberts Jekabsons — 04 May 2026
Alberts Jekabsons — 22 April 2026
Why sign up:
Latest offers and discounts
Tailored content delivered weekly
Exclusive events
One click to unsubscribe