Expose station network coverage and settlement station details

This commit is contained in:
2569718930@qq.com
2026-04-06 07:21:59 +08:00
parent e4a5c4c8d5
commit bdc300bdd2
15 changed files with 1317 additions and 33 deletions
+67 -12
View File
@@ -312,10 +312,20 @@ const CITY_SPECIFIC_SOURCES: Record<string, OfficialSourceLink[]> = {
],
shanghai: [
{
label: "中国天气网",
href: "https://www.weather.com.cn/",
label: "NMC 全国主要机场天气预报",
href: "https://www.nmc.cn/publish/weather_forecast/swssr.htm",
kind: "agency",
},
{
label: "NMC 浦东天气",
href: "https://m.nmc.cn/publish/forecast/ASH/pudong.html",
kind: "agency",
},
{
label: "上海浦东国际机场",
href: "https://www.shanghai-airport.com/",
kind: "airport",
},
{
label: "ZSPD METAR",
href: "https://aviationweather.gov/data/metar/?id=ZSPD&decoded=1&taf=1",
@@ -504,10 +514,20 @@ const CITY_SPECIFIC_SOURCES: Record<string, OfficialSourceLink[]> = {
],
chengdu: [
{
label: "中国天气网",
href: "https://www.weather.com.cn/",
label: "NMC 全国主要机场天气预报",
href: "https://www.nmc.cn/publish/weather_forecast/swssr.htm",
kind: "agency",
},
{
label: "NMC 双流天气",
href: "https://m.nmc.cn/publish/forecast/ASC/shuangliu.html",
kind: "agency",
},
{
label: "成都双流国际机场",
href: "https://www.cdairport.com/",
kind: "airport",
},
{
label: "ZUUU METAR",
href: "https://aviationweather.gov/data/metar/?id=ZUUU&decoded=1&taf=1",
@@ -516,10 +536,20 @@ const CITY_SPECIFIC_SOURCES: Record<string, OfficialSourceLink[]> = {
],
chongqing: [
{
label: "中国天气网",
href: "https://www.weather.com.cn/",
label: "NMC 全国主要机场天气预报",
href: "https://www.nmc.cn/publish/weather_forecast/swssr.htm",
kind: "agency",
},
{
label: "NMC 渝北天气",
href: "https://m.nmc.cn/publish/forecast/ACQ/yubei.html",
kind: "agency",
},
{
label: "重庆江北国际机场",
href: "https://www.cqa.cn/",
kind: "airport",
},
{
label: "ZUCK METAR",
href: "https://aviationweather.gov/data/metar/?id=ZUCK&decoded=1&taf=1",
@@ -528,8 +558,13 @@ const CITY_SPECIFIC_SOURCES: Record<string, OfficialSourceLink[]> = {
],
shenzhen: [
{
label: "Wunderground ZGSZ",
href: "https://www.wunderground.com/history/daily/cn/shenzhen/ZGSZ",
label: "NMC 全国主要机场天气预报",
href: "https://www.nmc.cn/publish/weather_forecast/swssr.htm",
kind: "agency",
},
{
label: "NMC 深圳天气",
href: "https://m.nmc.cn/publish/forecast/AGD/shenzhen.html",
kind: "agency",
},
{
@@ -630,10 +665,20 @@ const CITY_SPECIFIC_SOURCES: Record<string, OfficialSourceLink[]> = {
],
beijing: [
{
label: "中国天气网",
href: "https://www.weather.com.cn/",
label: "NMC 全国主要机场天气预报",
href: "https://www.nmc.cn/publish/weather_forecast/swssr.htm",
kind: "agency",
},
{
label: "NMC 顺义天气",
href: "https://m.nmc.cn/publish/forecast/ABJ/shunyi.html",
kind: "agency",
},
{
label: "北京首都国际机场",
href: "https://www.bcia.com.cn/",
kind: "airport",
},
{
label: "ZBAA METAR",
href: "https://aviationweather.gov/data/metar/?id=ZBAA&decoded=1&taf=1",
@@ -642,10 +687,20 @@ const CITY_SPECIFIC_SOURCES: Record<string, OfficialSourceLink[]> = {
],
wuhan: [
{
label: "中国天气网",
href: "https://www.weather.com.cn/",
label: "NMC 全国主要机场天气预报",
href: "https://www.nmc.cn/publish/weather_forecast/swssr.htm",
kind: "agency",
},
{
label: "NMC 武汉天气",
href: "https://m.nmc.cn/publish/forecast/AHB/wuhan.html",
kind: "agency",
},
{
label: "武汉天河国际机场",
href: "https://www.whairport.com/",
kind: "airport",
},
{
label: "ZHHH METAR",
href: "https://aviationweather.gov/data/metar/?id=ZHHH&decoded=1&taf=1",
+61
View File
@@ -18,6 +18,10 @@ export interface CityListItem {
is_major?: boolean;
settlement_source?: string;
settlement_source_label?: string;
settlement_station_code?: string;
settlement_station_label?: string;
network_provider?: string;
network_provider_label?: string;
}
export interface ProbabilityBucket {
@@ -90,17 +94,29 @@ export interface AirportCurrentConditions {
wx_desc?: string | null;
raw_metar?: string | null;
source_label?: string | null;
station_code?: string | null;
station_label?: string | null;
is_airport_station?: boolean;
is_official?: boolean;
is_settlement_anchor?: boolean;
}
export interface NearbyStation {
name?: string;
icao?: string;
station_code?: string | null;
station_label?: string | null;
lat: number;
lon: number;
temp: number | null;
wind_dir?: number | null;
wind_speed?: number | null;
wind_speed_kt?: number | null;
source_code?: string | null;
source_label?: string | null;
is_official?: boolean;
is_airport_station?: boolean;
is_settlement_anchor?: boolean;
}
export interface HourlyTrendPoint {
@@ -316,10 +332,49 @@ export interface CityDetail {
local_date: string;
risk: DashboardRisk;
current: CurrentConditions;
settlement_station?: {
provider_code?: string | null;
settlement_source?: string | null;
settlement_station_code?: string | null;
settlement_station_label?: string | null;
airport_code?: string | null;
airport_name?: string | null;
is_airport_anchor?: boolean;
is_official_station_anchor?: boolean;
};
airport_current?: AirportCurrentConditions;
airport_primary?: AirportCurrentConditions;
airport_primary_today_obs?: Array<{
time?: string;
temp?: number | null;
}>;
mgm?: MgmData;
mgm_nearby?: NearbyStation[];
official_nearby?: NearbyStation[];
nearby_source?: string;
official_network_source?: string;
official_network_status?: {
provider_code?: string | null;
provider_label?: string | null;
available?: boolean;
mode?: string | null;
row_count?: number | null;
};
network_lead_signal?: {
available?: boolean;
delta?: number | null;
leader_station_code?: string | null;
leader_station_label?: string | null;
leader_temp?: number | null;
};
network_spread_signal?: {
available?: boolean;
spread?: number | null;
hottest_station_code?: string | null;
coolest_station_code?: string | null;
};
center_station_candidate?: NearbyStation | null;
airport_vs_network_delta?: number | null;
forecast?: ForecastData;
multi_model?: Record<string, number | null>;
deb?: DebForecast;
@@ -419,6 +474,12 @@ export interface HistoryPoint {
mu?: number | null;
mgm?: number | null;
forecasts?: Record<string, number | null>;
settlement_source?: string | null;
settlement_station_code?: string | null;
settlement_station_label?: string | null;
truth_version?: string | null;
updated_by?: string | null;
truth_updated_at?: number | null;
actual_peak_time?: string | null;
deb_at_peak_minus_12h?: number | null;
deb_at_peak_minus_12h_time?: string | null;
+5 -1
View File
@@ -828,7 +828,11 @@ function distanceKm(
}
export function pickMapNearbyStations(detail: CityDetail) {
const stations = Array.isArray(detail.mgm_nearby) ? detail.mgm_nearby : [];
const stations = Array.isArray(detail.official_nearby)
? detail.official_nearby
: Array.isArray(detail.mgm_nearby)
? detail.mgm_nearby
: [];
const city = String(detail.name || detail.display_name || "")
.trim()
.toLowerCase();
+28
View File
@@ -328,6 +328,16 @@ export interface CityDetail {
local_date: string;
temp_symbol: string;
current_temp: number | null;
settlement_station?: {
provider_code?: string | null;
settlement_source?: string | null;
settlement_station_code?: string | null;
settlement_station_label?: string | null;
airport_code?: string | null;
airport_name?: string | null;
is_airport_anchor?: boolean;
is_official_station_anchor?: boolean;
};
deb_prediction: number | null;
risk_level: string;
risk_warning: string;
@@ -340,6 +350,15 @@ export interface CityDetail {
mgm: any;
mgm_nearby: any[];
nearby_source?: string;
airport_primary?: any;
airport_primary_today_obs?: any[];
official_nearby?: any[];
official_network_source?: string;
official_network_status?: any;
network_lead_signal?: any;
network_spread_signal?: any;
center_station_candidate?: any;
airport_vs_network_delta?: number | null;
};
timeseries: {
metar_recent_obs: any[];
@@ -356,6 +375,15 @@ export interface CityDetail {
};
market_scan: MarketScan;
risk: any;
settlement_station?: any;
airport_primary?: any;
official_nearby?: any[];
official_network_source?: string;
official_network_status?: any;
network_lead_signal?: any;
network_spread_signal?: any;
center_station_candidate?: any;
airport_vs_network_delta?: number | null;
ai_analysis: string;
errors: Record<string, string>;
}