Using Sheets to JSON

290 views
Skip to first unread message

Shawn Day

unread,
Dec 1, 2018, 3:59:47 PM12/1/18
to SIMILE Widgets
I used to use the lovely URL converter to take a shared Google Sheet and make it available as a JSON data source for Exhibit.
When I attempted to use : https://docs.google.com/spreadsheets/d/e/2PACX-1vQIJyC-n5M3OKQbRT7FgdPrhxxDNuZZNebJprFRFlhgTLAUUpk97hTvoct0P5nn2Gye0T2bVd6DUfN8/pubhtml a very simple google sheet, it returns the error "Could not access page/Could not find page data." despite the fact that the sheet is both shared and published.
Any assistance greatly appreciated. I attempted to truncate the URL by removing the pubhtml with no luck. 
Thanks in advance,
Shawn

jjon

unread,
Dec 1, 2018, 4:32:11 PM12/1/18
to SIMILE Widgets
Hi Shawn,

This is what worked for me. I had a spreadsheet at

Note that 1qZ6Sgu2qcKy-Rbc-L_5YN-zJD2jErOw2BUhur3-yWlk is the ID for the sheet.

I did "publish to the web" and the dialog gave me this url:

Now ignore that URL. This is the <link> I put in the head of my Exhibit page to access JSON from that spreadsheet:
<link rel="exhibit/data" type="application/jsonp"


Notice that it uses the ID from the URL used to access the sheet directly.

More recently, for a different Exhibit, I found I had to further tinker with a data link URL such that:


Notice that /od6/ has been replaced by the number of the sheet: /1/; and, the gid has been tacked on to the end.
I found this blog post instructive as well.

Also, note David Karger's post to the list here.

Google keeps tinkering with stuff, and is not always very transparent about it.

Jon

Shawn Day

unread,
Dec 1, 2018, 4:34:35 PM12/1/18
to SIMILE Widgets
Thanks Jon. Much appreciated! Will head back to tinkering. Shawn

David Karger

unread,
Dec 1, 2018, 5:21:53 PM12/1/18
to SIMILE Widgets
Note that the latest incarnation of gdocs will also let you get a link to the data as a csv file that you can read into exhibit using the text/csv data type.  See for example 
--
You received this message because you are subscribed to the Google Groups "SIMILE Widgets" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simile-widget...@googlegroups.com.
To post to this group, send email to simile-...@googlegroups.com.
Visit this group at https://groups.google.com/group/simile-widgets.
For more options, visit https://groups.google.com/d/optout.

Shawn Day

unread,
Dec 2, 2018, 3:24:01 PM12/2/18
to SIMILE Widgets
Thanks David. Still puddling. Appreciate the pointer. Shawn

dhinostroza

unread,
Nov 14, 2019, 8:47:15 AM11/14/19
to SIMILE Widgets
Hi David,
The url http://people.csail.mit.edu/karger/Exhibit/Papers/ complains about MathZoom.js & similar dependencies. If you disregard the 'ReferenceError: Exhibit is not defined' the page can be loaded locally.  
As Sheets to JSON isn't working anymore I tried using Google Publish to web with the csv option but so far haven't been able to make the csv file load.
Is there any plan to get Sheets to JSON up and running again or is csv definitely the way to go from here on?
All the very best,
Daniel
To unsubscribe from this group and stop receiving emails from it, send an email to simile-...@googlegroups.com.

Luis Miguel Morillas

unread,
Nov 14, 2019, 9:00:16 AM11/14/19
to simile-...@googlegroups.com
Hi, Daniel

What's the issue with this page? I can see it ok


Saludos,

-- luismiguel  (@lmorillas)


To unsubscribe from this group and stop receiving emails from it, send an email to simile-widget...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/simile-widgets/967094a6-7ae7-4ca0-8995-41b40d94545e%40googlegroups.com.

dhinostroza

unread,
Nov 15, 2019, 9:37:08 AM11/15/19
to SIMILE Widgets
Hi, Luis Miguel:
The page loads fine from the MIT server but if you download it to localhost the page complains about Math dependencies.  I deleted the dependencies and the page loaded without the cloud tags.
Although I tried the csv option suggested by David, I couldn't make SIMILE Exhibit to load the Google sheets file. It just stops.
I managed to make the project work by copying the new spreadsheet contents to an old Google spreadsheet that had been validated by Sheets to JSON a few years back.
Best,
Daniel
To unsubscribe from this group and stop receiving emails from it, send an email to simile-...@googlegroups.com.

Luis Miguel Morillas

unread,
Nov 15, 2019, 10:03:14 AM11/15/19
to simile-...@googlegroups.com
I can run it on local. Maybe you are having some protocol issue? How are you serving de page? 


To unsubscribe from this group and stop receiving emails from it, send an email to simile-widget...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/simile-widgets/6a5d4791-45b7-4ae9-8d56-5f734f46112a%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages