External Correlation
MAT 259, 2013
Yeu-Shuan Tang
Introduction
The purpose of this project is to show the correlation between checkout number of Jane Austin’s novels and the searching number of “Jane Austin” in Google.
Query
select
DATE_FORMAT(o, '%Y-%m-%d'),
sum(case
when title = 'Mansfield Park' then 1
else 0
end) as 'Mansfield Park',
sum(case
when title = 'Sense and Sensibility' then 1
else 0
end) as 'Sense and Sensibility',
sum(case
when title = 'Pride and Prejudice' then 1
else 0
end) as 'Pride and Prejudice',
sum(case
when title = 'Emma' then 1
else 0
end) as emma,
sum(case
when title = 'Becoming Jane' then 1
else 0
end) as Jane
from
activity,
title
where
title.bib = activity.bib
and o > '2006-01-01'
and o < '2011-01-01'
group by year(o) , month(o)
order by year(o) , month(o);
Query Explanation
I selected four famous novels of Jane Austin and one movie about Jane Austin in Seattle Public Library, and counted them separately during 2006-2010. The results are group by month and year, and ordered by year and month. I use MySQL methods to query data in Processing, so it would start query when running the program.
Moreover, I also query searching amount of ”Jane Austin” on Google by Google Trend, and then loaded the data in Processing.
Results and Analysis
The visualization has several modes, and user can choose to show which ones like only “Emma” with “Becoming Jane.” or only “ Mansfield Park”. Each circle size represents different amount and so as the height of each circle. There are six colors because of different items. The maximum numbers are normalized to one hundred, so each peak of different item is shown in the same height.
Code
I used Processing and Google Correlation.
Run in Browser
Source Code