Breaking the Cell 
Using Google Apps Script and 
Sheets for social network data 
mining and analysis 
Martin Hawksey 
Chief Innovation, Technology 
and Community Officer 
@mhawksey 
This work is licensed under 
a Creative Commons Attribution 
3.0 Unported License. CC-BY 
mhawksey All links: http://bit.ly/breaking-cell
alt.ac.uk 
Goal 
◊ make you aware of social data 
opportunities 
◊ show you a toolset to achieve this 
http://bit.ly/breaking-cell
CC-BY-SA-NC 
Geoffery Kehrig 
Mother Of Invention :P 
https://flic.kr/p/bF3gjq 
http://bit.ly/breaking-cell
http://bit.ly/breaking-cell
http://bit.ly/breaking-cell
http://bit.ly/breaking-cell
http://bit.ly/breaking-cell
http://bit.ly/breaking-cell
http://bit.ly/breaking-cell
the network browser for Microsoft Excel™ 
http://bit.ly/breaking-cell
importFeed Warning: No persistence!!! 
alt.ac.uk 
http://bit.ly/breaking-cell
v {} 
alt.ac.uk 
http://bit.ly/breaking-cell
alt.ac.uk 
the hack 
http://bit.ly/breaking-cell
alt.ac.uk 
the hack (2) 
http://bit.ly/breaking-cell
alt.ac.uk 
the hack (2) 
http://bit.ly/breaking-cell
alt.ac.uk 
the hack (2) 
http://bit.ly/breaking-cell
v {} 
alt.ac.uk 
http://bit.ly/breaking-cell
CC-BY-NC-ND 
Geoff Llerena 
Dead End!!! 
http://bit.ly/breaking-cell https://flic.kr/p/f59zRU
Dr. Tony Hirst 
The Open University 
@psychemedia 
ouseful.info 
alt.ac.uk 
http://bit.ly/breaking-cell
Say hello to Google Apps Script 
CC-BY Google – Google Apps Script, 13-03-2012 
alt.ac.uk 
http://bit.ly/breaking-cell
alt.ac.uk 
Code in the cloud 
◊ Standalone Scripts 
script.google.com 
Google Drive > Create > Script 
◊ Container-bound 
– Google Documents, Sheets, Forms 
Tools > Script editor 
– Google Sites 
More > Manage Site > Apps Script 
http://bit.ly/breaking-cell
11 Google apps, 1 platform in the cloud 
Increase the power of your favorite Google apps — 
like Calendar, Docs, Drive, Gmail, and Sheets. 
Apps Script lets you do more with Google. All on a 
JavaScript platform in the cloud. 
http://bit.ly/breaking-cell alt.ac.uk
http://bit.ly/breaking-cell
“ 
alt.ac.uk 
JavaScript in the cloud 
Apps Script is based on JavaScript 1.6, 
plus a few features from 1.7 and 1.8. 
http://bit.ly/breaking-cell
http://bit.ly/breaking-cell alt.ac.uk
http://bit.ly/breaking-cell alt.ac.uk
http://bit.ly/breaking-cell alt.ac.uk
http://bit.ly/breaking-cell alt.ac.uk
alt.ac.uk 
The addiction continues… 
http://bit.ly/breaking-cell
“ 
You may provide spreadsheet or PDF files or 
alt.ac.uk 
other export functionality via non-programmatic 
means, such as using a “save 
as” button, for up to 100,000 public Tweets 
and/or User Objects per user per day 
http://bit.ly/breaking-cell
http://bit.ly/breaking-cell
http://bit.ly/breaking-cell
TAGSExplorer 
Powered by Google Sheets, Google 
http://bit.ly/breaking-cell Visualisation API and D3js
http://bit.ly/breaking-cell
Who are your top content 
distributors on Twitter?
[my link] 
alt.ac.uk 
http://bit.ly/breaking-cell
Step #1: Get t.co data from GA 
Try http://go.alt.ac.uk/ga-tco-referral 
[demo link] 
alt.ac.uk 
http://bit.ly/breaking-cell
Step #2: Search t.co’s on Twitter 
alt.ac.uk 
http://bit.ly/breaking-cell
alt.ac.uk 
Step #3: Make pretty… 
http://bit.ly/breaking-cell
alt.ac.uk 
Step #3: Make pretty… 
http://bit.ly/breaking-cell
http://bit.ly/breaking-cell TAGS - Twitter Archiving Google Sheet
http://bit.ly/breaking-cell TAGS - Twitter Archiving Google Sheet
http://bit.ly/breaking-cell TAGS - Twitter Archiving Google Sheet
http://bit.ly/breaking-cell TAGS - Twitter Archiving Google Sheet
http://bit.ly/breaking-cell TAGS - Twitter Archiving Google Sheet
Enable scripts to receive 
POST and/or GET 
function returns an HTML 
service HtmlOutput object, .. 
or a Content service 
TextOutput object. 
http://bit.ly/breaking-cell
alt.ac.uk 
Beyond Twitter 
http://bit.ly/breaking-cell
“ 
alt.ac.uk 
The Future of Ed-Tech is a 
Reclamation Project 
We can reclaim the Web 
and more broadly ed-tech 
for teaching and learning. 
But we must reclaim control 
of the data, content, and 
knowledge we create. 
©Alan Levine October 14, 2013 
https://flic.kr/p/gFKxes 
Audrey Watters 
Hack Education 
http://bit.ly/breaking-cell
alt.ac.uk 
Děkuji 
+MartinHawksey @mhawksey 
http://bit.ly/breaking-cell
Association for Learning Technology 
www.alt.ac.uk @A_L_T 
Registered charity number: 1063519
alt.ac.uk 
Update Your Twitter Archive with Google Drive 
http://bit.ly/breaking-cell
alt.ac.uk 
Update Your Twitter Archive with Google Drive 
http://bit.ly/breaking-cell
http://bit.ly/breaking-cell
or http://tweets.hawksey.info 
http://bit.ly/breaking-cell
http://bit.ly/breaking-cell
http://bit.ly/breaking-cell
http://bit.ly/breaking-cell
http://bit.ly/breaking-cell
“ 
alt.ac.uk 
The Future of Ed-Tech is a 
Reclamation Project 
We can reclaim the Web 
and more broadly ed-tech 
for teaching and learning. 
But we must reclaim control 
of the data, content, and 
knowledge we create. 
©Alan Levine October 14, 2013 
https://flic.kr/p/gFKxes 
Audrey Watters 
Hack Education 
http://bit.ly/breaking-cell
alt.ac.uk 
Děkuji 
+MartinHawksey @mhawksey 
http://bit.ly/breaking-cell
Association for Learning Technology 
www.alt.ac.uk @A_L_T 
Registered charity number: 1063519

