Plot.plot({
marginTop: 10,
marginRight: 80,
y: {axis: false},
marks: [
Plot.ruleY([0]),
Plot.lineY(data, {x: "date", y: "value", stroke: "generation"}),
Plot.text(data, Plot.selectLast({x: "date", y: "value", fill: "generation", text: "generation", textAnchor: "start", dx: 5})),
end > 2019.7 ? Plot.text(data, Plot.selectMaxY({x: "date", y: "value", text: () => "“OK boomer”", dy: -5})) : null
]
})