This repo reads from a google spreadsheet, and formats the data to be easier to read.
This project is written in vanilla javascript (using ES6 things like await
and fetch
) and vanilla CSS (using CSS3 things like var()
). This is deployed to github pages.
The easiest way I found to connect to a Google Spreadsheet using vanilla JS in the browser is to use the Google Data API for it, as described in this handy article
Our URL using this api is: https://spreadsheets.google.com/feeds/list/1-l36tKe7PT3P1iYVJ4H7WpYfG5t0yXXTuH6wlFBbegY/od6/public/values?alt=json
The Google Data API is sorta deprecated - but their newer "Sheets API v4" still doesn't have an unauthenticated way to access this (even for a public spreadsheet). (as of 4/2019)
A public spreadsheet can be accessed as a CSV, but that's a little harder to parse than getting the JSON directly. If the Google Spreadsheets Data API gets turned off, we should investigate the Sheets API again (hopefully it supports this by then), or we may want to consume it as a "publish to web" CSV instead