Difference between revisions of "FilterBubblet"

From Splatspace
Jump to: navigation, search
(Created page with "FilterBubblet is: * a JavaScript bookmarklet that sends Google search results for a term to * a web service that stores the results in a database")
 
(Open Questions)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
FilterBubblet is:
+
=Overview=
  
* a JavaScript bookmarklet that sends Google search results for a term to
+
==FilterBubblet is:==
 +
 
 +
* a JavaScript bookmarklet that sends Google search results for a term to a web service
 
* a web service that stores the results in a database
 
* a web service that stores the results in a database
 +
 +
The idea was born of the [http://www.youtube.com/watch?v=B8ofWFx525s TED Talk "Filter Bubble"] and [http://groups.google.com/group/durham-makerspace/browse_thread/thread/87643b8301324598/ccc05eefee6e5fb8?lnk=gst&q=bubble#ccc05eefee6e5fb8 Jeff's earlier experiment] to test the filter bubble theory manually.
 +
 +
==Rationale==
 +
 +
* determine if the 'filter bubble' exists, and
 +
* analyze the data and make useful observations, like showing people results they didn't see
 +
* open the filter bubble experiment we conducted on the mailing list to a much larger userbase
 +
** potentially thousands of people could install the filterbubblet bookmarklet and send their results
 +
 +
=Open Questions=
 +
 +
* Is it possible to reliably extract Google search results from the result HTML?
 +
** Yes, or so it appears.  The list of links is always in an ordered list with an element ID of "rso".  Individual links appear to all be of class "tl".  [[User:Drew|Drew]] 12:40, 8 June 2011 (MDT)
 +
** Even easier than that.  The <a> is always of class "l" so the following code will dump, in order, the list of google search results (assumes use of '''Firebug''' plugin for Firefox).
 +
 +
<pre>
 +
javascript:
 +
var p=document.getElementsByTagName('*');
 +
function gc()
 +
{
 +
for(i=0;i<p.length;i++){
 +
if(p[i].className=='l'){
 +
console.log(p[i].href);
 +
}
 +
};
 +
};
 +
gc();
 +
</pre>
 +
 +
* Now how do I get data out of the browser to the webs? [[User:Drew|Drew]] 14:19, 8 June 2011 (MDT)
 +
** Ok, so jQuery must be able to do this.  'cause , ya know, AJAX.  But how exactly?  [[User:Drew|Drew]] 14:35, 8 June 2011 (MDT)
 +
 +
=Random Ideas=
 +
 +
* Geographic coordination
 +
** Web service could use GeoIP to guess user location, associate results with that location
 +
 +
=Technical References=
 +
 +
* [http://benalman.com/projects/run-jquery-code-bookmarklet/ jQuery Bookmarklet Generator]
 +
* [http://www.latentmotion.com/how-to-create-a-jquery-bookmarklet/ How to Create a jQuery Bookmarklet]
 +
* [http://www.hmmm.ip3.co.uk/tips/index.shtml Numbering Google Search Results with JavaScript bookmark] - difficult to read, but bookmarklet does something close to what we want
 +
* [http://en.wikipedia.org/wiki/Same_origin_policy#Workarounds Same origin policy Workarounds] - we'll need to use one of these techniques to send results to the database
 +
* [http://blog.nathanhumbert.com/2011/02/using-sinatra-with-bundler-to-deploy-on.html Using Sinatra with Bundler to Deploy on Heroku] - possible web service/database starting point (Heroku is free, and Sinatra is comparitively easy)

Latest revision as of 20:35, 8 June 2011

Contents

Overview

FilterBubblet is:

  • a JavaScript bookmarklet that sends Google search results for a term to a web service
  • a web service that stores the results in a database

The idea was born of the TED Talk "Filter Bubble" and Jeff's earlier experiment to test the filter bubble theory manually.

Rationale

  • determine if the 'filter bubble' exists, and
  • analyze the data and make useful observations, like showing people results they didn't see
  • open the filter bubble experiment we conducted on the mailing list to a much larger userbase
    • potentially thousands of people could install the filterbubblet bookmarklet and send their results

Open Questions

  • Is it possible to reliably extract Google search results from the result HTML?
    • Yes, or so it appears. The list of links is always in an ordered list with an element ID of "rso". Individual links appear to all be of class "tl". Drew 12:40, 8 June 2011 (MDT)
    • Even easier than that. The <a> is always of class "l" so the following code will dump, in order, the list of google search results (assumes use of Firebug plugin for Firefox).
javascript:
var p=document.getElementsByTagName('*');
function gc()
{
	for(i=0;i<p.length;i++){
		if(p[i].className=='l'){
			console.log(p[i].href);
		}
	};
};
gc();
  • Now how do I get data out of the browser to the webs? Drew 14:19, 8 June 2011 (MDT)
    • Ok, so jQuery must be able to do this. 'cause , ya know, AJAX. But how exactly? Drew 14:35, 8 June 2011 (MDT)

Random Ideas

  • Geographic coordination
    • Web service could use GeoIP to guess user location, associate results with that location

Technical References