Plot.plot({
grid: true,
width:1200,
height: 600,
marginLeft: 80,
marginBottom: 50,
y: {
label: "New Cases / Clusters ",
padding: 2
},
x: {
label: "Date",
nice: true,
ticks: 5
},
marks: [
Plot.rectY(newCase3.data , Plot.binX({y: "first"}, { x:"date", y: (d) =>d.cases_new/10, fill:"#00ff00",curve: "step", thresholds: d3.utcDay} )),
Plot.lineY( newCase3.data ,Plot.windowY ({ x:"date", y: "cluster_import", stroke:spectral[0], k, shift } ) ),
Plot.lineY( newCase3.data ,Plot.windowY ({ x:"date", y: "cluster_religious", stroke:spectral[1], k, shift } )),
Plot.lineY( newCase3.data ,Plot.windowY ({ x:"date", y: "cluster_community", stroke:spectral[2], k, shift } )),
Plot.lineY( newCase3.data ,Plot.windowY ({ x:"date", y: "cluster_highRisk", stroke:spectral[3], k, shift } )),
Plot.lineY( newCase3.data ,Plot.windowY ({ x:"date", y: "cluster_education", stroke:spectral[4], k, shift } )),
Plot.lineY( newCase3.data ,Plot.windowY ({ x:"date", y: "cluster_detentionCentre", stroke:spectral[5], k, shift } )),
Plot.lineY( newCase3.data ,Plot.windowY ({ x:"date", y: "cluster_workplace", stroke:spectral[6], strokeWidth: "3", k, shift } )),
]
})