First, in order to investigate political research in mass culture, I located the political texts that were most important or most popular during the 2008 election cycle. I narrowed my search to only include texts from the Federal Presidential Election, hoping to draw conclusions on the use of libraries for political research based on these results.
1) I ran a search within amazon.com and the new york times best seller list to discover the key texts for 2007 (just before the election):
http://www.amazon.com/Best-Political-Bo ... 8EJ30I17C1
I began to run a search to look at the basic movement of certain key political texts:
My first search was to look at the number of check outs for Al Gore’s text “The Assault on Reason.” Al Gore has a large reputation for his framing of political arguments prior to elections.
Here is my SQL search to sort the data by number of checkouts per month for the barcode indicated by the Seattle Public Library website:
select month(ckoutDateTime), count(*) from transactions2007
where title like '%assault on reason%' group by month(ckoutDateTime) order by month(ckoutDateTime)
I cleaned my search by adding the title to the search:
select month(ckoutDateTime), title, count(*) from transactions2007
where title like '%assault on reason%' group by month(ckoutDateTime) order by month(ckoutDateTime)
This process includes all of the CDs, DVDs, and books that were checked out in affiliation with Al Gore’s title:
select month(ckoutDateTime), title, count(*) from transactions2007
where title like '%assault on reason%' group by month(ckoutDateTime) order by month(ckoutDateTime)
In order to evaluate the number of checkouts for other key texts, I will continue this process and evaluate the results.
I have also indicated the following visualization code, in order to display the rise in checkouts for key political texts from 2004 – 2008, the results on the graph are grouped by month:
import de.bezier.data.sql.*;
MySQL msql;
void setup()
{
size( 600, 600 );
background(255);
String user = "mat259";
String pass = "V1sual1zat1on";
/*String [] monthLables = new String[12];
monthLables[0] = "Jan";
monthLables[1] = "Feb";
monthLables[2] = "Mar";
monthLables[3] = "Apr";
monthLables[4] = "May";
monthLables[5] = "Jun";
monthLables[6] = "Jul";
monthLables[7] = "Aug";
monthLables[8] = "Sep";
monthLables[9] = "Oct";
monthLables[10] = "Nov";
monthLables[11] = "Dec";*/
// regular way of defining an array
String [] monthLables = {"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"}; // inline version of defining an array (same as above)
String database = "spl_years";
msql = new MySQL( this, "tango.mat.ucsb.edu", database, user, pass );
if ( msql.connect() )
{
msql.query( "select month(ckoutDateTime), count(*) from transactions2005 where title like '%politics%' "+
"group by month(ckoutDateTime) order by month(ckoutDateTime)" );
int monthCount = 0;
while(msql.next()) {
int amonth = msql.getInt(1);
int count = msql.getInt(2);
fill(255 , 50, 2, 50);
stroke(0 ,50);
rect( monthCount * (width/12) , height , width /12 , count * -0.5);
println(count);
fill(0);
textAlign(CENTER);
text(monthLables[monthCount], 20+ monthCount * (width/12) , 550);
monthCount++;
}
msql.query( "select month(ckoutDateTime), count(*) from transactions2006 where title like '%politics%' "+
"group by month(ckoutDateTime) order by month(ckoutDateTime)" );
int month2Count = 0;
while(msql.next()) {
int amonth = msql.getInt(1);
int count = msql.getInt(2);
fill(255, 0, 0 , 50);
stroke(0 ,50);
rect( month2Count * (width/12) , height , width /12 , count * -0.5);
println(count);
fill(255);
textAlign(CENTER);
text(monthLables[month2Count], 20+ month2Count * (width/12) , 550);
month2Count++;
}
msql.query( "select month(ckoutDateTime), count(*) from transactions2007 where title like '%politics%' "+
"group by month(ckoutDateTime) order by month(ckoutDateTime)" );
int month3Count = 0;
while(msql.next()) {
int amonth = msql.getInt(1);
int count = msql.getInt(2);
fill(255, 0, 0 , 50);
stroke(0 ,50);
rect( month3Count * (width/12) , height , width /12 , count * -0.5);
println(count);
fill(255);
textAlign(CENTER);
text(monthLables[month3Count], 20+ month3Count * (width/12) , 550);
month3Count++;
}
msql.query( "select month(ckoutDateTime), count(*) from transactions2008 where title like '%politics%' "+
"group by month(ckoutDateTime) order by month(ckoutDateTime)" );
int month4Count = 0;
while(msql.next()) {
int amonth = msql.getInt(1);
int count = msql.getInt(2);
fill(255, 0, 0 , 50);
stroke(0 ,50);
rect( month4Count * (width/12) , height , width /12 , count * -0.5);
println(count);
fill(255);
textAlign(CENTER);
text(monthLables[month4Count], 20+ month4Count * (width/12) , 550);
month4Count++;
}
}
else
{
println( "Conection Failed!! ");
}
}
void draw()
{
}
I will continue to develop these patterns, and draw conclusions from visualizations and data representations.
In terms of time line- because the vast majority of this project has to deal with data mining, I will extend the mining process for one more week and the writing will begin in December.