Air-Quality-Index-India-GitHub-Actions
Repo for 2021 GitHub Actions Hackathon on DEV
- Google credentials are stored in GitHub Actions Environment Secrets.
- data.gov.in API Key is also stored in GitHub Actions Environment Secrets.
- A GitHub Action is created that can run manually or on a schedule [12PM UTC (8PM SGT)]
- Python 3.9 is setup using actions/setup-python@v2.3.0 and the pip packages are cached
- Dependencies are installed using py-actions/py-dependency-install@v2 based on requirements.txt (google auth, pygsheets & pandas).
- The Environment Secrets are exported to environment variables.
- Finally, the Python script is run with the environment variables passed as parameters.
- The script connects to data.gov.in API using API Key passed as a parameter.
- Then it pulls the latest AQI data for India and stores in pandas dataframe.
- The data is cleaned, formatted and the columns are renamed. Nulls are replaced by 0.
- Google sheet isβ¦