Plot.plot({
title: 'UV Dose for Kansas City, Missouri (-94.58, 39.10)',
color:{legend:true},
y: {label: 'kJ/m^2'},
x: {
label: "Day of Year",
tickFormat: (d) => {
const date = new Date(2021, 0);
date.setDate(d);
return date.toLocaleDateString('default', { month: 'short' });
}
},
marks: [
Plot.ruleY([0]),
Plot.line(data.filter(d => d.Year % 5 === 0), {x:"DOY", y: "UVDDF", z:"Year", stroke:'Year', legend:true})
]
});