Breaking the Cell #WebExpo

Editor's Notes

  • #7 Patrick Burns - Spreadsheet Addiction http://www.burns-stat.com/documents/tutorials/spreadsheet-addiction/ Overlap with my work as a web developer – ambiguity of a web page and viewsource:
  • #8 http://mashe.hawksey.info/2012/10/feeding-google-spreadsheets-exercises-in-import/ It’s easy to get data in … if you can find it
  • #10 http://mashe.hawksey.info/2013/02/lak13-recipes-in-capturing-and-analyzing-data-canvas-network-discussion-activity-data/ View spreadsheet source to see the formula used
  • #11 http://mashe.hawksey.info/2013/02/lak13-recipes-in-capturing-and-analyzing-data-canvas-network-discussion-activity-data/ View spreadsheet source to see the formula used
  • #12 http://mashe.hawksey.info/2013/02/lak13-recipes-in-capturing-and-analyzing-data-canvas-network-discussion-activity-data/ View spreadsheet source to see the formula used
  • #13 NodeXL the network browser for Microsoft Excel™
  • #14 No persistence – as new data comes in old is removed Feed is from Google’s cache (20 items opposed to 10 I’ve published in my feed)
  • #15 RSS/Atom versus JSON Google Sheets doesn’t do JSON as an import formula
  • #16  SharedCount is moving to all API key access but there is still a free level
  • #17 IMPORTDATA("http://pipes.yahoo.com/pipes/pipe.run?_id=507b1a09fc815cb9e8b00df9db442d69&_render=csv&url=http://mashe.hawksey.info”) Could do all this in Yahoo Pipes but why bother … there is a better way Variation of this technique at http://mashe.hawksey.info/2012/06/rss-feed-social-share-counting/
  • #18 IMPORTDATA("http://pipes.yahoo.com/pipes/pipe.run?_id=507b1a09fc815cb9e8b00df9db442d69&_render=csv&url=http://mashe.hawksey.info”) Could do all this in Yahoo Pipes but why bother … there is a better way Variation of this technique at http://mashe.hawksey.info/2012/06/rss-feed-social-share-counting/
  • #19 IMPORTDATA("http://pipes.yahoo.com/pipes/pipe.run?_id=507b1a09fc815cb9e8b00df9db442d69&_render=csv&url=http://mashe.hawksey.info”) Could do all this in Yahoo Pipes but why bother … there is a better way Variation of this technique at http://mashe.hawksey.info/2012/06/rss-feed-social-share-counting/
  • #20  OAuth logo, designed by Chris Messina CC BY-SA
  • #21 Dead end
  • #22 http://blog.ouseful.info/2010/03/04/maintaining-google-calendars-from-a-google-spreadsheet/
  • #23 About the badge Best educators take ownership. They create a personal experience 2010
  • #24 Need to install Chrome App to get create script from Drive menu Container bound scripts are included when you copy the parent document
  • #25 The power is that google have made it easy to access and use their product APIs and also not worry where to host the code It makes it very easy to write data in Drive to Sheets and more. Apps Script is cloud based and allows scheduling of scripts
  • #26 UrlFetch … like CURL https://developers.google.com/apps-script/reference/url-fetch/url-fetch-app
  • #27 https://developers.google.com/apps-script/guides/services/#basic_javascript_features These extra features include native JSON support
  • #28 http://mashe.hawksey.info/2010/06/using-google-spreadsheet-to-automatically-monitor-twitter/
  • #29 http://mashe.hawksey.info/2010/06/using-google-spreadsheet-to-automatically-monitor-twitter/
  • #30 http://mashe.hawksey.info/2010/06/using-google-spreadsheet-to-automatically-monitor-twitter/
  • #32 https://dev.twitter.com/overview/terms/rules-of-the-road
  • #33 http://mashe.hawksey.info/2011/11/twitter-how-to-archive-event-hashtags-and-visualize-conversation/
  • #34 http://mashe.hawksey.info/2011/11/twitter-how-to-archive-event-hashtags-and-visualize-conversation/
  • #35 http://mashe.hawksey.info/2011/11/twitter-how-to-archive-event-hashtags-and-visualize-conversation/
  • #36 Demo?
  • #37 http://mashe.hawksey.info/2012/03/combine-twitter-and-google-analytics-data-to-find-your-top-content-distributors/
  • #38 http://mashe.hawksey.info/2012/03/combine-twitter-and-google-analytics-data-to-find-your-top-content-distributors/
  • #39 Try on GA Query Explorer using http://go.alt.ac.uk/ga-tco-referral
  • #43 http://mashe.hawksey.info/2011/09/viralheat-sentiment-api-and-a-google-spreadsheet/ http://mashe.hawksey.info/2011/10/using-google-spreadsheet-to-feed-nodexl/ http://mashe.hawksey.info/2012/03/automatic-translation-of-tags-twitter-archives-using-google-apps-script-language-services/ http://mashe.hawksey.info/2014/01/making-a-twitter-hashtag-contributor-map-using-tags/ http://mashe.hawksey.info/2012/01/tags-r/
  • #44 http://mashe.hawksey.info/2011/09/viralheat-sentiment-api-and-a-google-spreadsheet/ http://mashe.hawksey.info/2011/10/using-google-spreadsheet-to-feed-nodexl/ http://mashe.hawksey.info/2012/03/automatic-translation-of-tags-twitter-archives-using-google-apps-script-language-services/ http://mashe.hawksey.info/2014/01/making-a-twitter-hashtag-contributor-map-using-tags/ http://mashe.hawksey.info/2012/01/tags-r/
  • #45 http://mashe.hawksey.info/2011/09/viralheat-sentiment-api-and-a-google-spreadsheet/ http://mashe.hawksey.info/2011/10/using-google-spreadsheet-to-feed-nodexl/ http://mashe.hawksey.info/2012/03/automatic-translation-of-tags-twitter-archives-using-google-apps-script-language-services/ http://mashe.hawksey.info/2014/01/making-a-twitter-hashtag-contributor-map-using-tags/ http://mashe.hawksey.info/2012/01/tags-r/
  • #46 http://mashe.hawksey.info/2011/09/viralheat-sentiment-api-and-a-google-spreadsheet/ http://mashe.hawksey.info/2011/10/using-google-spreadsheet-to-feed-nodexl/ http://mashe.hawksey.info/2012/03/automatic-translation-of-tags-twitter-archives-using-google-apps-script-language-services/ http://mashe.hawksey.info/2014/01/making-a-twitter-hashtag-contributor-map-using-tags/ http://mashe.hawksey.info/2012/01/tags-r/
  • #47 http://mashe.hawksey.info/2011/09/viralheat-sentiment-api-and-a-google-spreadsheet/ http://mashe.hawksey.info/2011/10/using-google-spreadsheet-to-feed-nodexl/ http://mashe.hawksey.info/2012/03/automatic-translation-of-tags-twitter-archives-using-google-apps-script-language-services/ http://mashe.hawksey.info/2014/01/making-a-twitter-hashtag-contributor-map-using-tags/ http://mashe.hawksey.info/2012/01/tags-r/
  • #48 https://developers.google.com/apps-script/guides/web Wrapper script at: http://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/
  • #49 http://ramblings.mcpher.com/Home/excelquirks/oauthtoo/ezyoauth2 https://github.com/googlesamples/apps-script-oauth2
  • #52 http://mashe.hawksey.info/2013/01/sync-twitter-archive-with-google-drive/
  • #53 http://mashe.hawksey.info/2013/01/sync-twitter-archive-with-google-drive/