<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>db/describe.sh</filename>
    </added>
    <added>
      <filename>db/join_schema.txt</filename>
    </added>
    <added>
      <filename>db/main_schema.txt</filename>
    </added>
    <added>
      <filename>db/primary_schema.txt</filename>
    </added>
    <added>
      <filename>db/tables.graffle</filename>
    </added>
    <added>
      <filename>db/tables.pdf</filename>
    </added>
    <added>
      <filename>scratch.R</filename>
    </added>
    <added>
      <filename>setup.sql</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff></diff>
      <filename>.DS_Store</filename>
    </modified>
    <modified>
      <diff>@@ -1,21 +1,45 @@
 ACRP Notes
 ==========
+This project contains the analysis of data from the Australian Common
+Reader Project in the form of snippets of R and SQL code as well as some 
+resulting graphs and tables.
 
-Methodology
------------
+Importantly, the actual data used in this analysis is *NOT* included in this
+project as I do not have the rights to redistribute it. The references to 
+SQL databases and tables are for a local copy of the MySQL database I was given 
+access to by the ACRP.
 
-A simple first question that can be asked of the data is whether there exist
-pairs of books (A,B) such that both A and B alone have a relatively large
-number of readers but there are few readers which have read both A and B. Pairs
-of this type can be further analysed to see whether certain books predict the
-reading of A or B and whether reading is clustered that can be understood 
-via reader's occupation, genre, gender, etc.
+The rest of this file is some notes I made for myself while learning about
+the database and analysing it.
+
+Database Structure
+------------------
+The files `*_schema.txt` in the `db` directory are dumps of the MySQL database
+by the query in the `describe.sh` shell script.
+
+I turned the important parts of these schema into a PDF file 
+-- `db/table.pdf` -- using OmniGraffle 5. The `.graffle` file is also 
+available.
 
 Set up
 ------
 Several tables are created during analysis so as to speed things up. Once the
-original ACRP database is loaded, run `split_pairs.sql` to build the extra
-tables required before running `analysis.sql`.
+original ACRP database is loaded, run `setup.sql` to build the extra
+tables required before running and of the R scripts for analysis.
+
+Results
+-------
+The file `RESULTS.markdown` contains some useful counts and IDs collected
+for reference as well as some notes on some early plots.
+
+Seminar May 2008
+----------------
+The directory `seminarMay08` contains R analysis scripts and the resulting
+PDF plots used in the seminar Julieanne gave to her faculty in May 2008. 
+
+Notice that as I learned more about RMySQL I began moving more and more of the
+database-related code into R in an effort to make the R scripts completely
+self-contained.
 
 Configuration
 -------------</diff>
      <filename>README.markdown</filename>
    </modified>
    <modified>
      <diff></diff>
      <filename>vis/.DS_Store</filename>
    </modified>
    <modified>
      <diff></diff>
      <filename>vis/applet/.DS_Store</filename>
    </modified>
    <modified>
      <diff>@@ -5,16 +5,16 @@
 	        &lt;!-- charset must remain utf-8 to be handled properly by Processing --&gt;
 		&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
 		
