Harry Potter: The Book or The Movie?
MAT 259, 2016
Jared Brooks

Concept
I wanted to look into the effect of the movie releases of the Harry Potter films has on the checkout frequency of the books and the films. Do the release of the movies increase the checkout frequency of the books? Is there a delay on the interest from the time the film comes out? How does this change with the different books? I made the following query in MySQL to group all the checked out items whose titles matched the Harry Potter title, and grouped them by year/month and item type. I did the same query for the other books: the half blood prince, and the deathly hallows. Each query took about 30 seconds.

Query
SELECT DATE_FORMAT(cout,'%Y/%m') AS yearmonth,
sum( case when itemType LIKE '%bk%' then 1 else 0 end) as book,
sum( case when itemType LIKE '%dvd%' then 1 else 0 end) as dvd,
sum( case when itemType='jccd' then 1 else 0 end) as cd,
sum( case when itemType='accd' then 1 else 0 end) as soundtrack
FROM spl_2016.inraw
WHERE (title LIKE '%harry potter and the order of the phoenix%')
AND (year(cout) > 2005)
GROUP BY yearmonth
ORDER BY yearmonth

Result
For the visualization, I made a grid for each book with dates on the x-axis and item type on the y-axis, and stacked each grid on top of each other, so they share the time axis.

I kept the color schemes that we demo'd in class, and changed the normalization scheme to have weight values for each cell be relative to the maximum in its row. The screenshot below shows normalization on, and color scheme #3, which I thought looked the best.



I added a legend on the right that shows that a solid black triangle marks the theatrical release of the film, and the empty triangle marks the DVD release of the film just a few months later. The bottom stack, the deathly hallows, has two of each since the movie was split into part 1 and 2.

Analysis
From all this we can see that people like to read the books just as the movies are being released to theaters, with audio books interest being more spread out. The biggest interest in all three of the books happen to peak during the theatrical release of the 5th movie: order of the phoenix. We also see that interest in the DVDs peaks just few months after the DVD release. Furthermore, interest for all Harry Potter books items quickly decreases and then plateaus right after the theatrical release of the last movie.

Code
Built with Processing 3.0.1
Source Code + Data