Web application built with Node.js that displays a sankey diagram from Google Sheets data. For each sheet in a spreadsheet, there is a separate diagram accessible through a dropdown.
-
Fill (potentially multiple) google sheets with data in the following format (leave first row for column names):
-
Create a sheet called
allowed_google_userswith emails of users who should have access to the application.
- Install dependencies using
npm install - Register the app with google (follow this tutorial for example). You will also obtain values for
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRETenv variables - Enable google sheets API and obtain
GOOGLE_SHEETS_API_KEYkey tutorial - Set the following environment variables:
PORT=80GOOGLE_CLIENT_ID=your_google_client_idGOOGLE_CLIENT_SECRET=your_google_client_secretGOOGLE_SHEETS_API_KEY=your_google_sheets_api_keyEXPRESS_SESSION_SECRET=your_session_secret(anything)SPREADSHEET_ID=your_spreadsheet_id(get it by visiting the spreadsheet and copying it from URL:https://docs.google.com/spreadsheets/d/<SPREADSHEET_ID>)
- Run the application using
npm start
Follow the gcloud documentation, don't forget to set env variables.
- Access the application at
localhost - Authenticate using your Google account
- Upon successful authentication, you will be able to view the sankey diagram from the Google Sheets data


