Loads climate and hydrology data from ACIS (NOAA RCCs), CoCoRaHS, Hydromet (USBR), SNOTEL AWDB (NRCS) and NWIS (USGS).
Project description
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.
Getting Started
# Recommended: create virtual environment
# python3 -m venv venv
# . venv/bin/activate
pip install climata
See https://github.com/heigeo/climata to report any issues.
Available Services
Module |
Classes |
Data Source |
Agency/Org. |
---|---|---|---|
StationMetaIO, StationDataIO |
NOAA RCCs |
||
WqxDomainIO |
EPA |
||
CocorahsIO |
CoCoRaHS |
||
DailyDataIO, InstantDataIO, AgrimetRecentIO |
USBR |
||
HydroForecastIO, EnsembleForecastIO, EnsembleSiteIO |
NWS |
||
StationIO, StationDailyDataIO, RegionDailyDataIO |
NRCS |
||
SiteIO, DailyValueIO, InstantValueIO |
USGS |
Usage
Command-line interface:
# 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
Python API:
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file climata-0.5.0.tar.gz
.
File metadata
- Download URL: climata-0.5.0.tar.gz
- Upload date:
- Size: 22.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bf00910b64606df644dabfcec1cdd0b279c1cb0168e52f75e59d0eccbabc2b2 |
|
MD5 | 714b38e7f91f640f59124391a243bc1c |
|
BLAKE2b-256 | ac160aed9e415ea8093f8198a64b418769fc59ee4e78392f3545db19fdd6d3a8 |