guug11 mashing up-google_apps

35
Mashing Up Google Apps Tony Hirst Dept of Communication and Systems The Open University Wiring Before http://www.flickr.com/photos/kelp/4894

Upload: tony-hirst

Post on 21-May-2015

11.587 views

Category:

Education


0 download

TRANSCRIPT

Page 1: Guug11 mashing up-google_apps

Mashing Up Google Apps

Tony Hirst

Dept of Communication and Systems

The Open University

Wiring Before http://www.flickr.com/photos/kelp/4894023263

Page 2: Guug11 mashing up-google_apps

Google Apps as a mashup environment

Page 3: Guug11 mashing up-google_apps

(Interaction and Display)

Native Functions

Google Apps Script

APIs

Page 4: Guug11 mashing up-google_apps

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…

Page 5: Guug11 mashing up-google_apps

Google Apps as a mashup environment

Scripted integration of Google Apps

Glue in “free form” data

driven mashups

Page 6: Guug11 mashing up-google_apps

Scripted integration of Google Apps

Page 7: Guug11 mashing up-google_apps

‘We have a spreadsheet of OU broadcast

campaigns – can you get them into a

calendar?’

Page 8: Guug11 mashing up-google_apps
Page 9: Guug11 mashing up-google_apps

Google spreadsheet+

Google Apps ScriptInto

Google Calendar

Page 10: Guug11 mashing up-google_apps

Google Apps Script provides a way of working with

representations that have a natural expression in a user

facing application

Page 11: Guug11 mashing up-google_apps
Page 12: Guug11 mashing up-google_apps

http://www.rsc-ne-scotland.org.uk/mashe/category/google-apps/

http://bit.ly/gqAX17

Martin Hawksey's

JISC RSC MASHe blog

Page 13: Guug11 mashing up-google_apps

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

Page 14: Guug11 mashing up-google_apps

Glue in “free form” data

driven mashups

Page 15: Guug11 mashing up-google_apps

Google spreadsheetGoogle spreadsheetGoogle Apps script

Google Apps script

Google Visualisation APIGoogle Visualisation API

Google Spreadsheets as a mashup environment

Page 16: Guug11 mashing up-google_apps

Getting stuff in...

Page 17: Guug11 mashing up-google_apps

Creating a database on the fly…

Page 18: Guug11 mashing up-google_apps

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 );}

1. Obtain a list of page URLs to be scraped

2. Create a new sheet for each page using

1. Add an =importHTML formula with page URL to each new sheet

var ss = SpreadsheetApp.getActiveSpreadsheet()ss.insertSheet( sname )sheet = ss.getSheetByName( sname );

Page 19: Guug11 mashing up-google_apps

Formulae

Page 20: Guug11 mashing up-google_apps

=googlelookup("Brazil", "capital")

Page 21: Guug11 mashing up-google_apps

linked data

Linked Data

Page 22: Guug11 mashing up-google_apps

=OUdata_courses(coursecode, [properties])

Page 23: Guug11 mashing up-google_apps

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 );}

Page 24: Guug11 mashing up-google_apps

Google Spreadsheets as a database

Page 25: Guug11 mashing up-google_apps
Page 26: Guug11 mashing up-google_apps

=QUERY('ISO Country Codes'!A2:B268, "select A,B where A contains 'FRANCE' limit 1")))

Page 27: Guug11 mashing up-google_apps

"Events, dear boy, events..."

Page 28: Guug11 mashing up-google_apps
Page 29: Guug11 mashing up-google_apps
Page 30: Guug11 mashing up-google_apps

...getting stuff out

Page 31: Guug11 mashing up-google_apps

DataStore Explorer

Page 32: Guug11 mashing up-google_apps

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.

Page 33: Guug11 mashing up-google_apps

Creating an effective mashup requires cunning, laziness, and

a playful attitude…

Page 34: Guug11 mashing up-google_apps

…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…

Page 35: Guug11 mashing up-google_apps

@psychemedia

http://blog.ouseful.info