Plot.plot({
title: "Giants mean rank over time",
marks: [
Plot.ruleY([0]),
Plot.lineY(
power_rankings.filter(
(e) => (e.team === "Giants") & (e.Variable == "Mean")
),
{
x: "publish_date",
y: (d) =>
d.publish_date.getUTCMonth() < 3 || d.publish_date.getUTCMonth() > 10
? NaN
: d.Value,
z: "team"
}
)
]
})