Google Calendar + SPARQL = Baseball??

Elias was showing me earlier today the demo he had whipped up earlier today that shows one way of leveraging SPARQL as a query interface to Google calendar data. As he wrote, when he showed me the demo he asked me to think about some interesting queries we could do with it. Here's the first one I came up with:

  1. Navigate to the demo
  2. On the Search tab, enter mets and click Go
  3. In the results table, select 2006 Mets Schedule and click Add to Calendars
  4. On the Calendars tab, ensure that only the 2006 Mets Schedule calendar is selected
  5. On the Query tab, enter this query:
    SELECT ?when ?matchup ?broadcast 
    WHERE {
      GRAPH ?g {
        _:game ical:dtstart ?when ; 
                     ical:summary ?matchup; 
                     ical:description ?broadcast.
         FILTER (?broadcast != "")
  6. Click Get Results

The calendar in question is setup to use the description field to list information on Mets games that will be broadcast on national TV this season. Thus, the filter ensures that the query returns only those Mets games which can be viewed nationwide this year, particularly useful for displaced fans like myself!1 Pretty cool, eh?

For the record, I do feel a minor case of the willies that I'm using generic calendar predicates to retrieve semantic data on baseball-game schedules and broadcasting. But, hey, we've got to start somewhere. Let's go Mets, and let's go SPARQL!

1 (Of course, in reality, I subscribe to MLB.TV and miss nary a minute of the season, heavens forbid!)