From 6505cc9528af1490ac95e3e8cf2b8f9dd64c7b3a Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Sun, 8 Feb 2026 20:00:59 +0800 Subject: [PATCH] feat: Add multi-source weather data collection module and clarify Meteoblue coverage in documentation. --- README.md | 4 ++-- README_ZH.md | 4 ++-- src/data_collection/weather_sources.py | 17 +++++++++-------- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index ee282da2..8de4947f 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ The bot aggregates data from multiple authoritative sources, layered by reliabil | Source | Role | Coverage | Strength | | :----------------- | :---------------------- | :-------------- | :--------------------------------------------------------------------------------- | | **Open-Meteo** | Base Forecast | Global | Provides detailed 72-hour temperature curves for all cities. | -| **Meteoblue (MB)** | **Precision Consensus** | Global | **Traders' choice**. Aggregates multiple models; excellent for microclimates. | +| **Meteoblue (MB)** | **Precision Consensus** | London Only | **Traders' choice**. Aggregates multiple models; excellent for microclimates. | | **METAR** | **Settlement Standard** | Global Airports | The absolute truth for Polymarket settlement; real-time station data. | | **NWS** | Official (US) | US Only | High-fidelity forecasts for US cities, critical for extreme weather events. | | **MGM** | Official (Turkey) | Ankara | Direct access to Turkish State Meteorological Service for local official accuracy. | @@ -102,5 +102,5 @@ graph TD 1. **Check Consensus**: Compare Open-Meteo and Meteoblue (MB). Consensus usually implies higher probability. 2. **Watch the Peak**: Use `/city` frequently during predicted peak windows to catch momentum. -3. **Weighting Hierarchy**: Settlement is **METAR**; high-accuracy trend is **MB**; Official (NWS/MGM) is the "anchor." +3. **Weighting Hierarchy**: Settlement is **METAR**; high-accuracy trend is **MB** (London); Official (NWS/MGM) is the "anchor." 4. **Geographic Risk**: Pay close attention to cities where "Bias will significantly amplify." diff --git a/README_ZH.md b/README_ZH.md index 392999ef..be2303a6 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -48,7 +48,7 @@ _注意:系统当前处于 **天气查询模式**。主动市场监控和自 | 数据源 | 数据角色 | 覆盖范围 | 优势 | | :----------------- | :------------- | :--------- | :----------------------------------------------- | | **Open-Meteo** | 基础预测 | 全球 | 提供所有城市的 72 小时精细化温度曲线 | -| **Meteoblue (MB)** | **高精度共识** | 全球 | **交易员首选**。聚合多家模型,对微气候处理极佳 | +| **Meteoblue (MB)** | **高精度共识** | 仅限伦敦 | **交易员首选**。聚合多家模型,对微气候处理极佳 | | **METAR** | **结算标准** | 全球机场 | Polymarket 结算参考的绝对真理,实时机场观测 | | **NWS** | 官方预测(美) | 仅限美国 | 美国国家气象局,对美国城市的极端天气预判准确 | | **MGM** | 官方预测(土) | 仅限安卡拉 | 土耳其气象局,提供安卡拉 Esenboğa 机场的官方数据 | @@ -108,5 +108,5 @@ graph TD 1. **检查模型共识**:查看 Open-Meteo 和 Meteoblue (MB) 是否达成共识。 2. **关注峰值窗口**:在预测的峰值时段多次使用 `/city` 刷新。 -3. **数据权重优先级**:结算以 **METAR** 为准,趋势预测以 **MB** 为准。 +3. **数据权重优先级**:结算以 **METAR** 为准,趋势预测以 **MB** 为准(仅限伦敦)。 4. **地理风险评估**:重点关注提示中的“偏差会显著放大”警告(如安卡拉、伦敦)。 diff --git a/src/data_collection/weather_sources.py b/src/data_collection/weather_sources.py index 5accfbd6..4bfe57e2 100644 --- a/src/data_collection/weather_sources.py +++ b/src/data_collection/weather_sources.py @@ -791,14 +791,15 @@ class WeatherDataCollector: if mgm_data: results["mgm"] = mgm_data - # 获取 Meteoblue 预测 (公认最准) - mb_data = self.fetch_from_meteoblue( - lat, lon, - timezone_name=open_meteo.get("timezone", "UTC"), - use_fahrenheit=use_fahrenheit - ) - if mb_data: - results["meteoblue"] = mb_data + # 对伦敦,获取 Meteoblue 预测 (公认最准) + if city_lower == "london": + mb_data = self.fetch_from_meteoblue( + lat, lon, + timezone_name=open_meteo.get("timezone", "UTC"), + use_fahrenheit=use_fahrenheit + ) + if mb_data: + results["meteoblue"] = mb_data # 对美国城市,额外获取 NWS 高精预报 if use_fahrenheit: