viewof foliageWeek = Scrubber([...new Set(foliage2023.map((d) => d.week))], {
autoplay: false,
delay: 300
})
ConUS Foliage 2023
Author
hrbrmstr
conusFoliage = Plot.plot({
projection: "albers-usa",
width,
color: {
legend: true,
domain: [
"No Change",
"Minimal",
"Patchy",
"Partial",
"Near Peak",
"Peak",
"Past Peak"
],
range: [
"#8d3d28",
"#ae3130",
"#dc4d33",
"#e89150",
"#f6ce6f",
"#fbf6bb",
"#8ba780"
],
label: "Foliage Levels",
reverse: true
},
marks: [
Plot.geo(counties48, {
stroke: "white",
strokeWidth: 1 / 4,
strokeOpacity: 1 / 2,
title: (d) => d.id,
fill: (d) => {
const cty = f23.get(d.id);
const val = cty === undefined ? "No Change" : cty.value;
console.log(val);
return val;
}
}),
Plot.geo(states48, {
stroke: "white",
strokeWidth: 3 / 2,
strokeOpacity: 1 / 2
})
]
})
counties48 = ({
type: "FeatureCollection",
features: counties.features.filter(
(d) => !["15", "02"].includes(d.id.substring(0, 2))
)
})
states48 = ({
type: "FeatureCollection",
features: states.features.filter((d) => !["15", "02"].includes(d.id))
})