Published
Edited
May 12, 2022
Insert cell
Insert cell
data = FileAttachment("S_Asia_Cities_Max_WB_April_2_TableToExcel.csv").csv({typed: true})
Insert cell
Plot.plot({
width: width,
inset: 8,
marginLeft: 60,
grid: true,
color: {
type: "diverging",
//scheme: "BuRd",
range: ["blue","white","red"],
pivot: 0,
//interpolate: "hcl"
//legend: true,
},
y:
{
//domain: [100000,1000000],
clamp: true,
tickSize: 0,
},
x:
{
grid: false,
},
marks: [
Plot.dot(data, {
x: d=>d.X*1,
y: "WBANOMAPR",
fill: "WBANOMAPR",
r: "pop_max",
stroke: "black",
strokeWidth: 0.5,
}),
Plot.text(data, {
x: d=>d.X*1,
y: "WBANOMAPR",
text: "NAME",
dy: -10,
dx: 10,
filter: d=>d.megacity === 1,
//fill: "WBANOMAPR",
//r: "pop_max",
//stroke: "black",
//strokeWidth: 0.5,
}),
Plot.ruleY(data,{y:[0],stroke:"black",}),
]
})
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