---
title: "Global weather data from flying airplanes"
description: "Weather can be inferred from ADS-B airplane telemetry stored in ClickHouse by comparing air-relative and ground-relative measurements."
url: "https://swe.quest/articles/global-weather-data-from-flying-airplanes-cde04437bfc1d39f"
canonical: "https://clickhouse.com/blog/planes-weather"
source: "ClickHouse"
published: "2025-11-03"
difficulty: "medium"
kind: "How-to"
reading_minutes: 6
tags: ["analytics","sql","geospatial"]
---

# Global weather data from flying airplanes

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2025-11-03, 6 min read, How-to. Original: [https://clickhouse.com/blog/planes-weather](https://clickhouse.com/blog/planes-weather)

## Summary

Weather can be inferred from ADS-B airplane telemetry stored in ClickHouse by comparing air-relative and ground-relative measurements. The gap between barometric and geometric altitude maps pressure variation, and track minus true heading gives the crab (drift) angle. Law-of-cosines formulas on ground speed, true airspeed and drift angle yield wind speed and direction. Per-pixel aggregation uses a speed-weighted vector average of wind angles, converting to x/y and back with atan2, and the results are rendered with OKLCH hue via ClickHouse color functions. The resulting wind maps match real weather data, and a bonus section shows how to script and ffmpeg-process animated map videos.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [SQL](https://swe.quest/tags/sql.md) (Languages)
- [Maps & geospatial](https://swe.quest/tags/geospatial.md) (Domains)

## Prerequisites

- SQL basics ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))
- basic trigonometry

## Keywords

ClickHouse, ADS-B, OKLCH, adsb.exposed, ffmpeg

## Related posts

- [The day the sky emptied: rendering the FAA outage with ClickHouse FORMAT PNG](https://swe.quest/articles/the-day-the-sky-emptied-rendering-the-faa-outage-with-clickhouse-format-png-5517090c4ee462b9.md): ClickHouse · 2026-11-18 · Medium · 13 min read · Analytics & OLAP, SQL, Maps & geospatial, Databases
  ClickHouse's built-in FORMAT PNG output renders an animated map of the November 13, 2026 FAA outage directly from SQL, with no plotting library.
- [Announcing adsb.exposed - Interactive Visualization and Analytics on ADS-B Flight Data with ClickHouse](https://swe.quest/articles/announcing-adsb-exposed-interactive-visualization-and-analytics-on-ads-b-flight-c60e1aa85bc6d003.md): ClickHouse · 2024-04-24 · Medium · 12 min read · Analytics & OLAP, Maps & geospatial, SQL, Frontend
  adsb.exposed renders tens of billions of ADS-B flight records as interactive map tiles.
- [Birds in the cloud](https://swe.quest/articles/birds-in-the-cloud-c6890083099fe6e2.md): ClickHouse · 2025-06-04 · Medium · 6 min read · Analytics & OLAP, Maps & geospatial, SQL
  The Cornell Lab of Ornithology's eBird dataset of 1.5 billion bird observations (a 58 GB zip holding a 440 GB CSV) can be loaded into ClickHouse and visualized on the adsb.exposed interactive map. clickhouse-local queries the CSV inside the zip with schema inference.
- [Exploring Global Internet Speeds using Apache Iceberg and ClickHouse](https://swe.quest/articles/exploring-global-internet-speeds-using-apache-iceberg-and-clickhouse-2b3375957fd7714d.md): ClickHouse · 2024-02-08 · Medium · 25 min read · Analytics & OLAP, Maps & geospatial, SQL, Data pipelines
  ClickHouse's iceberg table function can query the Ookla global internet-speed dataset (128M rows) directly from S3.
- [Visualizing Data with ClickHouse - Part 1 - Grafana](https://swe.quest/articles/visualizing-data-with-clickhouse-part-1-grafana-6207d162d247fcd5.md): ClickHouse · 2022-10-07 · Medium · 5 min read · Observability, Analytics & OLAP, SQL
  Grafana connects to ClickHouse through the official ClickHouse plugin (version 2.x adds JSON and HTTP support) by creating a datasource and building dashboard panels with a query builder or raw SQL.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
