Adding timezones into Upcoming feeds

1,228 views

Published on

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.

Published in: Technology, Design
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,228
On SlideShare
0
From Embeds
0
Number of Embeds
15
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Adding timezones into Upcoming feeds

  1. 1. Adding timezones into your Upcoming feed Matt Harris 1
  2. 2. Problem Upcoming doesn’t know about timezones Their events are “floating” Different timezone events show as the same timezone in your calendar 2
  3. 3. Solution Add a timezone to the event ... but how? 3
  4. 4. What do we have? Start date, end date, start time, end time problem: their floating times longitude/latitude Bad, not actually used Country code Good, but what about multi-timezone countries City OK, but it was entered as free text 4
  5. 5. Example Feed { quot;venue_state_namequot;:quot;Englandquot;, quot;venue_country_codequot;:quot;ukquot;, quot;usernamequot;:quot;adactioquot;, quot;venue_zipquot;:quot;SW1P 3NZquot;, quot;tagsquot;:quot;quot;, quot;statusquot;:quot;watchquot;, quot;metro_idquot;:quot;49quot;, quot;end_timequot;:quot;17:00:00quot;, quot;venue_idquot;:quot;69299quot;, quot;venue_state_codequot;:quot;londonquot;, quot;end_datequot;:quot;2008-09-16quot;, quot;latitudequot;:quot;quot;, quot;venue_phonequot;:quot;020 7390 1590quot;, quot;personalquot;:quot;0quot;, quot;user_idquot;:quot;81213quot;, quot;idquot;:quot;449191quot;, quot;venue_addressquot;:quot;Dean's Yard, quot;start_datequot;:quot;2008-09-15quot;, Westminsterquot;, quot;geocoding_ambiguousquot;:quot;quot;, quot;venue_namequot;:quot;Church House ... quot;, quot;venue_cityquot;:quot;Londonquot;, quot;venue_state_idquot;:quot;59quot;, quot;longitudequot;:quot;quot;, quot;venue_country_idquot;:quot;6quot;, quot;venue_country_namequot;:quot;United Kingdomquot;, quot;venue_urlquot;:quot;http://url/quot;, quot;namequot;:quot;@media Ajaxquot;, quot;titlequot;:quot;quot; quot;start_timequot;:quot;09:00:00quot;, }, quot;geocoding_precisionquot;:quot;quot;, quot;descriptionquot;:quot;After a hugely successful, ....quot;, 5
  6. 6. Finding the timezone Couple of providers with APIs Geonames Google Yahoo Location Extractor 6
  7. 7. Converting to a Timezone http://www.geonames.org Good set of web service methods Documentation helpful Various response formats 7
  8. 8. Process Extract 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
  9. 9. Considerations Time of response - caching? Frequency of change, how do we keep this up to date? 9
  10. 10. Step up Yahoo Pipes 10
  11. 11. Further Info http://www.themattharris.com http://pipes.yahoo.com/themattharris/ upcomingusergetwatchlist Thanks also to Kent Brewster,Yahoo Inc for Pipes help 11

×