lineplot = Plot.plot({
marginLeft: 80,
marginRight: 65,
y: {
grid: true,
label: "↑ Unemployment"
},
marks: [
Plot.ruleY([0]),
Plot.line(jobsData, {
sort: "Date",
x: "Date",
y: "Adj_Value_millions",
curve,
strokeWidth: 1
}),
Plot.areaY(jobsData, {
x: "Date",
y: "Adj_Value_millions",
curve,
fill: "#c5ebf3",
fillOpacity: 0.6
}),
Plot.text(jobsData.slice(-1), {
x: "Date",
y: "Adj_Value_millions",
text: ["–4.2 million jobs since Feb. 2020"],
fill: "#8a817c",
dy: "-0.5em",
dx: "-2em"
})
]
})