Blotter (Blog Plotter)
Blotter is a new service from Dapper that graphs a blog's popularity over time. The popularity statistics are gathered from Technorati using the Dapper service.
Get a Blotter graph for your blog
Getting a Blotter graph for your blog is easy. Simply add the following code to your site:
<a href="http://www.dapper.net/dapplications/Blotter"><img src="http://www.dapper.net/dapplications/BlogPlot/http://YourBlogUrlHere" border="0"></a>
For example, the graph below gathers the statistics over time for Guy Kawasaki's blog (who gets credit for coming up with this service)
Blotter automatically tracks any blog's Technorati "authority" ranking after the first time it is requested.
The Blotter graph has two settings: time frame and size:
-
Time frame - this setting determines whether the graph includes statistics from in the last week,
last month, or since Blotter started tracking the blog. To do this, set the variable "timeframe" in the
image URL to one of the three following values: "week", "month", or "inf" for infinite.
If this variable is not provided, the default is a week.
Example:
http://www.dapper.net/dapplications/BlogPlot/{Enter your blog's URL}&timeframe=inf - Width and height - determines the width and height of the graph in pixels. To do this, set the variables
"width" and "height" to whatever numeric value you would like. The default values are 450px (width) and 200px (height).
Example:
http://www.dapper.net/dapplications/BlogPlot/{Enter your blog's URL}&width=500&height=250 -
You can mix and match the above options as well to get a graph that suits your needs the best.
Example:
http://www.dapper.net/dapplications/BlogPlot/{Enter your blog's URL}&timeframe=inf
How Blotter was built (and how to build similar services)
Blotter serves as a good example for understanding how Dapper can be used to build new services using content from other websites.
Building Blotter involved three relatively simple steps:
-
First we Dapped the Technorati top 100 blogs page
(original page,
Dapp usage page)
and Technorati's page for an individual blog
(original page,
Dapp usage page).
The latter Dapp accepts a blog's URL as an input parameter and then returns statistics for that blog.
The former just returns statistics for the top 100 blogs.
By Dapping these two pages, we were able to obtain the statistics for the blogs from Technorati in XML format. This made it easy to parse and program against in the follow two steps. -
Next, we wrote a PHP script which runs daily on our server. This script accesses the Dapps over HTTP,
gets the returned XML containing the statistics for every blog that has ever been requested via Blotter,
and then stores those statistics in the database.
- Finally, we wrote a front-end script (what you're looking at now, also in PHP) that pulls the data from the database and creates the graph (many thanks to the wonderful JpGraph). If the blog is being requested for the first time, the front-end script accesses the Dapps directly and then stores the data in the database.
As you can see, Dapper makes creating services like Blotter (and many other services) easy by solving the hardest part in building any service that uses content from web - getting, parsing, and delivering the content itself. Whether the task is creating a new mashup from sites that do not have APIs, creating a new aggregator service, or building a Blotter-like graphing service, Dapper provides you with the content you need as XML and you don't have to lift a finger to get it! Just Dapp your favorite website and Dapper will become your loyal content fetcher.
If you have any questions, do not hesitate to contact us.