Public
Edited
May 24, 2023
Insert cell
Insert cell
{
const names = ["Hong Sheng", "Jesslyn", "Eka", "Vicent", "Zhan Heng", "Zsigmond", "Wei Lin", "Claire", "Zu Ning", "Bhavya", "Charlotte", "Hannah", "Ryan", "Joseph", "Charlene", "Yi Zhe", "Nikita"];
const planningArea = ["Sembawang + Woodlands", "Yishun + Mandai", "Seletar + Sengkang", "Hougang + Serangoon","Sungei Kadut + Lim Chu Kang","Central Catchment + AMK","Toa Payoh + Novena","CCK + Bukit Batok + Bukit Panjang","Tuas + Boon Lay + Jurong East","Clementi + Queenstown","Punggol + Pasir Ris","Bukit Merah + Outram","Western Water Catchment + Jurong West","Bedok","Southern islands","Bukit Timah + Tanglin","Newton + Orchard + River Valley + Singapore River + Museum","Marina South + Marina East + Downtown Core","Rochor + Kallang","Marine Parade + Geylang","Changi + Tampines"];
const order = d3.shuffle(d3.range(planningArea.length));
return {
names: d3.permute(names, order),
planningArea
};
}
Insert cell
d3 = require("d3-array@2", "d3-random@2")
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