Linear Frequency
MAT 259, 2013
Yeu-Shuan Tang

Introduction
How many numbers of checkouts about photographic books each month during 2006-2012?
I’m interested in the tendency of checkouts about photographic books during the pass seven years. Also, according to checkouts, I’m wondering is there any correlation between photography and season?

Background
and Sketches

Query
SELECT year(o),month(o), SUM(CASE WHEN kind="acbk" THEN 1 ELSE 0 END)as book, SUM(CASE WHEN kind="jcbk" THEN 1 ELSE 0 END)as jcbook FROM title, activity, kind WHERE title like "%photogra%" AND activity.bib=title.bib AND activity.item=kind.item AND year(o)>2005 AND year(o)<2013 GROUP BY month(o), year(o) OEDER BY year(o),month(o);
Query Explanation
I searched items about photographic books from title, activity, and kind. Then, I counted adult books and juvenile books separately from 2006 to 2012. The result is group by each month and year in ascending order.

Results Analysis
The result of processing is depicted as below. The tendency of checkouts shows the maximum in 2009, and gradually decreasing since then. In addition, it’s interesting during 2009 to 2012 that the tendency of checkouts is quite similar over each month with the minimum point in September.


Code
I used Processing.

Run in Browser

Source Code