Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

Google Sheets

Vivek Shrinivasan edited this page Dec 2, 2021 · 2 revisions

After taking up responsibility from covid19india.org team, we haven't changed much of the workflow. Especially the way data is read from google sheets and the scripts that run on github actions that generates the endpoint.

This blog is an attempt to simplify the process that covid19india team took (read about how they did it over here)

Adding new google sheets

  1. Duplicate the existing google sheet file into the same directory
  2. Delete all content from the Raw_Data sheet
  3. Rename the file with the following nomenclature 2021-12-02_covid19bharat_v36_dec02 (date should be the date on which you start entering into this new sheet. For version, use the previous version + 1)
  4. Update the sheets-to-csv.js file in the src/ folder over here with the following
    1. Publish the new google sheet (File > Share > Publish to web) & copy the url
    2. In the js file, create a new variable eg: const PUBLISHED_SHEET_ID_36 = and assign only the id part of the url (remove everything else)
    3. Create another variable const SHEETS_V36 containing a list of all sheet names and sheet ids (usually this will remain the same after you duplicate the sheet file on gdrive, no changes should be required here)
    4. Edit the previous sheet id's variable to something like [["raw_data35", "0"]]
    5. At the end of the file update only to read the most recent 2 sheets await sheetsToCSV(SHEETS_V35, PUBLISHED_SHEET_ID_36);
Clone this wiki locally