contiguous_states = {
let contiguous_states = await (
await FileAttachment("contiguous_states3.json")
).json();
contiguous_states.objects.contiguous_states.geometries =
contiguous_states.objects.contiguous_states.geometries.filter(
(o) => o.properties.postal != "DC"
);
let adjacency_lists = topojson.neighbors(
contiguous_states.objects.contiguous_states.geometries
);
contiguous_states = topojson.feature(
contiguous_states,
contiguous_states.objects.contiguous_states
);
contiguous_states.features.forEach(function (o, i) {
o.properties.neighbors = adjacency_lists[i];
o.properties.color = four_coloring[o.properties.postal];
});
return contiguous_states;
}