Skip to content

Preserve international alert titles, language, and attribution #90

Description

@shindgew

Summary

International weather alerts are currently rendered with truncated or incorrect titles, mislabeled message languages, and China-specific metadata.

A live Coastal Flood Advisory returned by QWeather for Cupertino, California demonstrates the problem:

Coastal Flood Advisory issued August 9 at 9:43PM PDT until August 13 at 2:00AM PDT by NWS San Francisco CA

The deployed WeatherKit endpoint transforms it into:

d August 9 at 9:43PM PDT until August 13 at 2:00AM PDT by NWS San Francisco CA

The intended card title is:

Coastal Flood Advisory

Reproduction

Using a current international alert location:

latitude: 37.3230
longitude: -122.0322
language: en-US

Request:

https://weatherkit.pages.dev/api/v1/weatherAlerts?lang=en-US&ids=37.323,-122.0322

Representative deployed response:

{
  "description": "d August 9 at 9:43PM PDT until August 13 at 2:00AM PDT by NWS San Francisco CA",
  "severity": "minor",
  "urgency": "expected",
  "certainty": "likely",
  "source": "NWS San Francisco CA",
  "messages": [
    {
      "language": "en-US",
      "text": "* WHAT...Up to 1.6 ft of inundation above ground level is possible in low-lying areas near shorelines and tidal waterways..."
    }
  ]
}

The source QWeather record contains:

{
  "senderName": "NWS San Francisco CA",
  "eventType": {
    "name": "Coastal Flood Advisory"
  },
  "urgency": "expected",
  "severity": "minor",
  "certainty": "likely",
  "headline": "Coastal Flood Advisory issued August 9 at 9:43PM PDT until August 13 at 2:00AM PDT by NWS San Francisco CA"
}

At the time of testing, QWeather returned this alert for the Cupertino coordinates while the official NWS point query returned no active alert for the exact point:

https://api.weather.gov/alerts/active?point=37.323,-122.0322

The Cupertino case is therefore a reliable reproduction of the title-normalization defect while the alert remains active, but it may also indicate that QWeather matches a broader coastal region to the inland coordinate. Geographic matching should be investigated separately from title parsing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions