Scraperwiki data to Google Docs

There is also a Google Apps script version of  Getting data out of scraperWiki. It uses the mcpher library and the test data and examples can be found in this Google Document

 
There is a rest library entry to populate a google spreadsheet with public data available in scraperWiki. Here’s how to find out whether there are any tables associated with each one. 
 
 

function testScraperWikiWhatWorks() {
  mcpher.swSeewhatworks ("scraperWiki");
}

And here is how to get data to a particular worksheet  from a given short Name.


function testScraperWikiInput() {
    testScraperWikiData (mcpher.InputBox("shortname?"));
}
function testScraperWikiData(shortName) {
    mcpher.scraperWikiStuff (shortName, "scraperwikidata");
}

For more information on scraperWki and how this works, see the Excel version.  Here’s an example of data retrieved into Google Apps Script.

 

GAS code

 

The code, and how to include it in your project can be found in the mcpher library , at this Gist, and below.

As an aside, here’s an interesting way to combine these multiple APIS into one. For more like this, take a look at how the From VBA to Google Apps Script. In the meantime why not join our forum, follow the blog or follow me on twitter

Transitioning is covered more comprehensively in my book, Going Gas – from VBA to Apps script.