 Your new post is loading...
To support my research in Twitter community visualisation I’ve updated my Twitter Archiving Google Spreadsheet (TAGS) [formerly called twitteralytics – I pre-emptively changed the name to play nice with Twitter ToS]. This new version has some coding improvements and new features including a dashboard summary and advanced tools for getting user profile information and friend/follower relationships for social network analysis.
Found a good sample on the forums of something I had a hard time finding in the API reference or other docs. Posted a script on GitHub that allows you to add/remove controls for a UiApp in the callbacks attached to buttons.
Includes a quick hack for getting data from wolfram alpha and a spreadsheet version of the classic minesweeper
The code accesses images of letters stored in a Picasa account [Written in Portuguese/Coded in English].
Introducing AdSense Management Services in Google Apps Script...
For the next step I wanted to do something similar with the Open Archives Initiative Protocol for Metadata Harvesting (OAI-PMH). You can read more about OAI-PMH here but basically its a method for repositories to share information about the resources they’ve got. Here is a script I wrote to read OAI service ListIdentifiers and write to a spreadsheet. Using this with the SWAPBox repository we can get a distribution of submissions (the spreadsheet for this is here)
A while ago Tony (Hirst) posted a Fragment: Looking up Who’s in Whose Google+ Circles…,which highlights how friend and follower information can be extracted from Google using an undocumented API. Tony followed this up with So Where Am I Socially Situated on Google+? in which he used a genius bit of Python scripting to extract a large fragment of his extended Google+ network which he then processed in Gephi. Here’s my take on the problem, a Google Spreadsheet template to extract Google Plus network information for analysis in the tool of your choice, in my case NodeXL.
This diagram was generated from a twitter search archive stored in Google Spreadsheet using the TAGS template. Connections are created by using Apps Script to fetching data from the Google Social Graph API and storing as a two column list. The webpage then uses the Google Visualisation API to query the spreadsheet data and generate a force layout diagram using the d3.js library ('Top Nodes graph is generated using Google Visualization API). Check the 'Help' tab on the webpage for more information
"One of the things I'd been wanting to do for the camp is create a blog where news and developments can be published. Google Sites offers an "Announcement" page type, but it's not really as nice to work with a Blogger, as I had discovered here already. But the trouble with trying to combine a Blogger blog with a Google Sites website, is that both use templates neither of which can easily be made to be part of the other. The solution I came up with is to use Blogger for writing the blog, but have the RSS feed published into a Google Sites page. Conveniently, Google provides a scripting toolset, Google Apps Script (apparently this doesn't have anything to do with Google Apps, the service, but with Google apps, the suite of applications), that allows JavaScript access to the Sites object model (amongst other things). Here's the script I came up with:"
Two weeks ago, we had our inaugural Office Hours on Google+ Hangouts, bringing together Google Apps developers from the UK, Ireland, Russia, Brazil, Germany and the US to chat. Everyone asked great questions and provided feedback on many of the APIs. It was also exciting that Google+ for Google Apps was announced at the same time as our hangout. Given the strong interest in these Office Hours, we’re going to continue doing Hangouts with the Google Apps developer community. Some will be general Hangouts where all types of questions related to the Google Apps APIs will be welcome. Others will be focused on individual products and include core software engineers and product managers who are building the APIs you love.
Allows a script to temporarily cache results that take time to fetch/compute.
"This script allows you to list the content of a Google Collection in a Google site. This process can be executed automatically and have the site up to date with the content of the folders."
|
Information for Google Apps Developers...
"Managing the user accounts in a Google Apps domain can be a daunting task when you have hundreds or thousands of them and you have no tools to automate the process. The Google Apps Provisioning API allows developers to write user management applications in the programming language of their choice, but many system administrators prefer a script-based solution instead. The recently launched UserManager Apps Script service fills the gap, providing Google Apps domain administrators an easy way to automate tasks such as batch user creation or update. With the new Apps Script service, creating a user will be as easy as writing a single line of code"
Provides access to Google Groups
Inspired by LIBREAS.Library Grab your TwapperKeeper Archive before Shutdown! I’ve developed a Google Spreadsheet to export TwapperKeeper Archives. Here’s how:
Instead I switched to getting the Pipe as JSON. JSON input powers a lot of my other Google Spreadsheet toys like TAGS and Google+ network generator so I’ve a growing bank of code snippets I can throw together. Here’s my ‘Frankenstein’ code to read a JSON source and write to a sheet. Two little tricks in here are to recast the pubDate as a date so that it’s interpreted as such in the spreadsheet and writing the JSON objects to a sheet using normalised column headers to identify object elements (I borrowed this technique from the writing data Apps Script tutorial).
One of the first tutorials I did when starting with Google Apps Script was the Simple Mail Merge tutorial. Since then some of the Google Apps Script top contributors guest posted 4 ways to do Mail Merge using Google Apps Script. Today when I was trying to solve my own html email problem I decided a solution that best fitted my needs was using a slight variation of the Simple Mail Merge but letting the user use wiki markup to format the text. Fortunately Remy Sharp has already produced a library for Wiki to HTML using JavaScript. As Google Apps Script uses the JavaScript protocol no changes to the code where required other than just dropping in the wiki2html function.
@jamesAferreira has written an extension to Google Apps Script giving methods to search read & write to Google Fusion Tables
"When it comes to writing UI applications in Apps Script, we get a lot of requests to support event callbacks that are handled in the user’s browser. For example, if your application has a form, you may want to disable a button after it is clicked the first time. Until now, the only way to do that would be by using an event handler on the server to disable that button. Using Client Handlers, your application can now respond to events in the browser without the need to perform a round trip to Google Apps Script servers. By cutting out the round trip to the server, your app can respond instantly to user input. Imagine, for example, you want to provide your users with instant feedback within your app when a user types text where a number is expected. Ideally, you would want to warn users as they type the value, instead of waiting until the form is submitted. Having a server event handler for each keystroke is definitely overkill for such a simple and common task. Luckily, these use cases are now supported with Apps Script’s new Client Handlers and validators!"
"GASUnit is a simple unit test library for Google Apps Script. Library is very poor for the moment, but it will grow soon. It is fully integrated with Google spreadsheet : tests run in Script Editor results displayed in a dedicated sheet specific assertions for actions on Spreadsheet like : cell content, cell background color, ..."
Official introduction from the Google Apps Developer Blog
"Here’s the scenario: you create a form, you have a script that triggers onFormSubmit and all is well... until it gets popular. Occasionally you start having interlacing modifications from separate invocations of your script to the spreadsheet. Clearly, this kind of interlacing is not what you intended for the script to do. Up until now, there was no good solution to this problem -- except to remain unpopular or just be lucky. Neither are great solutions. Now, my friend, you are in luck! We’ve just launched the LockService to deal with exactly this problem. The LockService allows you to have only one invocation of the script or portions thereof run at a time. Others that would’ve run at the same time can now be made to wait nicely in line for their turn. Just like the line at the checkout counter."
|