Note: Pyoos is very much a work in progress and should considered experimental until a 1.0 release is made!
Pyoos attempts to fill the need for a high level data collection library for met/ocean data publically available through many different websites and webservices.
Pyoos will collect and parse the following data services into the Paegan Discrete Geometry CDM:
- IOOS SWE SOS 1.0 Services
- ex. NcSOS instance: sos.maracoos.org/stable/sos/wflow700-agg.ncml
- ex. IOOS 52N instance: ioossos.axiomalaska.com/52n-sos-ioos-stable
- NERRS Observations - SOAP
- NDBC Observations - SOS
- CO-OPS Observations - SOS
- STORET Water Quality - WqxOutbound via REST (waterqualitydata.us)
- USGS NWIS Water Quality - WqxOutbound via REST (waterqualitydata.us)
- USGS Instantaneous Values - WaterML via REST
- NWS AWC Observations - XML via REST (http://www.aviationweather.gov)
- HADS (http://www.nws.noaa.gov/oh/hads/ - limited to 7 day rolling window of data)
# (minx, miny, maxx, maxy)
collector.filter(bbox=(-74, 30, -70, 38))
from dateime import dateime, timedelta
collector.filter(start=datetime.utcnow() - timedelta(hours=1))
from dateime import dateime
collector.filter(end=datetime.utcnow())
from dateime import dateime, timedelta
collector.filter(start=datetime.utcnow - timedelta(hours=24), end=datetime.utcnow())
It is highly dependent on the data provider how they identify unique features/stations/objects. Pyoos does its best job to figure out what you are passing in. For example, you may pass WMO ID's to the NDBC collector and Pyoos will request the correct complete URN to the NDBC SOS.
collector.list_features()
# Any iterable of strings
collector.filter(features=["21KY-BSW004"])
Pyoos does its best job to format any string into the correct format for the actual request. For example, you may pass typical standard_name string from CF-1.6 to the NDBC collector and Pyoos will turn it into a complete MMI URI.
collector.list_variables()
# Any iterable of strings
collector.filter(variables=["sea_water_temperature"])
collector.clear()
You may chain many filter
calls together (it returns a collector
object)
collection.filter(bbox=(-74, 30, -70, 38)).filter(end=datetime.utcnow())
You may also combine many filter types into one call to filter
collection.filter(bbox=(-74, 30, -70, 38), end=datetime.utcnow())
collector.collect()
collector.raw()
Each collector may implement a set of functions specific to that collection. Please see the Wiki for an explanation of this type of functionality.
You are using virtualenv
, right?
- Install virtualenv-burrito
- Create virtualenv named "pyoos-dev":
mkvirtualenv -p your_python_binary pyoos-dev
- Start using your new virtualenv:
workon pyoos-dev
Pyoos requires python 2.7.x and is available on PyPI.
The best way to install Pyoos is through pip:
pip install pyoos
Pyoos requires the following python libraries which will be downloaded
and installed through pip
:
- Paegan>=0.9.9
- numpy>=1.7.0
- scipy
- netCDF4>=1.0.2
- Shapely>=1.2.15
- pytz
- python-dateutil>=1.5
- OWSLib (install from git with
pip install git+https://github.com/geopython/OWSLib.git
) - requests
- Fiona==0.16.1
- beautifulsoup4==4.2.1
- lxml>=3.2.0
If your NetCDF4 and HDF5 libraries are in non-typical locations, you
will need to pass the locations to the pip
command:
NETCDF4_DIR=path HDF5_DIR=path pip install pyoos
There seems to be a problem installing numpy through pip
dependency
chains so you may need to install numpy before doing any of the above:
pip install numpy==1.7.0
- Development of a standardized Metadata concept, possibly through SensorML and/or ISO 19115-2
Submit a PR with your use case!
There is a Google Groups mailing list for pyoos: https://groups.google.com/forum/#!forum/pyoos
If you are having trouble getting any of the pyoos functionality to work, try running the tests:
git clone [email protected]:asascience-open/pyoos.git
cd pyoos
python setup.py test
- Kyle Wilcox [email protected]
- Sean Cowan [email protected]
- Alex Crosby [email protected]
- Dave Foster [email protected]
- Filipe Pires Alvarenga Fernandes [email protected]
Copyright (C) 2012-2016 RPS ASA
This file is part of Pyoos.
Pyoos is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Pyoos is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with Pyoos. If not, see http://www.gnu.org/licenses/.