Johan Sundström wrote:
> On 1/19/07, David Huynh <[EMAIL PROTECTED]> wrote:
>   
>> Hi all,
>>
>> I'm experimenting with creating an exhibit directly from a Google
>> spreadsheet.
>>     
>
> I've played around a lot with the Google Spreadsheets ode of operation
> during the weekend, unfortunately mostly with data I can't publish
> (address details for my choir, for instance). It's really a great and
> fairly easy way of  making data go live, especially with the automatic
> publication feature.
>
> Some surprises, gotchas and thoughts along the way:
>
> * The first column always gets to be the label property, regardless of
> what you name it.
>   
This is due to the way Google Spreadsheets exports data. The first 
column gets to be the title of the whole record and all subsequent 
columns gets merged together as data. That's why I need that funky { } 
wrapping to help me parse out individual cells. If you know how to get 
Google Spreadsheets to export in nicer formats, let me know.

> * You can't assign the first / label column to be the number type, so
> if it happens to be numerical, you get radical and unexpected sorting.
>
> * The default TileView in the prior-to-customization
> exhibit-view-panel is immensely useful, especially when you're working
> with lots of spreadsheets and haven't really committed to final names
> of columns. Being able to visualize and work with the data without
> having to freeze it like this until you're ready for it is an
> excellent productivity boost.
>
> * It would similarly be *very* useful to get a default TabularView as
> well, listing all columns available, in the order they are listed. I
> tried peeking at what it would take to implement that on my own, but
> didn't get very far into it; feel free to drop me some suggestions if
> you don't have the time to dig into it yourself, David.
>   
Search for "Fix up configuration in case author makes mistakes" in

    http://static.simile.mit.edu/exhibit/api/scripts/views/tabular-view.js

You probably want to change it to something like this:

    var database = this._exhibit.getDatabase();
    var propertyIDs = database.getAllProperties();
    for (var i = 0; i < properties.length; i++) {
        var propertyID = propertyIDs[i];
        this._columns.push(
            {   expression: Exhibit.Expression.parse("." + propertyID),
                styler:     null,
                label:      database.getProperty(propertyID).getLabel(),
                format:     "list"
            }
        );
    }

That won't keep the same column order, though.

> I'm polishing up the last tweaks for an "instant Google Spreadsheets
> Exhibit" page at the moment, where you just paste the feed URL and it
> loads and renders an exhibit to it, and it would be even greater with
> Table view in place too.
>   
That would be neat!

Now if we can hook that into blogs, we'll get laypeople to publish 
structured data in all sorts of domains! If we want to make the Semantic 
Web happen, we'll need all the help we can get, not just people who have 
enough expertise to coin URIs on the fly and install RDF stores on web 
servers.

David

_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

Reply via email to