Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.
Plot.plot({
width:1200,
facet:
{
data:data,
//x: "STATE",
//x: "STATE",
},
//width: 420,
height:400,
inset:-8,
marginLeft:60,
//grid: true,
color:{
//legend: true,
range:["black","yellow"]
},
x:
{
// domain: [0,5000]
},
y:
{
//domain: [0,10000000],
clamp:true,
//range: [0,10000000],
},
marks:[
// Plot.barY(data, Plot.groupX({
// y: "sum"}, {
// y: "hu19",
// x: "STATE",
// sort: {x: "y"},
// })),
// Plot.barY(data, Plot.groupX({
// y: "sum"}, {
// y: "hu50",
// x: "STATE",
// sort: {x: "y"},
// fill: "red",
// })),
// Plot.barY(data, Plot.groupX({
// y: "sum"}, {
// y: "hu40",
// x: "STATE",
// sort: {x: "y"},
// fill: "yellow",
// })),
Plot.areaY(data,Plot.stackY({offset:"wiggle",
x:"STATE",
y:"hu19",
//fill: "industry"}
)),
]
})
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.
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.