-		&lt;title&gt;vis : Built with Processing&lt;/title&gt;
+		&lt;title&gt;Visualisation of Lambton Miners' and Mechanics' Institute&lt;/title&gt;
 		
 		&lt;style type=&quot;text/css&quot;&gt;
 		/* &lt;![CDATA[ */
 	
 		body {
-  		  margin: 60px 0px 0px 55px;
+		  width: 100%;
 		  font-family: verdana, geneva, arial, helvetica, sans-serif; 
 		  font-size: 11px; 
-		  background-color: #ddddcc; 
+		  background-color: white; 
 		  text-decoration: none; 
 		  font-weight: normal; 
 		  line-height: normal; 
@@ -26,12 +26,20 @@
 		a:active   { color: #3399cc; text-decoration: underline; }
 		a:hover    { color: #3399cc; text-decoration: underline; }
 	
+		#content {
+			margin: 0 auto 0 auto;
+			width: 600px;
+		}
+		h1 { text-align: center;}
+		dt { font-weight: bold; }
+		address { color: #555555; text-align: center;}
 		/* ]]&gt; */
-		&lt;/style&gt;
-	 
+		&lt;/style&gt; 
+	
 	&lt;/head&gt;
 	&lt;body&gt;
 		&lt;div id=&quot;content&quot;&gt;
+			&lt;h1&gt;Book Similarity Visualisation&lt;/h1&gt;
 			&lt;div id=&quot;vis_container&quot;&gt;
 			
 			&lt;!--[if !IE]&gt; --&gt;
@@ -87,18 +95,59 @@
 			&lt;!--&lt;![endif]--&gt;
 			
 			&lt;/div&gt;
-			
+			&lt;h2&gt;Layout&lt;/h2&gt;
 			&lt;p&gt;
-			
+				Each circle represents a book found in the Lambton Miners'
+				and Mechanics' Institute.
+				Only books that were borrowed by at least 20 people across
+				all libraries in the ACRP database are shown.
+			&lt;p&gt;
+				The size of a circle is indicative of the number of its 
+				borrowers. 
 			&lt;/p&gt;
-			
 			&lt;p&gt;
-			Source code: &lt;a href=&quot;vis.pde&quot;&gt;vis&lt;/a&gt; &lt;a href=&quot;Book.pde&quot;&gt;Book&lt;/a&gt; &lt;a href=&quot;Graph.pde&quot;&gt;Graph&lt;/a&gt; &lt;a href=&quot;PlotView.pde&quot;&gt;PlotView&lt;/a&gt; 
+				The similarity of any two books is defined to be the proportion
+				of their borrowers they have in common.
+				The books are arranged so that similar book are placed closer 
+				together than books that are less similar. 
 			&lt;/p&gt;
-			
+			&lt;h2&gt;Controls&lt;/h2&gt;
 			&lt;p&gt;
-			Built with &lt;a href=&quot;http://processing.org&quot; title=&quot;Processing.org&quot;&gt;Processing&lt;/a&gt;
+				Hovering over a book's circle will reveal its title.
+				The number in brackets is the number of borrowers.
 			&lt;/p&gt;
+			&lt;p&gt;
+				Clicking on a circle will show its &amp;ltquo;neighbours&amp;rtquo;
+				&amp;mdash; those books that are most similar to it.
+			&lt;/p&gt;
+			&lt;p&gt;
+				The number of books and neighbours displayed are controlled
+				by the two sliders at the bottom of the visualisation.
+			&lt;dl&gt;
+				&lt;dt&gt;Borrowers&lt;/dt&gt;
+				&lt;dd&gt;
+					Only books with at least this many borrowers are displayed.
+				&lt;/dd&gt;
+				&lt;dt&gt;Similarity&lt;/dt&gt;
+				&lt;dd&gt;
+					Links to neighbouring books are only shown if the two books
+					share at least this proportion of their borrowers.
+				&lt;/dd&gt;
+			&lt;/dl&gt;
+			&lt;/p&gt;
+			&lt;h2&gt;More Information&lt;/h2&gt;
+			&lt;p&gt;
+				A longer description of this visualisation and the data it is
+				based on can be found at
+				&lt;a href=&quot;http://conflate.net/inductio/2008/06/visualising-reading/&quot; 
+				   title=&quot;Technical details about this visualisation&quot;&gt;
+					&lt;i&gt;Inductio Ex Machina&lt;/i&gt;
+				&lt;/a&gt;
+			&lt;/p&gt;
+			&lt;address&gt;
+			Built with &lt;a href=&quot;http://processing.org&quot; title=&quot;Processing.org&quot;&gt;Processing&lt;/a&gt;
+			by &lt;a href=&quot;http://mark.reid.name&quot; title=&quot;Mark Reid's Home Page&quot;&gt;Mark Reid&lt;/a&gt;.
+			&lt;/address&gt;
 		&lt;/div&gt;
 	&lt;/body&gt;
 &lt;/html&gt;</diff>
      <filename>vis/applet/index.html</filename>
    </modified>
    <modified>
      <diff></diff>
      <filename>vis/applet/vis.jar</filename>
    </modified>
    <modified>
      <diff>@@ -31,7 +31,7 @@ public void setup() {
     20,20,width-40,height-70,
     graph.xmin, graph.ymin, graph.xmin + vwidth, graph.ymin + vheight
   );
-  view.setTitle(&quot;Books from the Lambton Library&quot;);
+  view.setTitle(&quot;Books from the Lambton Miners' and Mechanics' Institute&quot;);
         
   for(int i=0; i &lt; graph.books.size(); i++) {
     view.add((Drawable) graph.books.get(i)); 
@@ -42,7 +42,7 @@ public void setup() {
   controlP5.addSlider(&quot;weightThreshold&quot;, 0.0f, 1.0f, 0.25f, width-220, height-30, 200, 20);
   controlP5.addTextlabel(&quot;sim&quot;, &quot;Similarity&quot;, width-120, height-30);
   controlP5.addSlider(&quot;readerThreshold&quot;, 0, 100, 0, 20, height-30, 200, 20);  
-  controlP5.addTextlabel(&quot;read&quot;, &quot;Readers&quot;, 100, height-30);
+  controlP5.addTextlabel(&quot;read&quot;, &quot;Borrowers&quot;, 100, height-30);
   smooth();
 }
 
@@ -76,12 +76,12 @@ public void draw() {
     }
   }
   
-  drawTitles(active);
   if(selected != null) { 
+    drawNeighbours(selected, false); 
     drawTitle(selected, 0);
-    drawNeighbours(selected, true); 
   }
   
+  drawTitles(active);  
 }
   
 public void drawTitle(Book book, int offset) {</diff>
      <filename>vis/applet/vis.java</filename>
    </modified>
    <modified>
      <diff>@@ -31,7 +31,7 @@ void setup() {
     20,20,width-40,height-70,
     graph.xmin, graph.ymin, graph.xmin + vwidth, graph.ymin + vheight
   );
-  view.setTitle(&quot;Books from the Lambton Library&quot;);
+  view.setTitle(&quot;Books from the Lambton Miners' and Mechanics' Institute&quot;);
         
   for(int i=0; i &lt; graph.books.size(); i++) {
     view.add((Drawable) graph.books.get(i)); 
@@ -42,7 +42,7 @@ void setup() {
   controlP5.addSlider(&quot;weightThreshold&quot;, 0.0, 1.0, 0.25, width-220, height-30, 200, 20);
   controlP5.addTextlabel(&quot;sim&quot;, &quot;Similarity&quot;, width-120, height-30);
   controlP5.addSlider(&quot;readerThreshold&quot;, 0, 100, 0, 20, height-30, 200, 20);  
-  controlP5.addTextlabel(&quot;read&quot;, &quot;Readers&quot;, 100, height-30);
+  controlP5.addTextlabel(&quot;read&quot;, &quot;Borrowers&quot;, 100, height-30);
   smooth();
 }
 
@@ -76,12 +76,12 @@ void draw() {
     }
   }
   
-  drawTitles(active);
   if(selected != null) { 
+    drawNeighbours(selected, false); 
     drawTitle(selected, 0);
-    drawNeighbours(selected, true); 
   }
   
+  drawTitles(active);  
 }
   
 void drawTitle(Book book, int offset) {</diff>
      <filename>vis/applet/vis.pde</filename>
    </modified>
    <modified>
      <diff>@@ -31,7 +31,7 @@ void setup() {
     20,20,width-40,height-70,
     graph.xmin, graph.ymin, graph.xmin + vwidth, graph.ymin + vheight
   );
-  view.setTitle(&quot;Books from the Lambton Library&quot;);
+  view.setTitle(&quot;Books from the Lambton Miners' and Mechanics' Institute&quot;);
         
   for(int i=0; i &lt; graph.books.size(); i++) {
     view.add((Drawable) graph.books.get(i)); 
@@ -42,7 +42,7 @@ void setup() {
   controlP5.addSlider(&quot;weightThreshold&quot;, 0.0, 1.0, 0.25, width-220, height-30, 200, 20);
   controlP5.addTextlabel(&quot;sim&quot;, &quot;Similarity&quot;, width-120, height-30);
   controlP5.addSlider(&quot;readerThreshold&quot;, 0, 100, 0, 20, height-30, 200, 20);  
-  controlP5.addTextlabel(&quot;read&quot;, &quot;Readers&quot;, 100, height-30);
+  controlP5.addTextlabel(&quot;read&quot;, &quot;Borrowers&quot;, 100, height-30);
   smooth();
 }
 
@@ -76,12 +76,12 @@ void draw() {
     }
   }
   
-  drawTitles(active);
   if(selected != null) { 
+    drawNeighbours(selected, false); 
     drawTitle(selected, 0);
-    drawNeighbours(selected, true); 
   }
   
+  drawTitles(active);  
 }
   
 void drawTitle(Book book, int offset) {</diff>
      <filename>vis/vis.pde</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>TODO.markdown</filename>
    </removed>
    <removed>
      <filename>analysis.out</filename>
    </removed>
    <removed>
      <filename>analysis.sql</filename>
    </removed>
    <removed>
      <filename>create_matrix.rb</filename>
    </removed>
    <removed>
      <filename>describe.sh</filename>
    </removed>
    <removed>
      <filename>feature_analysis.R</filename>
    </removed>
    <removed>
      <filename>important_schema.txt</filename>
    </removed>
    <removed>
      <filename>join_schema.txt</filename>
    </removed>
    <removed>
      <filename>loanview.sql</filename>
    </removed>
    <removed>
      <filename>plots/works-linPCA-colLibrary.sql</filename>
    </removed>
    <removed>
      <filename>primary_schema.txt</filename>
    </removed>
    <removed>
      <filename>split_pairs.sql</filename>
    </removed>
    <removed>
      <filename>tables.graffle</filename>
    </removed>
    <removed>
      <filename>tables.pdf</filename>
    </removed>
    <removed>
      <filename>test.csv</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>aba37f4dec38a8503c400fba834246f3b6d7c571</id>
    </parent>
  </parents>
  <author>
    <name>Mark</name>
    <email>mark@threewordslong.com</email>
  </author>
  <url>http://github.com/mreid/acrp/commit/9e706f97c6948987c547cf262af3bba0b34529c5</url>
  <id>9e706f97c6948987c547cf262af3bba0b34529c5</id>
  <committed-date>2008-06-10T04:05:56-07:00</committed-date>
  <authored-date>2008-06-10T04:05:56-07:00</authored-date>
  <message>Restructure and clean up</message>
  <tree>6a6d53611c3a8e13391272aed3a7eecdb2dfff76</tree>
  <committer>
    <name>Mark</name>
    <email>mark@threewordslong.com</email>
  </committer>
</commit>
