In this project, we read COVID-19 coronavirus data available from World Health Organization and load it into Google Sheet, where this is one of the data sources used for a data visualisation work created for COVID-19 updates on Tableau Public.
Tool:
To load COVID-19 data onto Google Sheet, we use pygsheets
written by Nithin Murali. This is a simple, intuitive Python library to access Google spreadsheets through the Google Sheets API v4.
Although we can use the importData()
function in Google Sheet itself to obtain data directly from a URL, there are some limitations and it would not work for large datasets.
Pre-requisite:
Before running the codes, we first need to go to Google Developer Console to enable the Google Drive API, create a service account and download the private key in a JSON file for account authorization.
We will also need to share the specific Google Sheet with the service account email address.