This page contains a demo for a dashboard to generate PCA visualizations from voting records. The demo shows congress voting data from the United States Fourteenth Amendment & The Civil Rights Act of 1866 Convention, as seen in the Quill Project Database.

The dashboard consists of three main elements: a timeline, a scatterplot and a chart.


Timeline

The timeline shows the timespan of the entire convention. Events are shown as dots, and they are identified by different colors:

  • ORANGE dots are sessions, arranged over the timeline. Other dots are put on top of sessions and represent individual events.
  • BLUE dots are decisions that have RECORDED INDIVIDUAL VOTES.
  • DARK GREY dots are decisions that have no recorded votes, but are flagged as ANONYMOUS.
  • LIGHT GREY dots are decisions that have no recorded votes and are not anonymous either.

The settings menu allows filtering of data, by choosing between delegation or individual voting, or choosing a particular committee or document.

Timeline settings

View by:
Committee(s):
Document:
Navigate Select main sample Select comparison sample

To generate a PCA projection to visualize, you must select a time sample from the timeline. Use the toggles on the upper side of the timeline to choose between navigating (zooming with the mouse wheel or panning by clicking and dragging) or selecting samples for visualization. To select a sample, click one of the SELECT SAMPLE toggles and click and drag the cursor through a section of the timeline. The timespans below will update to show the selected time samples. You can select either a single main sample or a main sample and a comparison sample, to be shown side-by-side on the scatterplot. Once you are happy with your selection, you may click the GENERATE PCA button to display the selected information on the scatterplot. You can come back and select new samples to project at any time.

Main Sample Timespan:
Comparison Sample Timespan:


Scatterplot

The scatterplot is the actual PCA visualization. A PCA projection is a transformation over the original data that aims to encode the maximum possible amount of covariance within each dimension without distortion, as to show trends and correlation between data points as explicitly as possible. In this visualization, each voter (person or delegation) will be shown as a BLACK dot, and its position on X and Y axes is determined by a combination of their votes - voters with similar voting behavior will be shown close together, while different behaviors will be shown far apart. If a comparison sample was selected, the comparison sample can be shown in RED. The comparison sample is projected using a different PCA calculation and is matched to the main sample as best as possible using Procrustes Analysis. Arrows are then drawn from the dots of every voter in the main sample to their position in the comparison sample. When a PCA projection is generated, the sidebar will also display the amount of variance contained in each axis. These numbers vary from 0 to 1 and indicate how well the data is represented by each axis of the PCA projection.

Scatterplot settings

Display:
Show comparison sample:
Movement display threshold:
Hide dots below threshold:

Amount of variance contained in X axis:
Amount of variance contained in Y axis:

The settings menu allows configuration of certain parameters:

  • The DISPLAY selector allows changing the display from VOTERS to DECISIONS - this means each dot will now be a decision and position will indicate how similar their votes were. Decisions are shown as BLUE dots.
  • The SHOW COMPARISON SAMPLE checkbox enables the display of voters according to the comparison sample.
  • The MOVEMENT THRESHOLD slider and checkbox allow you to hide dots that did not change more than a certain amount between the main sample and comparison sample.


Charts

These charts contain information on the behavior of the PCA itself: as positioning on each axis is a combination of different votes, users can view the individual influence of each decision over each axis: this can give insight over what being on a certain part of the screen actually means for data. The settings menu allows the selection of different axis for observation, the ordering of decisions (by date or by value), and enabling a second plot for comparison.

Decision charts settings

Show:
Order by:

Plot additional graph:
Show:
Order by:
This analysis tool was designed and implemented by Gabriel Dias Cantareira and Alfie Abdul-Rahman at King's College London, and partially funded by a grant from Engineering and Physical Sciences Research Council (EP/V028871/1).