Transcript

Mashing Up Google Apps

Tony Hirst

Dept of Communication and Systems

The Open University

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

Google Apps as a mashup environment

(Interaction and Display)

Native Functions

Google Apps Script

APIs

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…

Google Apps as a mashup environment

Scripted integration of Google Apps

Glue in “free form” data

driven mashups

Scripted integration of Google Apps

‘We have a spreadsheet of OU broadcast

campaigns – can you get them into a

calendar?’

Google spreadsheet+

Google Apps ScriptInto

Google Calendar

Google Apps Script provides a way of working with

representations that have a natural expression in a user

facing application

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

http://bit.ly/gqAX17

Martin Hawksey's

JISC RSC MASHe blog

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

Glue in “free form” data

driven mashups

Google spreadsheetGoogle spreadsheetGoogle Apps script

Google Apps script

Google Visualisation APIGoogle Visualisation API

Google Spreadsheets as a mashup environment

Getting stuff in...

Creating a database on the fly…

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

Formulae

=googlelookup("Brazil", "capital")

linked data

Linked Data

=OUdata_courses(coursecode, [properties])

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

Google Spreadsheets as a database

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

"Events, dear boy, events..."

...getting stuff out

DataStore Explorer

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.

Creating an effective mashup requires cunning, laziness, and

a playful attitude…

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

@psychemedia

http://blog.ouseful.info

top related