2D Spatial Map
MAT 259, 2013
Scott Bcesar

Introduction
Create a graph comparing the percentage of checkouts per year of a book to the percentage of checkouts of the book compared to other popular books to see what kind of trends show up.
By using google we can get a list of the top fantasy books on the web, these can then be compared against the seattle public library checkout rates to see what sort of interesting trends crop up.

Background
and Sketches

Query
select count(*) as count, sum(case when (title = "lord of the rings return of the king") then 1 else 0 end) as lotrrotk, sum(case when (title = "hobbit or There and back again") then 1 else 0 end) as hobbit, sum(case when (title = "game of thrones") then 1 else 0 end) as got, sum(case when (title = "name of the wind the kingkiller chronicle day 01") then 1 else 0 end) as notw, sum(case when (title = "american gods") then 1 else 0 end) as ag, sum(case when (title = "Jonathan strange mr norrell") then 1 else 0 end) as jsmr, sum(case when (title = "dance with dragons") then 1 else 0 end) as dwd, sum(case when (title = "mists of avalon") then 1 else 0 end) as moa, sum(case when (title = "silmarillion") then 1 else 0 end) as silmarillion, sum(case when (title = "pawn of prophecy") then 1 else 0 end) as pop, year(o) as years, month(o) as months from title inner join activity on activity.bib=title.bib inner join collection on activity.item=collection.item where (title= "lord of the rings return of the king" or title = "hobbit or There and back again" or title = "game of thrones" or title = "name of the wind the kingkiller chronicle day 01" or title = "american gods" or title = "Jonathan strange mr norrell" or title = "dance with dragons" or title = "mists of avalon" or title = "silmarillion" or title = "pawn of prophecy") and year(o)>=2006 group by YEAR(o), MONTH(o) ASC limit 100

Results and Analysis

Code
I used Processing.

Run in Browser

Source Code