---
title: "Visualizing Foursquare places with ClickHouse"
description: "The Foursquare open places dataset (about 100 million records) loads straight from S3 Parquet into ClickHouse in 42 seconds and 11 GB."
url: "https://swe.quest/articles/visualizing-foursquare-places-with-clickhouse-7a2e9fe18ad158f7"
canonical: "https://clickhouse.com/blog/fsq"
source: "ClickHouse"
published: "2025-05-08"
difficulty: "medium"
kind: "How-to"
reading_minutes: 5
tags: ["geospatial","analytics","sql"]
---

# Visualizing Foursquare places with ClickHouse

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2025-05-08, 5 min read, How-to. Original: [https://clickhouse.com/blog/fsq](https://clickhouse.com/blog/fsq)

## Summary

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.

Written by swe.quest, not by the author.

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

## Topics

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

## Prerequisites

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

## Keywords

ClickHouse, Foursquare, clickhouse-local, Web Mercator, Morton encoding, adsb.exposed, Kepler.gl, H3

## Related posts

- [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.
- [Analyzing Hugging Face datasets with ClickHouse](https://swe.quest/articles/analyzing-hugging-face-datasets-with-clickhouse-12e5d1b0f22de93c.md): ClickHouse · 2023-08-29 · Medium · 28 min read · Analytics & OLAP, SQL, Machine learning
  Hugging Face's Datasets Server automatically converts every dataset to Parquet and exposes the file URLs through a REST endpoint, so clickhouse-local can query any dataset with plain SQL via the url function and URL table engine.
- [Better Analytics at Scale with Trackingplan and ClickHouse](https://swe.quest/articles/better-analytics-at-scale-with-trackingplan-and-clickhouse-fe79c2efef76743f.md): ClickHouse · 2024-01-24 · Medium · 6 min read · Analytics & OLAP, Databases, Multi-tenancy, Cloud platforms
  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.

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)
