Hi Dan, Thanks for your willingness to help out, it's always great to find another participant. So user CPU costs less than bandwidth? :)
I'll preface the following with this: you should write whatever code you find satisfies your itch. I'm all for expanding the reach of Exhibit for making Exhibit-ors' lives easier, but the conversion efforts to date have taken place outside of Exhibit. For instance, http://simile.mit.edu/wiki/Exhibit/How_to_make_a_publications_exhibit details how to use a BibTeX file as a data source by way of SIMILE's Babel service (which also does tab-separated values, though I don't know if there's a built-in to Exhibit for that format). What I had in mind was some way of tying Exhibit JSON to Timeplot CSV - maybe adding a third alternative to the Timeplot/Exhibit extension to index into a Timeplot CSV file(s?), by columns and/or coodinates, or something similar. If that doesn't sound at all interesting, I would advise using a form that mimics the Google Spreadsheet formatting for Exhibit, described here: http://simile.mit.edu/wiki/Exhibit/How_to_make_an_exhibit_from_data_fed_directly_from_a_Google_Spreadsheet#Formatting_the_Data >From a much higher level view, one of the side effects Exhibit has is making data accessible. By placing conversion code inside Exhibit itself, it makes it harder to reuse that data in the same way it was intended to be read as that intention now resides in code, separate from data. There are obviously architectural ways around that (Babel-like services), but I appreciate that Exhibit is closely associated with JSON. I'd be interested to hear what other developers think. But again: scratch your itch :) Dan wrote: > Thanks Ryan for that pointer to your example. > > I agree that the CSV->JSON translation would be an easy approach, but > I'd like to > avoid the overhead of JSON formatting in the data files for various > reasons. > > I am now experimenting with writing a CSV importer for Exhibit. > Ideally I'd like it to be eligible for contribution into the regular > Exhibit code base, so I'd welcome any guidance from this group about > things to keep in mind (best practices and potential pitfalls). I > expect to re-use the existing "pointTime" "pointValue" and > "seriesConnector" parameters, and introduce a new parameter to specify > if the first column contains the names of the fields in the CSV; and > if not, what the field names are (in an array). Does that sound > reasonable? > > Dan > > > On Mar 10, 1:46 pm, Ryan Lee <[email protected]> wrote: >> Exhibit doesn't do CSV like that, no. I wrote up a one-off translator >> for this Exhibited Timeplot: >> >> http://ryanlee.org/2009/02/obirh.html >> >> which is a display of Online Bank Interest Rate history pulled from >> somebody else's Google Docs spreadsheet. I think you'll have to >> normalize your data stream(s) one way or another; it's quite possible >> CSV->JSON is the least painful. Anything else currently involves >> writing Exhibit / Timeplot code. >> >> >> >> Dan wrote: >>> Thanks for the suggestion. Unfortunately, that example uses JSON >>> format source data :http://ryanlee.org/2008/03/rsy/data.json >>> On Mar 10, 11:36 am, Stefano Mazzocchi <[email protected]> wrote: >>>> Dan wrote: >>>>> Hello and thanks to everyone who has helped to put together the SIMILE >>>>> project. I'm very impressed with Exhibit and am planning to use it as >>>>> a data exploration interface for some time series data. >>>>> Is it possible to use a CSV data source as input for the Exhibit >>>>> Timeplot extension? I see that it's possible when using the standalone >>>>> Timeplot code (as in the example with Bush's ratings). I would lke to >>>>> use the Exhibit extension instead, as it comes with all of the nice >>>>> selection widgets. But when looking at the examples and code for the >>>>> Timeplot extension in Exhibit (timeplot-view.js), I couldn't see how >>>>> to load a CSV and then use a ColumnSource parameter. The comments in >>>>> the code say this: >>>>> // There are two ways to specify a series, either by including >>>>> all >>>>> // the data in one DB item or by connecting one value across >>>>> several >>>>> // items. Across several is checked first during the set.visit >>>>> () and >>>>> // addEvent is called if found; if not, addSeries is called. >>>>> I know how to load the DB from a JSON file, using a <script> tag in >>>>> the head section of the html document: >>>>> <link href="test-data.json" type="application/json" rel="exhibit/ >>>>> data" /> >>>>> My question is whether it is possible to load this DB from a CSV file? >>>>> Or would I need to transform the CSV into a JSON format (which I would >>>>> like to avoid)? >>>> Ryan did an example of something like this in the past, you can see the >>>> result at >>>> http://ryanlee.org/2008/03/rsy/rivalry.html >>>> Not sure this is enough but might get you started. -- Ryan Lee [email protected] MIT CSAIL Research Staff http://simile.mit.edu/ http://people.csail.mit.edu/ryanlee/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SIMILE Widgets" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/simile-widgets?hl=en -~----------~----~----~----~------~----~------~--~---
