Published
Edited
Oct 4, 2022
Insert cell
# GameScore Mean vs Std Dev - Pitchers w/ 20+ starts in 2022
Insert cell
viewof highlight = Inputs.select(gsStdVsMean.map((i) => i.name).sort(), {
label: "highlight",
value: "Shohei Ohtani"
})
Insert cell
chart = vl
.markPoint()
.data(gsStdVsMean)
.encode(
vl.x().fieldQ("mean").scale({ zero: false }),
vl.y().fieldQ("std").scale({ zero: false }),
vl.tooltip(["name", "mean", "std"]),
vl.color(
{
condition: {
test: `datum.name == '${highlight}'`,
value: "red"
}
},
{ value: "grey" }
)
)
.height(width * 0.4)
.width(width * 0.6)
.background("floralwhite")
.title(`GameScore Mean vs Std Dev - Pitchers w/ 20+ starts in 2022`)
.render()
Insert cell
gsStdVsMean = FileAttachment("2022 20GS+ std vs mean.csv").csv()
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