Usually on this blog and the associated site I cover topics to do with getting data in an out of Excel. Lately though, I've been playing around with using Google Apps Script as a proxy and publishing data out of Google Apps Scripts.
I've brought many of those concepts together to create a single publisher to expose your scripts, scriptdb data and other public content in a variety of formats such as standalone web page, a js function that returns the html code for a page, as json data and as jsonp data. I've also included a code prettifier and json beautifier in the code.
GAS just keeps getting better. I was thinking the other day about how I might be able to embed sample Google Apps Script code in Google Sites, or other web sites in the way that you can embed Gist samples from github.
Here's how to use a new (I think undocumented) method of the ScriptApp Class to help publish the source code of your script file.
Excel liberation is all about being able to step outside Excel, whether it's getting public data, integrating with other platforms or in the case of today's post, interacting with and delegating processing to the cloud on a completely different environment.
Visualization: Every hurricane since 1851. ... On Monday, our friends at The Guardian Data Store posted a very cool visualization of the world's hurricanes since 1851 by John Nelson. The underlying dataset is from NOAA's ...
I came across a great site, builtwith.com, that shows the technology being used in a given web site. You can also take a look and see the usage of various specific technologies over time. Now, this site has an API, so I thought I'd add it to the rest library.
Here's the output for 'msdn.com'. (Interesting that microsoft are using both google webmaster and bing webmaster).
In Proxy jsonp we covered how to fake jsonp requests using google content service. Another advantage of piping this stuff through Google Apps script is that we can now use the Google Caching service to speed up multiple requests for the same thing.
It's been a while since I played around with d3.js. Previously I've covered Sankey diagrams, trees, force diagrams and a few others - all directly fromf excel. Now here's how to create a zoomable d3.js partition chart straight out of excel.
In publishing gists and publishing Google Apps Scripts I showed how to prettify and embed snippets in web sites, blogs and so on. However, one last requirement is to be able to publish only particular functions. Although you can select particular modules and libraries for publication, this is probably not granular enough for small snippets. So here's how to select particular functions from a module for publication, from both Google Apps Script and Github.
The other day, I showed how to prettify Google Apps Script snippets and scriptDB contents, include them in web sites, blogs and google sites, and encode them in jSon and jSonP using the GAS content service and html service. This provides a simple way to share your code. Here's how to publish, prettify and embed source code GIst snippets in exactly the same way.
When working with spreadsheet data, I always use sheet caching - a class in the mcpher library. This gives great performance improvements and simplification for processing Sheet Data and other attributes. But the cache doesn't persist across discrete function calls. Here's how to get performance when you have reference material in a Spreadsheet.
Here's how to embed all your public Google Apps Script code snippets and scriptDB data in Google Sites and other consumers. http://ramblings.mcpher.com/Home/excelquirks/gaspublish. Includes code and jSon prettification, standalone publishing and publishing data as jSon and jSonp objects. No server required - it's all done with GAS templates, HTML service and content service.
I don't know about you, but I have trouble keeping all my various Google Apps Script shortcuts and keys (links to workbooks, links to content service queries, library keys and so on) under control and organized. I think that previous posts about using the scriptDB as a lockbox, using Google Apps Script as a jsonP proxy and various others showed the power of ScriptDB for sharing data both inside and outside the Google Apps Script environment. Here's how to organize all your publicly shared GAS links and keys and distribute them with json.
In the builtwith.com api rest library entry for Excel I covered how to get data about a given web site using the builtwith.com API. I went against my usual rule here, by including an api that needs an API Key. Here's how to securely store your API keys in one place, and use them without exposing them in your code.
In Google Caching and faking jsonP, i showed how to use google cache to avoid multiple calls to the same json data. One of things i discovered was that the key value in google cache services has an undocumented maximum length, so the challenge is to figure out how to come up with a unique key that will not break any limits, given a URL of unpredictable length.
One way to shorten the key is to use the a cryptographic hash function. Google apps script has a variety of these built-in. I selected the SHA_1 function since it is pretty collision resistant (meaning it is unlikely that 2 keys will be hashed to the same result).
So here is a function to shorten a key to a manageable size.
If you are reading this, I guess you are familiar with this error message "XMLHttpRequest cannot load somedata.json. Origin null is not allowed by Access-Control-Allow-Origin."
Here's how to use Google Apps Script as a Proxy for all your jsonp needs.
Sharing your scoops to your social media accounts is a must to distribute your curated content. Not only will it drive traffic and leads through your content, but it will help show your expertise with your followers.
How to integrate my topics' content to my website?
Integrating your curated content to your website or blog will allow you to increase your website visitors’ engagement, boost SEO and acquire new visitors. By redirecting your social media traffic to your website, Scoop.it will also help you generate more qualified traffic and leads from your curation work.
Distributing your curated content through a newsletter is a great way to nurture and engage your email subscribers will developing your traffic and visibility.
Creating engaging newsletters with your curated content is really easy.