Skip to content

Instantly share code, notes, and snippets.

View jj0hns0n's full-sized avatar

Jeffrey Johnson jj0hns0n

View GitHub Profile
{
"city": "Budapest",
"country": "Hungary",
"year": 2025,
"safest_neighborhoods": [
{
"name": "District I (Castle District)",
"description": "The Castle District is known for its historical significance and well-preserved medieval architecture. It is a popular tourist destination, which contributes to a strong police presence and low crime rates. The area is well-lit and has a community-oriented atmosphere, making it one of the safest places in Budapest.",
"source": "lonelyplanet.com",
"date": "N/A"
{
"city": "Budapest",
"country": "Hungary",
"year": 2025,
"safest_neighborhoods": [
{
"name": "Inner Ferencváros (Belső Ferencváros)",
"description": "This area, encompassing Kálvin tér, Corvin-negyed, and the vicinity of Semmelweis University, is known for its safety, modern infrastructure, and vibrant atmosphere. It's popular among students and young professionals.",
"source": "https://www.reddit.com/r/budapest/comments/mo8wwn/what_do_you_think_about_living_in_the_9th_district/"
},
{
"city": "Budapest",
"country": "Hungary",
"year": 2025,
"safest_neighborhoods": [
{
"name": "Csepel-Királyerdő",
"description": "A residential area in District XXI known for its family-friendly environment and relatively low crime rates.",
"source": "N/A"
},
{
"table": "h3_l8_union_cities_urban",
"description": "Hex-level spatial dataset (H3 resolution 8) combining administrative, urban, prosperity, safety, and structure/property data.",
"fields": {
"spatial_identity": [
{
"name": "h3",
"type": "text",
"description": "H3 index at resolution 8 (~0.74 km²)"
},
# H3 Cell Report: Oceanside, NY (`882a103169fffff`)
## 📍 1. Spatial Identity
| Field | Value | Explanation |
|-------|-------|-------------|
| `h3` | `882a103169fffff` | Unique H3 index at resolution 8 (approx. 0.74 km² hex). |
| `geom` | GeoJSON Polygon | Boundary of the H3 cell (EPSG:4326). |
| `geom_centroid` | GeoJSON Point | Center of the H3 cell geometry. |
WITH weights AS (
SELECT
0.18 AS w_adm0_crime,
0.15 AS w_adm1_violent,
0.12 AS w_adm1_property,
0.05 AS w_structure,
0.05 AS w_population,
0.08 AS w_property_value
),
base_and_range AS (
WITH weights AS (
SELECT
0.8 AS w_structure,
0.4 AS w_population
),
base AS (
SELECT
100.0 - (
(AVG(DISTINCT legatum_prosperity_score) +
AVG(DISTINCT legatum_safety_and_security) +
WITH weights AS (
SELECT
0.24 AS w_adm0_crime,
0.18 AS w_adm1_violent,
0.12 AS w_adm1_property,
0.10 AS w_structure,
0.04 AS w_population,
0.08 AS w_property_value
),
base_and_range AS (