TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Foursquare Open Source Places: A new foundational dataset

3 pointsby jjwiseman6 months ago

1 comment

jjwiseman6 months ago
This data is about 10 GB, available on S3, and is really easy to query from duckdb. If you have fast internet you can even do a trial query without downloading anything:<p><pre><code> SELECT COUNT(*) FROM &#x27;s3:&#x2F;&#x2F;fsq-os-places-us-east-1&#x2F;release&#x2F;dt=2024-11-19&#x2F;places&#x2F;parquet&#x2F;places-*.snappy.parquet&#x27; WHERE name = &#x27;Wendy&#x27;&#x27;s&#x27;; </code></pre> This takes less than a minute with fast home internet.<p>Curious what parts of the planet have the highest density of fast food restaurants? Download the files so you have local copies, then make sure you have the H3 extension installed:<p><pre><code> INSTALL h3 FROM community; LOAD h3; </code></pre> Now:<p><pre><code> SELECT printf(&#x27;%x&#x27;, cell) as h3, COUNT(*) AS count FROM ( SELECT name, H3_LATLNG_TO_CELL(latitude, longitude, 4) AS cell FROM &#x27;places-*.snappy.parquet&#x27; WHERE array_contains(fsq_category_labels, &#x27;Dining and Drinking &gt; Restaurant &gt; Fast Food Restaurant&#x27;) ) GROUP BY cell ORDER BY count DESC; </code></pre> The top H3 cell will have ID 841ec91ffffffff; Go to <a href="https:&#x2F;&#x2F;observablehq.com&#x2F;@nrabinowitz&#x2F;h3-index-inspector" rel="nofollow">https:&#x2F;&#x2F;observablehq.com&#x2F;@nrabinowitz&#x2F;h3-index-inspector</a> and paste it in and you&#x27;ll see that it&#x27;s… Istanbul! Write another query to find out what the most common fast food places are in Istanbul… (Burger King and McDonald&#x27;s, and it&#x27;s not even close).<p>Install the spatial extension and you can find all venues within 100 meters of you. Find all the Taco Bell&#x2F;Pizza Hut combos. Go crazy.<p>[Also see <a href="https:&#x2F;&#x2F;simonwillison.net&#x2F;2024&#x2F;Nov&#x2F;20&#x2F;foursquare-open-source-places&#x2F;" rel="nofollow">https:&#x2F;&#x2F;simonwillison.net&#x2F;2024&#x2F;Nov&#x2F;20&#x2F;foursquare-open-source...</a>]