Craig A. Sloss

Blog

Picture of a notebook

Filters added to Election Dashboard

2016-07-21

I've added the ability to apply filters to the Election Dashboard. Filters can be used to remove data from the analysis entirely, in contrast to dimensions, which keep the data in the analysis but subdivide it prior to analysis. Currently, five filters are available:

Each of the filters can be toggled on or off independently, so for example, you could restrict to incumbents of the Big Five, or look at incumbents who were re-elected. Be careful with the selection of filters, because some combinations (e.g. "only incumbents" and "only non-incumbents") could result in an empty report.

Filters may be used either as a supplement to a dimension, or as a replacement for one. For example, if one of your dimensions was political party, there may be value in applying the "Big Five" filter in order to produce a smaller report. (In fact, this filter is now on by default.) On the other hand, if you were only interested in looking at incumbent data, one solution could be to use incumbency as one of the dimensions and just ignore the non-incumbent parts of the report. A better solution would be to apply the incumbent filter, which would free up one of the dimensions to be used for another variable.

In addition to adding filters, I've made some cosmetic changes to improve the appearance of the report, and added a new metric, Number of Candidates. Because I removed candidate name from the data in order to conserve space, this metric is calculated by counting unique pairs of district number and political party. In most cases, this will work well (since a party only runs one candidate per riding), but may not be accurate for independent candidates.

Keywords: Election Dashboard

Link to this post

Navigation

Mastodon