Last active
November 7, 2025 17:42
-
-
Save mvexel/fbd6e20b5edaaaddf30480c216f82039 to your computer and use it in GitHub Desktop.
overture places counts bucketed by confidence
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| D SELECT | |
| confidence_bucket, | |
| place_count, | |
| ROUND(100.0 * place_count / SUM(place_count) OVER (), 2) AS percentage, | |
| ROUND(100.0 * SUM(place_count) OVER (ORDER BY confidence_bucket DESC) / SUM(place_count) OVER (), 2) AS pct_at_or_above | |
| FROM ( | |
| SELECT | |
| FLOOR(confidence * 10) / 10 AS confidence_bucket, | |
| COUNT(*) AS place_count | |
| FROM read_parquet('s3://overturemaps-us-west-2/release/2025-10-22.0/theme=places/type=place/*') | |
| WHERE confidence IS NOT NULL | |
| AND addresses[1].country = 'US' | |
| GROUP BY confidence_bucket | |
| ) | |
| ORDER BY confidence_bucket DESC; | |
| ┌───────────────────┬─────────────┬────────────┬─────────────────┐ | |
| │ confidence_bucket │ place_count │ percentage │ pct_at_or_above │ | |
| │ double │ int64 │ double │ double │ | |
| ├───────────────────┼─────────────┼────────────┼─────────────────┤ | |
| │ 1.0 │ 709 │ 0.0 │ 0.0 │ | |
| │ 0.9 │ 8141037 │ 53.55 │ 53.55 │ | |
| │ 0.8 │ 150010 │ 0.99 │ 54.54 │ | |
| │ 0.7 │ 3889141 │ 25.58 │ 80.12 │ | |
| │ 0.6 │ 1135877 │ 7.47 │ 87.59 │ | |
| │ 0.5 │ 276980 │ 1.82 │ 89.41 │ | |
| │ 0.4 │ 2453 │ 0.02 │ 89.43 │ | |
| │ 0.3 │ 1599692 │ 10.52 │ 99.95 │ | |
| │ 0.2 │ 2475 │ 0.02 │ 99.97 │ | |
| │ 0.1 │ 3022 │ 0.02 │ 99.99 │ | |
| │ 0.0 │ 1917 │ 0.01 │ 100.0 │ | |
| ├───────────────────┴─────────────┴────────────┴─────────────────┤ | |
| │ 11 rows 4 columns │ | |
| └────────────────────────────────────────────────────────────────┘ |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For world: