Mapping out Controversy
MAT 259, 2015
For this project, I chose to implement a Treemap due to prior personal interest. Treemaps were traditionally conceived for visualizing space usage on a hard disk, so they are relatively suited to any visualization where we want to communicate a 'piece of the pie' and associated parameters via text and color.
After updating the project, multiple layouts became available. Clicking the buttons at the top will generate a new layout. Additionally, the 'Strip' layout can be pressed multiple times for a different sublayout.
dewey.dewey as topic,
popularity.popularity as pops,
STD(UNIX_TIMESTAMP(activity.i) - UNIX_TIMESTAMP(activity.o)) AS checkoutVariance
activity.bib = popularity.bib
AND dewey.bib = activity.bib
AND activity.i > '2005-01-01 00:00:00'
AND dewey.dewey >= 100
AND dewey.dewey < 200
AND popularity.popularity > 10
AND extras.bib = activity.bib
GROUP BY activity.bib;
I experimented with Ben Fry's Processing Treemap library. Good results were obtained after experimenting with the available classes and consulting the book. The library is available here
. Significant re-organization of the data from the first project was necessary to give the Treemap an agreeable form. The first iteration did not use hardware acceleration and ran much more slowly than the final project.
Cool, natural colors were chosen to contrast with the vivid bright pink used on mouse-over.
I chose to partition the space by 'popularity' (that is, total checkouts). Topic is shown as text on each partition, with color indicating the controversy score which was previously described.
Philosophy and Religion immediately stand out as controversial topics. This is somewhat expected, so it goes some way in validating the approach of using checkout duration variance as a proxy for Controversy. More interesting, Home & Family Management stands out as well. Mousing over will show that books related to more artistic endeavors such as rug-making made the top 5, however, most other topics related to art have a relatively low checkout variation.
Code can be downloaded by clicking here: Controversy Map Visualization. Processing and mysql were used for this project.
Mousing over a topic shows the most controversial books.
Clicking a button near the header will generate a new layout.