Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

AI Assistant: Plain-Language Weather Guidance from METAR Data

Colorado State University

Overview

This AI Assistant notebook was built by Xue “Alice” Dong, Extension Specialist at Colorado State University. It takes structured METeorological Aerodrome Report (METAR) observations from Dynamical.org, and translates them into plain-language, actionable weather guidance for non-expert users, such as farmers and ranchers. This notebook walks through querying the data, visualizing its coverage, translating a station’s observations into guidance, and demonstrating how the assistant handles missing data.

A key design principle: when data is missing or sparse, the assistant communicates that limitation honestly rather than fabricating a confident answer. This reflects responsible-AI practice for non-expert audiences.

Loading...
Retrieved 7787 station records for 2026-01-01 00:00:00 UTC
Countries represented: 14
Loading...
{'station': 'DEN', 'name': 'DENVER INTNL ARPT', 'country': 'US', 'time': '2025-12-31 23:53:00+00:00', 'temp_f': np.float64(57.0), 'dewpoint_f': np.float64(15.0), 'wind_kt': np.float64(4.0), 'precip_in': np.float64(0.0)}
Weather guidance for DENVER INTNL ARPT (observed 2025-12-31 23:53:00+00:00):

• Temperature: 57°F. Mild conditions, generally favorable for outdoor field work.
• Wind: about 5 mph. Calm enough for spraying.
• Precipitation (last hour): 0.00 in. No recent precipitation recorded.

Note: This guidance is based only on the available observations above. Where a value is missing, no assumption has been made.

Visualizing the Raw Observation

Before translating the data into plain language, here is what a single station’s raw observation looks like. This is the kind of numeric output that is accurate but hard for a non-expert user to act on directly.

<Figure size 700x400 with 1 Axes>

Visualizing Data Coverage: Why Honesty Matters

This global snapshot returned thousands of station records, but they come from only 14 countries. The chart below shows how many stations report from each country at this hour, revealing that vast regions of the world are simply absent from this data source. The maintainers have confirmed the current ASOS Parquet source covers only a small number of countries (just 14 in this snapshot).

This is exactly why the AI Assistant is designed to flag missing data rather than fabricate it: if a user asks about a location with no coverage, a responsible AI assistant must say so, not invent a plausible-sounding answer.

<Figure size 800x450 with 1 Axes>
This hour's data covers 14 countries: AU, BR, CA, CN, DE, FR, GB, IN, JP, KR, MX, RU, US, ZA

Mapping the Coverage Gap

The bar chart above counts stations per country. Plotting those same stations on a world map makes the gap unmistakable: dense clusters over North America, with vast empty regions across Africa, South America, and much of Asia. For a non-expert user asking about weather in an uncovered region, there is simply no data to answer with, which is exactly why the AI Assistant must report gaps honestly.

<Figure size 1100x550 with 1 Axes>
done
Downloading file 'ne_110m_land.zip' from 'https://naciscdn.org/naturalearth/110m/physical/ne_110m_land.zip' to '/home/runner/.cache/geodatasets'.
<Figure size 1200x600 with 1 Axes>

Demonstration: Honest Handling of Missing and Partial Data

A core feature of this AI Assistant is that it never fabricates values. Below, the first example shows the response when no data is available; the second shows partial data (temperature present, wind missing), where the assistant explicitly flags what it cannot confirm.

No weather observations were found for this station and time. I can't provide guidance without data — please try a nearby station or a different time.

==================================================

Weather guidance for Example Ranch (observed 2026-01-01 00:00):

• Temperature: 28°F. Freezing conditions — protect sensitive crops and livestock water.
• Wind: not reported — do not assume calm conditions before spraying.
• Precipitation: not reported for this hour.

Note: This guidance is based only on the available observations above. Where a value is missing, no assumption has been made.

Summary and Next Step

This notebook demonstrates an AI Assistant layer that sits on top of the METAR query workflow and translates raw surface observations into plain-language, actionable guidance for non-expert users such as farmers and ranchers.

Key points:

  • From data to decisions. Raw fields like wind in knots or temperature in Fahrenheit are converted into practical advice (spraying conditions, frost risk, livestock considerations).

  • Honest handling of gaps. The AI Assistant never fabricates values. When a field is missing, it says so, important because this archive has uneven coverage. The data source covers only a small number of countries (this particular global snapshot contained just 14) and has frequent missing fields.

  • Reproducible and offline by design. The guidance uses a transparent rule-based approach with no external API calls, making the notebook fully reproducible in a shared environment. A future extension could pass the same structured observation to a large language model (LLM) for richer natural language, given secure credential handling.

This lowers the technical barrier to using observational weather data and shows how responsible-AI principles apply when outputs may inform real-world decisions.