Public
Edited
Feb 20
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
wards = FileAttachment("england_cmwd_2011.json").json()
Insert cell
Insert cell
Insert cell
turf = require("@turf/turf")
Insert cell
Insert cell
import { pointsToGrid } from "@jwolondon/gridmap-allocation"
Insert cell
Insert cell
Insert cell
import { createShapeLookup } from "3f4a48a6ce9cfbae"
Insert cell
import { convertGridCsvToGeoJson } from "3f4a48a6ce9cfbae"
Insert cell
wardGrid = convertGridCsvToGeoJson(gridCSV, turf.bbox(wards))
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
wardLookup = createShapeLookup(wards, "name")
Insert cell
wardGridLookup = createShapeLookup(wardGrid)
Insert cell
import { inSituMorphMouse } from "06277b2f99751287";

Insert cell
import { prepareGeoJsonForMorphingLib } from "3f4a48a6ce9cfbae"
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
flubbers = createFlubbers(wardLookup, wardGridLookup)
Insert cell
import { tweenShapeLookup } from "3f4a48a6ce9cfbae"
Insert cell
tweenLookup = tweenShapeLookup(range, flubbers)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more