One of our goals while designing trendrr was to make data both easy to import
and easy to export. We like webapps that give you the option to take your data elsewhere if you so choose--I.e. we hate lock-ins. Above and beyond moving your data elsewhere we wanted it to be easy to develop applications with the data you are tracking. I looked around for a preexisting xml standard that would work for our purposes, but I was unable to find something suitable. What we came up with was sgs (simple graph syndication--big ups to
rss :)).
The schema itself should be easily readable/digestable for anyone familiar with xml. It provides all the data necessary to reproduce the exported graph.
Here is an example feed:
<sgs version="0.1">
<graph>
<title>iraq (Number of Photos on Flickr)</title>
<createdOn>2008-03-26T15:09:07</createdOn>
<link>http://trendrr.com/public/graphs/376803</link>
<creator>dustin</creator>
<creatorUrl>http://trendrr.com/user/dustin</creatorUrl>
<graphType>overlay</graphType>
<graphScale>absolute</graphScale>
<timeFrameStart>2008-03-02T12:44:03</timeFrameStart>
<timeFrameEnd>2008-04-01T13:44:03</timeFrameEnd>
<datasets>
<dataset>
<dataSource>Number of Photos on Flickr</dataSource>
<lastUpdated>2008-04-01T02:55:58</lastUpdated>
<percentTrend>0.006306043062614326</percentTrend>
<dataStartedCollecting>2008-03-26T15:09:07</dataStartedCollecting>
<color>#D03E6F</color>
<input>iraq</input>
<legendText>iraq</legendText>
<renderType>line</renderType>
<invert>false</invert>
<values>
<point>
<date>2008-03-26T18:09:32</date>
<value>193735.0</value>
</point>
<point>
<date>2008-03-27T22:51:47</date>
<value>193938.0</value>
</point>
....
</values>
</dataset>
</datasets>
</graph>
</sgs>
All dates are
XML encoded We are releasing the schema under a
creative commons license. So you are free to use it without any fear.
The schema as it stands now only relates to time-series graphs, but it will be expanded in the future to deal with other types of data. Enjoy.