feat: Extract weather trend analysis into a new shared module and add initial web application and data collection components.
This commit is contained in:
+6
-1
@@ -105,7 +105,7 @@ def _analyze(city: str, force_refresh: bool = False) -> Dict[str, Any]:
|
||||
raw = _weather.fetch_all_sources(city, lat=lat, lon=lon)
|
||||
om = raw.get("open-meteo", {})
|
||||
metar = raw.get("metar", {})
|
||||
mgm = raw.get("mgm", {})
|
||||
mgm = raw.get("mgm") or {}
|
||||
ens_raw = raw.get("ensemble", {})
|
||||
mm = raw.get("multi_model", {})
|
||||
risk = CITY_RISK_PROFILES.get(city, {})
|
||||
@@ -412,6 +412,11 @@ def _analyze(city: str, force_refresh: bool = False) -> Dict[str, Any]:
|
||||
if i < len(maxtemps) and maxtemps[i] is not None:
|
||||
day_m["Open-Meteo"] = _sf(maxtemps[i])
|
||||
|
||||
# Add MGM per-day forecast
|
||||
mgm_daily = mgm.get("daily_forecasts", {})
|
||||
if d_str in mgm_daily:
|
||||
day_m["MGM"] = _sf(mgm_daily[d_str])
|
||||
|
||||
d_val, d_winfo = None, ""
|
||||
if day_m:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user