Skip to main content
100%

Past Presidents - ES5

✓ Published0🌍 Public
Aalexmacy
Last edited Oct 21, 2016
Created on May 11, 2016

This dashboard visualizes U.S. presidential history using a sortable data table, stacked single-line row charts, and interactive filters. It displays party affiliations, years in office, and presidential timelines, with the top row chart resizing based on the selected time period. Bars on both charts fade when outside the selected time period or if their party is not selected. The visualization uses D3.js and Crossfilter to enable brushing on the timeline and filtering by political party via checkboxes, with data rendered as SVG. This version is written in ES5 for broader browser compatibility.

AI-generated description

This dashboard was made for testing a couple different visualizations. Mainly a sortable data table and a stacked single-line row charts. It displays data about U.S Presidents, their party affiliations, duration in office, etc.

Pie charts are very convenient, but are not ideal for accurately displaying data - not to mention have a steadily decreasing amount of fans, so I wanted something that would easily display comparable percentages of a whole, while not requiring less space than is needed for a histogram.

That brought me to making a stacked row chart that falls somewhere in the middle of the two. To do this, I repurposed a bar chart, gave all the bars the same height, and adjusting their width and placement based upon their percentage of the whole. The top row chart resizes based on the time period selected, and the bars on both charts fade when either outside of the selected time period or if their party is not selected.

This is the same as <a href='http://bl.ocks.org/alexmacy/c0302e4d78cebc193840'>This dashboard</a>, but written in ES5 for compatibility with more browsers.

mit Licensed

Similar vizzes