Live data from Hacker News

Use a Google Spreadsheet as your JSON backend

coderwall.com

51–60 of 69 posts

Re: Use a Google Spreadsheet as your JSON backend

#51
post #20

Hmm, I would think thrice, before I go his path again. Thought it was a clever idea to use the mixture of easy to maintain spreadsheets, the cron service and JSON to feed huge satellite images into a tiling service (zoom.it) and let Google autonomously update and serve the list of daily mosaics as JSON. I got used to daily time out messages, but waiting 1 min for a (cached!) 10 kb JSON list is far too much. However,…

I always stick a caching proxy in front of it rather than using it directly. ( Mine is actually public but doesn't come with an SLA)...

Re: Use a Google Spreadsheet as your JSON backend

#52
post #35

Yes I have done this. Google make it particularly difficult to get the URL of the spreadsheet. And that od6? Thats if you have multiple tabs, they have random identifiers. Its almost impossible to work out what they will be. Its like they are on the web but not of the web. But it is an easy interface for unskilled users to add data to say a graph on a website, have done that for clients and they have been very happy.

The tab identifiers are actually listed in the Spreadsheets API, inside the "worksheets" feed: https://developers.google.com/google-apps/spreadsheets/#work... As a historical note, these identifiers used to be part of the URL, long ago. The newer version of the Spreadsheets frontend doesn't use them, but they're still used by the Spreadsheets API.

Yeah I used the API but ita a bit overkill just to get this. I wrote a JavaScript function to get the spreadsheet URL inside the sheet but there isn't one to get the worksheet URL.

Re: Use a Google Spreadsheet as your JSON backend

#53
post #20

Hmm, I would think thrice, before I go his path again. Thought it was a clever idea to use the mixture of easy to maintain spreadsheets, the cron service and JSON to feed huge satellite images into a tiling service (zoom.it) and let Google autonomously update and serve the list of daily mosaics as JSON. I got used to daily time out messages, but waiting 1 min for a (cached!) 10 kb JSON list is far too much. However,…

I always stick a caching proxy in front of it rather than using it directly. ( Mine is actually public but doesn't come with an SLA)...

Yes, I ended up using App Engine's memcache on top, much faster.

Re: Use a Google Spreadsheet as your JSON backend

#54

..FWIW, for those of you who haven't been enlightened with the power that Google Apps Script[1] offers yet, be sure to check it out: http://script.google.com . Layered on top of Spreadsheets, this pair takes prototyping to a whole new level. [1] https://developers.google.com/apps-script/

VBA in the cloud?

Re: Use a Google Spreadsheet as your JSON backend

#55
There is a wonderful example - a crowdsourced collection of d3.js visualizations: http://christopheviau.com/d3list/gallery.html (all code GitHub, all data - a Google Spreadsheet everyone can contribute to).

GitHub: https://github.com/biovisualize/d3visualization

Spreadsheet: https://docs.google.com/spreadsheet/ccc?key=0AqMEGBUNwXeHdHp...

Re: Use a Google Spreadsheet as your JSON backend

#57
post #2

Tabletop is a great JS library for dealing with this: https://github.com/jsoma/tabletop

Tabletop creator here, thanks for mentioning it! It's funny - since my target audience was journalists I never ever ever thought of describing it as "getting JSON from Google Spreadsheets." Looks like it's time to update the ol' README.

Re: Use a Google Spreadsheet as your JSON backend

#59
I've implemented a Node.js app that used Google Spreadsheets as the backend for a client. They found it more cost effective for non-technical admins to deal with than building their own, so more power to them.

I wrote up some notes from the experience, as Google Spreadsheets is full of quirks and some of the APIs and other means of access are very easy to break - it is very easy to create a spreadsheet that will return broken JSON, for example, in some modes, and then cannot be fixed (ever) to return unbroken JSON.

https://www.exratione.com/2013/04/some-notes-on-csv-parsing-...

Re: Use a Google Spreadsheet as your JSON backend

#60
post #16

Good for prototyping, thanks. I'd be wary of using this in a live system though: relying on Google's public APIs/services is risky enough (Checkout is one example, Reader, etc) let alone an undocumented feature like this which could change/disappear suddenly. Edit: it has been pointed out that the criticism of their documented/public APIs may be unjustified. The issue here is that this particular feature is undocumen…

I maintain a library[1] that's pretty popular with the journalism crowd for converting Google Spreadsheets to JSON, and you're exactly right about the risk[2]. Google's been sitting on a bug for over 6 months now because API usage of Google Spreadsheets just isn't important enough to merit a fix[3].

We've sent people off into the caching world[4] to fit it on our end, but your criticism is unfortunately spot-on.

[1] https://github.com/jsoma/tabletop

[2] https://github.com/jsoma/tabletop#okay-wait-weve-got-a-big-p...

[3] http://productforums.google.com/forum/#!category-topic/docs/...

[4] http://github.com/jsoma/flatware

Post reply on HN