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
| -- Select all pubs in the Great Britain and calculate how many pubs are in a 5 km radius around each pub. | |
| WITH pubs AS ( | |
| -- irish_pub....................................eat_and_drink > bar > irish_pub | |
| -- pub..........................................eat_and_drink > bar > pub | |
| SELECT | |
| id, | |
| JSON_EXTRACT_PATH_TEXT(names, 'primary') as name, | |
| JSON_EXTRACT_PATH_TEXT(categories, 'primary') as category, | |
| 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
| WITH division_ids AS ( | |
| SELECT | |
| id, | |
| CASE | |
| WHEN country = 'DE' THEN 'Berlin' | |
| WHEN country = 'FR' THEN 'Paris' | |
| ELSE 'London' | |
| END as city_name | |
| FROM | |
| OVERTURE_MAPS__DIVISIONS.CARTO.DIVISION |
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"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>Trip animation – sequences (deck.gl + MapLibre)</title> | |
| <meta name="viewport" content="width=device-width,initial-scale=1" /> | |
| <link href="https://unpkg.com/[email protected]/dist/maplibre-gl.css" rel="stylesheet" /> | |
| <!-- <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" /> --> | |
| <script src="https://unpkg.com/[email protected]/dist/maplibre-gl.js"></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 multiprocessing | |
| from pathlib import Path | |
| from queue import Queue | |
| from time import sleep | |
| from typing import Callable | |
| import pyarrow as pa | |
| import pyarrow.parquet as pq | |
| from tqdm import tqdm |