climata is a pythonic interface for loading and processing time series data from climate and flow monitoring stations and observers. climata leverages a number of webservices as listed below. climata is powered by wq.io, and shares its goal of maximizing the reusability of data parsing code, by smoothing over some of the differences between various data formats.
# Recommended: create virtual environment # python3 -m venv venv # . venv/bin/activate pip install climata
See https://github.com/heigeo/climata to report any issues.
# Load metadata for sites in Upper Klamath Lake basin wq cat climata.acis.StationMetaIO "basin=18010203" > sites.csv # Load daily average temperature for these sites PARAMS="basin=18010203,start_date=2017-01-01,end_date=2017-01-31,parameter=avgt" wq cat climata.acis.StationDataIO "$PARAMS" > data.csv
from climata.acis import StationDataIO # Load average temperature for sites in Upper Klamath Lake basin sites = StationDataIO( basin="18010203", start_date="2017-01-01", end_date="2017-01-31", parameter="avgt" ) # Display site information and time series data for site in sites: print site.name for evt in site.data: print evt.date, evt.avgt
More Python code examples are available via the climata-viewer website.