data = {
const co2data = await FileAttachment('https://raw.githubusercontent.com/wf-id/rsv-tracker/main/output/rsv_all_combined_latest.csv')
.csv({ typed: true });
return co2data.map(d => {
d["Label"] = d["state"] + ' ' + d["percent_positive"];
return d;
});
}
RSV Trends
//#| eval: true
Plot.plot({
y: {
grid: true,
label: "RSV PCR Positivity"
},
marks: [
Plot.line(filtered2, {
x: "week",
y: "percent_positive",
stroke: "state"}),
Plot.text(filtered2, Plot.selectLast({
x: "week",
y: "percent_positive",
z: "state",
text: "state",
textAnchor: "CasesCumulativeCNT",
})
),
]
});
//#| eval: true
Plot.plot({
y: {
grid: true,
label: "RSV PCR Positivity Yearly Comparisons"
},
x: {
label: "Week Number"
},
facet : {
data: filtered,
x: "state"
},
marks: [
Plot.frame(),
Plot.line(filtered, {
x: "epi_week",
y: "percent_positive",
stroke: "epi_year"}),
Plot.text(filtered, Plot.selectLast({
x: "epi_week",
y: "percent_positive",
z: "epi_year",
text: "epi_year",
textAnchor: "CasesCumulativeCNT",
})
),
]
});