Last active
May 19, 2024 22:43
-
-
Save marklit/c9cad0f535a9c8300bca130e0222d520 to your computer and use it in GitHub Desktop.
Pull H3s for Overture's Places Dataset for May 2024
This file contains 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
COPY ( | |
WITH a AS ( | |
SELECT h3_cell_to_parent(h3_string_to_h3(SUBSTR(id, 0, 17)), 2) h3_2, | |
COUNT(*) num_recs | |
FROM read_parquet('s3://overturemaps-us-west-2/release/2024-05-16-beta.0/theme=places/type=place/*.parquet', | |
filename=true, | |
hive_partitioning=1) | |
GROUP BY 1 | |
) | |
SELECT h3_cell_to_boundary_wkt(h3_2), | |
num_recs | |
FROM a | |
WHERE h3_cell_to_lng(h3_2) > -175 | |
AND h3_cell_to_lng(h3_2) < 175 | |
) TO 'places.2024-05-16.v2.csv'; |
Author
marklit
commented
May 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment