{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Postcode Boundary Quality — Bank Station (1km radius)\n", "\n", "Compares postcode boundaries **before** and **after** greenspace/water subtraction." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "execution": { "iopub.execute_input": "2026-02-10T21:00:00.764910Z", "iopub.status.busy": "2026-02-10T21:00:00.764845Z", "iopub.status.idle": "2026-02-10T21:00:04.849684Z", "shell.execute_reply": "2026-02-10T21:00:04.849373Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Without greenspace: 1239 postcodes\n", "With greenspace: 1239 postcodes\n" ] } ], "source": [ "import json\n", "from pathlib import Path\n", "\n", "import folium\n", "from folium.plugins import SideBySideLayers\n", "\n", "DATA = Path(\"/tmp/bank_test\")\n", "\n", "with open(DATA / \"bank_no_greenspace.geojson\") as f:\n", " no_green = json.load(f)\n", "with open(DATA / \"bank_with_greenspace.geojson\") as f:\n", " with_green = json.load(f)\n", "\n", "print(f\"Without greenspace: {len(no_green['features'])} postcodes\")\n", "print(f\"With greenspace: {len(with_green['features'])} postcodes\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Side-by-side comparison\n", "\n", "Drag the slider left/right to compare. **Left** = original, **Right** = greenspace subtracted." ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "execution": { "iopub.execute_input": "2026-02-10T21:00:04.879270Z", "iopub.status.busy": "2026-02-10T21:00:04.879058Z", "iopub.status.idle": "2026-02-10T21:00:05.027225Z", "shell.execute_reply": "2026-02-10T21:00:05.026811Z" } }, "outputs": [ { "data": { "text/html": [ "