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 scraperWiki 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.

scraperWiki Google Apps Script


Transitioning is covered more comprehensively in my my book, Going Gas - from VBA to Apps script, available All formats are available now from O'Reilly,Amazon and all good bookshops. You can also read a preview on O'Reilly.





Comments