It's The Economy, Stupid! (2)
MAT 259, 2015
Fabian Offert
Concept
Eventually leading into the great recession that still shapes our economy today, the 2007-2008 financial crisis was the macroeconomic event of the first decade of the 21st century. In this project, I am looking at possible effects of this historic bust on the choice of books borrowed by the patrons of the Seattle Public Library system. Specifically, I am asking if there is a visible increase of interest in understanding the mechanisms of capitalism around the peak of the crisis. I examine four keywords and map their prevalence over time to the patron's general interest in topics related to economics (Dewey decimal numbers 330-339).
Query
SELECT
YEAR(cout),
MONTH(cout),
SUM(CASE
WHEN title LIKE "%marx%" THEN 1
ELSE 0
END) AS marx,
SUM(CASE
WHEN title LIKE "%keynes%" THEN 1
ELSE 0
END) AS keynes,
SUM(CASE
WHEN title LIKE "%capitak%" THEN 1
ELSE 0
END) AS capital,
SUM(CASE
WHEN title LIKE "%crisis%" THEN 1
ELSE 0
END) AS crisis,
SUM(CASE
deweyClass >= 330 AND deweyClass < 340 THEN 1
ELSE 0
END) AS isEcon,
FROM
spl3._rawXmlDataCheckIns
WHERE
DATE(checkOut) > '2006-1-1' AND DATE(checkOut) < '2014-12-31'
GROUP BY YEAR(cout), MONTH(cout)
Process
I updated the query of the first version to work with the newest edition of the Seattle Public Library data that includes the years 2013 and 2014. The added data makes the results from the first version stand out even clearer. To make the resulting matrix reorderable, I first revised the code to be more object-oriented and then added some keyboard shortcuts to sort the data column-wise. The sorting is visualized by a simple animation for both the change in color and size, which also makes a comparison between the different arrangements possible.
Final result
From the analytical perspective, the visualization emphasizes visually what already could be inferred from the first version: All four keywords see a noticeable increase with the onset of the 2007-2008 financial crisis, as does the general interest in topics related to economics.
Code
I used Processing.
Control: Use the mouse to explore, use the number keys 1-7 to reorder.
Source Code + Data