vizofyear = Plot.plot({
projection: "albers-usa",
marks: [
Plot.geo(state, {
stroke: "white",
fill: (d) => total_alc_all_year.get(d.properties.NAME),
title: (d) =>
`${d.properties.NAME} County \n ${percent(
total_consumption_2016.get(d.properties.NAME)
)}`
}),
Plot.geo(state, { strokeWidth: 0.05 }),
Plot.geo(states, { stroke: "#fff", strokeWidth: .5 })
],
color: {
scheme: "Spectral",
unknown: "#ddd",
type: "linear",
label: "Total Alcohol Consumption per Capita (Gallons)",
legend: true,
percent: true,
domain: [0, 120, 300, 500, 700, 900]
}
})