MakeOver Monday - White House Salaries
This interactive D3.js (v4) beeswarm chart compares White House staff salaries between the Obama and Trump administrations, using data from Makeover Monday 2017 week 29. Circle areas encode salary values in addition to the y-axis position, highlighting the salary differences between the two groups. The visualization uses the d3-beeswarm plugin to prevent overlapping circles, with hover tooltips showing individual salaries, while the chart also displays mean and median salary lines. The SVG rendering includes a transition that swaps between the two administrations to emphasize the distribution differences.
AI-generated descriptionThis block is my attempt to vizualize data provided by Makeover monday, 2017, week 29, and is a continuation of a previous block.
Compared to the previous block, areas of circle also encode salaries. I don't know if it's a good idea. Please let me know on twitter.
Pros :
- it strengthens differences between low salaries and high salaries
- it hiighlights the relative weight of each salary with regards to the total.
Cons :
- the salary is encoded twice (y-axis, radius)
- it adds some space around low salaries, which is not quite understandable; I wanted this space in order to maintain a correct distribution (eg. 10 low salaries must take the same place as 10 high salaries);
Original readme
I use a beeswarm arrangement (cf. d3-beeswarm plugin) for several reasons. Firstly, because there is no overlapping, it allows the user to see each individual data, and hover a particular data to access to its details. Secondly, this kind of arrangement suits very well distributions. In this example, it highlights the differences between the two administrations, and shows that Trump's salaries seems to use a salary grid, as opposed to Obama's ones.
Acknowledgments to :
- <a href='https://d3js.org/'>D3.js</a> (v.4)
- <a href='http://blockbuilder.org'>blockbuilder.org</a>
- <a href='https://github.com/Kcnarf/d3-beeswarm'>d3-beeswarm</a> plugin
- <a href='https://trimydata.com/'>Makeover monday</a>