Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Guug11 mashing up-google_apps

12,276 views

Published on

Published in: Education, Technology, Business
  • Be the first to comment

Guug11 mashing up-google_apps

  1. 1. Mashing Up Google Apps Tony Hirst Dept of Communication and Systems The Open University Wiring Before http://www.flickr.com/photos/kelp/4894023263
  2. 2. Google Apps as a mashup environment
  3. 3. (Interaction and Display) Native Functions Google Apps Script APIs
  4. 4. Heavy lifting done by pre-existing applications or code libraries with each stage acting on naturally expressed representations of data from the preceding stage in the pipeline Mashups as pipelines…
  5. 5. Google Apps as a mashup environment Scripted integration of Google Apps Glue in “free form” data driven mashups
  6. 6. Scripted integration of Google Apps
  7. 7. ‘ We have a spreadsheet of OU broadcast campaigns – can you get them into a calendar?’
  8. 9. Google spreadsheet + Google Apps Script Into Google Calendar
  9. 10. Google Apps Script provides a way of working with representations that have a natural expression in a user facing application
  10. 12. http://www.rsc-ne-scotland.org.uk/mashe/category/google-apps/ http://bit.ly/gqAX17 Martin Hawksey's JISC RSC MASHe   blog
  11. 13. Collect/backup tweets in a Google Spreadsheet [Twitteralytics v2] Linking a Google Form with data from the responses in the Spreadsheet [Event/Resource Booking] gEVS – An idea for a Google Form/Visualization mashup for electronic voting The best Google Spreadsheet Event Manager (w/h Sites, Contact, Calendar integration) ever, ever, ever Convert time stamped data to timed-text (XML) subtitle format using Google Spreadsheet Script
  12. 14. Glue in “free form” data driven mashups
  13. 15. Google spreadsheet Google Apps script Google Visualisation API Google Spreadsheets as a mashup environment
  14. 16. Getting stuff in...
  15. 17. Creating a database on the fly…
  16. 18. Scraping multiple pages… var ss = SpreadsheetApp.getActiveSpreadsheet(); for ( page in pages ) ss.insertSheet( name( pages[ page ] ], 1 ); sheet = ss.getSheetByName( sname ); addTableImporter( sheet, I ) function addTableImporter( ss, n ) { var sc = ss.getActiveCell(); var c = []; c[0] = “=importHTML(‘”++”’) ; var arr = []; arr[ 0 ] = c; var destinationRange = ss.getRange( 1, 1, 1, 1 ); destinationRange.setValues( arr ); } <ul><li>Obtain a list of page URLs to be scraped </li></ul><ul><li>Create a new sheet for each page using </li></ul><ul><li>Add an =importHTML formula with page URL to each new sheet </li></ul>var ss = SpreadsheetApp.getActiveSpreadsheet() ss.insertSheet( sname ) sheet = ss.getSheetByName( sname );
  17. 19. Formulae
  18. 20. = googlelookup (&quot;Brazil&quot;, &quot;capital&quot;)
  19. 21. linked data Linked Data
  20. 22. = OUdata_courses ( coursecode , [ properties] )
  21. 23. function OUdata_courses(cc,props) { var args = _OUdata_SPARQL(‘courses’,cc,props) var sparqlResult = UrlFetchApp.fetch( 'http://data-gov.tw.rpi.edu/ws/sparqlproxy.php', {method: 'post', payload: args} ); return _handleSPARQLresult( sparqlResult ); }
  22. 24. Google Spreadsheets as a database
  23. 26. =QUERY('ISO Country Codes'!A2:B268, &quot;select A,B where A contains 'FRANCE' limit 1&quot;)))
  24. 27. &quot;Events, dear boy, events...&quot;
  25. 30. ...getting stuff out
  26. 31. DataStore Explorer
  27. 32. The art of the mashup lies in breaking a problem down into a series of discrete functional steps, each of which can be handled by something that already exists.
  28. 33. Creating an effective mashup requires cunning, laziness, and a playful attitude…
  29. 34. … which is to say, a willingness to use as building blocks things that may not have originally been intended as such, such as Google Apps…
  30. 35. @psychemedia http://blog.ouseful.info

×