Past Presidents - ES5
This dashboard visualizes U.S. presidential history through a sortable data table and stacked single-line row charts. The main row chart displays party representation as proportionally sized segments, while a second timeline chart shows individual presidencies and includes a brush for selecting time ranges. Both charts update in response to filters: bars fade when outside the selected period or when their party is deselected via the checkbox list. Data is managed with crossfilter, rendered using D3.js and SVG, and includes a sortable table of presidents with details like party affiliation and years in office. Written in ES5 for broad browser compatibility.
AI-generated descriptionThis 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.
forked from <a href='http://bl.ocks.org/alexmacy/'>alexmacy</a>'s block: <a href='http://bl.ocks.org/alexmacy/ac5db08388217663abcace38f6295cc5'>Past Presidents - ES5</a>