Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

ClickHouse 12 min read Case study mediumAdept

Announcing adsb.exposed - Interactive Visualization and Analytics on ADS-B Flight Data with ClickHouse

adsb.exposed renders tens of billions of ADS-B flight records as interactive map tiles. A parameterized ClickHouse SQL query computes the RGBA value of every pixel in each 1024x1024 tile on the fly. The single-page Leaflet frontend fetches raw RowBinary bitmaps over HTTP with ZSTD compression, which compresses better than PNG, and loads progressively from 1% and 10% sampled tables, built with materialized views, up to the full data. The MergeTree table stores Web-Mercator coordinates as UInt32 materialized columns and is ordered by a Morton curve with minmax indexes, so each tile query reads only the data it needs. The service runs on a chaos-tested ClickHouse Cloud staging environment, with requests raced against a backup service.

Assumes: SQL aggregationWeb Mercator map tilesClickHouse MergeTree basics

Related posts

  • Visualizing Foursquare places with ClickHouse

    ClickHouse mediumAdept

    The Foursquare open places dataset (about 100 million records) loads straight from S3 Parquet into ClickHouse in 42 seconds and 11 GB. The table stores Web Mercator coordinates as materialized UInt32 columns, is ordered by a Morton (Z-order) space-filling curve, and has minmax indices so map tiles can be queried fast. The existing adsb.exposed air-traffic visualizer was reused with a 48-line change to render pixel-level tiles in the browser. Compared with Foursquare Studio's H3 hexagons, Kepler.gl and DuckDB-based maps, it gives higher resolution and smoother interactivity, but does not correct point density for latitude.

  • The day the sky emptied: rendering the FAA outage with ClickHouse FORMAT PNG

    ClickHouse mediumAdept

    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. A query over the 380-billion-row adsb.exposed table pre-aggregates positions into per-frame, per-pixel rows using Morton-ordered Web Mercator coordinates and bit shifts. A second query paints four layers (a day-long ghost, the aircraft, a timeline and bitmap-font text) via ARRAY JOIN and the painter's algorithm, producing about 130 million pixel rows and 288 frames in 31 seconds. The data shows cruising-altitude traffic falling to under a tenth of its early-afternoon level by 20:00 ET; the post also covers float clamping, streaming animation mode to cut memory from 1.2 GB, and palette conversion shrinking the APNG from 150 MB to 25 MB.

  • Birds in the cloud

    ClickHouse mediumAdept

    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. The target table drops Nullable, uses LowCardinality for low-distinct columns, and derives a date from EPHEMERAL year/month/day columns. Materialized Web Mercator UInt32 coordinates are ordered by a Morton space-filling curve with minmax indexes for fast tile queries, and the stored table compresses to 16.8 GB, about 11 bytes per row.

  • Exploring Global Internet Speeds using Apache Iceberg and ClickHouse

    ClickHouse mediumAdept

    ClickHouse's iceberg table function can query the Ookla global internet-speed dataset (128M rows) directly from S3. The schema comes from Iceberg metadata, and the walkthrough includes aggregations such as download-speed quantiles. It notes current gaps: no v2 row-level deletes or schema evolution, no partition pruning, S3-only support, and no use of sort order for file skipping. The data is then loaded into a MergeTree table, WKT tiles are parsed into Ring types, and polygon centroids are computed with shoelace-formula SQL UDFs built on arrayFold. The polygons are rendered as SVG maps using only SQL, with h3 indexes, polygon dictionaries, Mercator projection and color interpolation.

  • Better Analytics at Scale with Trackingplan and ClickHouse

    ClickHouse mediumAdept

    Trackingplan, which tests web, mobile and backend analytics by sampling events sent to tools like Google Analytics and Segment, moved from DynamoDB with PySpark-precomputed statistics to ClickHouse Cloud so it could answer unforeseen ad hoc queries on raw data. After evaluating Snowflake, BigQuery, Redshift and Athena, the team found ClickHouse 20x faster than Athena and cheaper than the pay-per-scan options for a continuous query workload. Materialized views, backfilled via INSERT INTO SELECT, precompute the common dashboard statistics. Customer-ID ordering keys handle multi-tenancy and ad hoc queries across about 30 billion rows growing 400% per year, and Map/Array types hold dynamic properties.

The quest for software engineering knowledge.

Look:
Layout: