11-09-2021 18:28 PM - last edited 11-09-2021 18:54 PM
This started as an experiment with the Deneb custom visual, to see how well the Vega-Lite's faceting functionality worked with the dataset behind the main visual by Randy Yeip, Stuart A. Thompson and Will Welch in this Wall Street Journal article on the 2016 US election.
Once I wired-up the base visual (and the legend visual explaining the PVI Score, which also uses Deneb), I started to think about how well cross-filtering integration may work at both the data point and the facet level, so did a bit more work to illustrate that the matrix in the same page could be cross-filtered accordingly (or through a combination of either, plus multi-selection with the Ctrl key).
Bookmarks were then added, to illustrate that selection state can also be saved and recalled, so this opens up storytelling potential a little further.
The core visual is a single Deneb/Vega-Lite specification, using the following fields:
As .json files can't be attached to Data Stories, the Deneb template is available in this Gist (or can be inspected/modified in the attached workbook).