Click here to load reader
Upload
matt-harris
View
1.038
Download
1
Embed Size (px)
DESCRIPTION
This is the presentation I gave at Barcamp Brighton 3 on 6th September 2008. It gives an overview of an approach I have taken to insert timezones into my watchlist REST feed generated by Upcoming. The pipe described here is version 1 which adds a new node into the REST response. Whilst not ideal this is the current solution.
Citation preview
Adding timezones into
your Upcoming feedMatt Harris
1
ProblemUpcoming doesn’t know about timezones
Their events are “floating”
Different timezone events show as the same timezone in your calendar
2
Solution
Add a timezone to the event ... but how?
3
What do we have?Start date, end date, start time, end time
problem: their floating times
longitude/latitudeBad, not actually used
Country code Good, but what about multi-timezone countries
City OK, but it was entered as free text
4
Example Feed { "venue_country_code":"uk", "venue_zip":"SW1P 3NZ", "status":"watch", "end_time":"17:00:00", "venue_state_code":"london", "latitude":"", "personal":"0", "id":"449191", "start_date":"2008-09-15", "geocoding_ambiguous":"", "venue_city":"London", "longitude":"", "venue_country_name":"United Kingdom", "name":"@media Ajax", "start_time":"09:00:00", "geocoding_precision":"", "description":"After a hugely successful, ....",
"venue_state_name":"England", "username":"adactio", "tags":"", "metro_id":"49", "venue_id":"69299", "end_date":"2008-09-16", "venue_phone":"020 7390 1590", "user_id":"81213", "venue_address":"Dean's Yard, Westminster", "venue_name":"Church House ... ", "venue_state_id":"59", "venue_country_id":"6", "venue_url":"http:\/\/url\/", "title":"" },
5
Finding the timezoneCouple of providers with APIs
GeonamesGoogleYahoo Location Extractor
6
Converting to a Timezonehttp://www.geonames.org
Good set of web service methodsDocumentation helpfulVarious response formats
7
ProcessExtract City and Country from
Upcoming Feed
SEARCH for city and country code on GeoNames
Extract Longitude and Latitude from GeoNames response
RETRIEVE timezone from GeoNames
Inject into Upcoming feed
8
Considerations
Time of response - caching?
Frequency of change, how do we keep this up to date?
9
Step up Yahoo Pipes
10
Further Infohttp://www.themattharris.com
http://pipes.yahoo.com/themattharris/
upcomingusergetwatchlist
Thanks also to Kent Brewster, Yahoo Inc for Pipes help
11