Weather and climate data
NOAA Climate Data Online offers free access to an archive of historical weather and climate data and station information.
import requests
url = "https://api.noaa.gov/climate/data" # Placeholder URL. Actual API endpoints and parameters are not specified in the provided content.
# Example of how to add parameters if an actual endpoint were known:
# params = {"datasetid": "GHCND", "locationid": "FIPS:US", "startdate": "2023-01-01", "enddate": "2023-01-01"}
# response = requests.get(url, params=params)
response = requests.get(url)
if response.status_code == 200:
print(response.json())
else:
print(f"Error: {response.status_code} - {response.text}")Last 50 checks (10 min intervals)