What does it look like if you switch lat lon for Germany?
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
| # /// script | |
| # requires-python = ">=3.14" | |
| # dependencies = [ | |
| # "pandas", | |
| # "requests", | |
| # "openpyxl" | |
| # ] | |
| # /// |
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
| gh repo create new_project_name --public --source=. --remote=origin --push |
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
| <!doctype html> | |
| <html lang="en" class="bg-slate-50"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <title>Guest List Manager</title> | |
| <!-- 1. Tailwind CSS via CDN --> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <!-- 2. Supabase Client via CDN --> | |
| <script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script> |
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
| import duckdb | |
| con = duckdb.connect() | |
| con.execute("INSTALL spatial; LOAD spatial;") | |
| input_path = '30M_sample_index.parquet' | |
| output_path = '30M_sample_index_with_lat_lon.parquet' | |
| # Use ST_X and ST_Y directly on the 'geometry' column | |
| con.execute(f""" |
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
| #!/usr/bin/env bash | |
| # | |
| # duckdb_boundary.sh — run DuckDB spatial queries by region | |
| # | |
| # Usage: | |
| # ./duckdb_boundary.sh --query "Sicilia" [--format PARQUET|CSV|JSON] | |
| # | |
| # Description: | |
| # - Ensures DuckDB 'spatial' extension is installed and loaded | |
| # - Reads OpenStreetMap boundary data (remote parquet) |
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
| COPY ( | |
| SELECT * | |
| FROM 'https://data.openstreetmap.us/layercake/boundaries.parquet' | |
| WHERE list_contains("tags"['name'], 'Sicilia') | |
| OR list_contains("tags"['names']['en'], 'Sicily') | |
| ) TO 'sicily_boundaries.parquet' (FORMAT 'PARQUET'); |
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
| osmium extract -b 12.2,36.5,15.8,38.8 italy.osm.pbf -o sicily.osm.pbf --overwrite; | |
| osmium tags-filter sicily.osm.pbf w/highway -o sicily_streets.osm.pbf --overwrite; | |
| ogr2ogr -f Parquet -oo PRELUDE_STATEMENTS="INSTALL spatial; LOAD spatial;" \ | |
| sicily_streets.parquet sicily_streets.osm.pbf lines; |
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
| { | |
| "version": 8, | |
| "sources": { | |
| "arcgisonline": { | |
| "type": "raster", | |
| "tiles": [ | |
| "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}" | |
| ], | |
| "tileSize": 256, | |
| "maxzoom": 18, |
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
| { | |
| "version": 8, | |
| "sources": { | |
| "osm": { | |
| "type": "raster", | |
| "tiles": ["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"], | |
| "tileSize": 256, | |
| "attribution": "<a href=\"https://www.openstreetmap.org/copyright\">© OpenStreetMap Contributors</a>", | |
| "maxzoom": 19 | |
| }, |
NewerOlder