NUKnightLab / TimelineJS3

TimelineJS v3: A Storytelling Timeline built in JavaScript. http://timeline.knightlab.com
Mozilla Public License 2.0
2.99k stars 621 forks source link

Is it possible to use a private spreadsheet if we use something like jlord/sheetsee.js? #555

Closed mccrodp closed 7 years ago

mccrodp commented 7 years ago

Awesome library / app guys, I have a PoC of an app working now with it to use it as a Availability Forecasting tool.

I'm wondering if it's possible to make the Google Sheet private and load it using a method like https://github.com/jlord/sheetsee.js/ which was suggested to me by a colleague.

What do you think?

We might move to JSON down the line, but initially the spreadsheet option is a lot more manageable / dynamic, but it needs to be private.

mccrodp commented 7 years ago

It looks like that might not help us here, that sheetsee library.

I tried using https://www.npmjs.com/package/google-spreadsheet-to-json to export the Google sheet to JSON, but then the formatting doesn't match what's expected.

What about putting something like Google's Auth library infront of this. I wonder how much work is involved there, any ideas to point me in the right direction? https://www.npmjs.com/package/google-auth-library

JoeGermuska commented 7 years ago

As we know from StoryMapJS, Google Authentication is complex, and since private spreadsheets are not a primary use-case, we would be disinclined to add that to TimelineJS.

Our recommendation to people who don't want their data in a published Google spreadsheet is to create a JSON file which can be served from a web server which uses any web authentication method appropriate to control which browsers can retrieve that data. See http://timeline.knightlab.com/docs/json-format.html for more on the JSON file format.

We would consider a pull request which implemented CSV parsing, such that a CSV file using the same format as the Google sheets could be loaded by URL, and thus protected in a fashion similar to the above method described for protecting a JSON file.

mccrodp commented 7 years ago

Ok, thanks for letting me know. Will discuss and get back to you with a PR or questions about implementing same if we decide to go the CSV route.