Created
September 26, 2019 05:14
-
-
Save alext234/465e615db9163cb99b332ba7501fb3ad to your computer and use it in GitHub Desktop.
Singapore NEA PSI API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from datetime import date | |
from datetime import timedelta | |
day = date.today()-timedelta(days=0) | |
dayStr = day.strftime("%Y-%m-%d") | |
rPsi = requests.get("https://api.data.gov.sg/v1/environment/psi?date=" + dayStr) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment