Your Ocean Data Access in Python
Project description
[![Build Status](https://travis-ci.org/cormorack/yodapy.svg?branch=master)](https://travis-ci.org/cormorack/yodapy)
[![Build status](https://ci.appveyor.com/api/projects/status/29rvgs6u8t552ui2?svg=true)](https://ci.appveyor.com/project/lsetiawan/yodapy)
[![Coverage Status](https://coveralls.io/repos/github/cormorack/yodapy/badge.svg?branch=master)](https://coveralls.io/github/cormorack/yodapy?branch=master)
[![CodeFactor](https://www.codefactor.io/repository/github/cormorack/yodapy/badge/master)](https://www.codefactor.io/repository/github/cormorack/yodapy/overview/master)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
# yodapy
Your Ocean Data Access in Python (YODAPY)
## Installation
```bash
pip install yodapy
```
## Development
```bash
git clone https://github.com/cormorack/yodapy.git
cd yodapy
conda create -n yodapy -c conda-forge --yes python=3.6 --file requirements.txt --file requirements-dev.txt
source activate yodapy
pip install -e .
```
## Credentials
To start using yodapy for the ooi datasource,
you will need to setup your credential file.
*This will only need be set one time.*
```python
>>> from yodapy.utils.creds import set_credentials_file
>>> set_credentials_file(data_source='ooi', username='MyName', token='My secret token')
```
## Example running the program
```python
>>> from yodapy.datasources import OOI
>>> ooi = OOI()
>>> ooi.search(region='cabled', site='axial base shallow profiler', node='shallow profiler', instrument='CTD')
>>> ooi.view_instruments()
reference_designator name start_depth end_depth current_status preferred_stream preferred_parameter location
1287 RS03AXPS-SF03A-2A-CTDPFA302 CTD 5.0 200.0 ctdpf_sbe43_sample 908 Shallow Profiler
>>> ooi.data_availability()
{'RS03AXPS-SF03A-2A-CTDPFA302': [{'stream': 'ctdpf_sbe43_sample',
'method': 'streamed',
'count': 110547881,
'endTime': '2018-07-02T22:11:19.511Z',
'beginTime': '2014-10-07T21:32:53.602Z'}]}
>>> begin_date = '2018-01-01'
>>> end_date = '2018-01-02'
>>> ooi.request_data(begin_date=begin_date, end_date=end_date)
>>> ooi.check_status()
Request Completed
>>> ds_list = ooi.to_xarray()
>>> ds_list
[<xarray.Dataset>
Dimensions: (time: 86398)
...]
```
[![Build status](https://ci.appveyor.com/api/projects/status/29rvgs6u8t552ui2?svg=true)](https://ci.appveyor.com/project/lsetiawan/yodapy)
[![Coverage Status](https://coveralls.io/repos/github/cormorack/yodapy/badge.svg?branch=master)](https://coveralls.io/github/cormorack/yodapy?branch=master)
[![CodeFactor](https://www.codefactor.io/repository/github/cormorack/yodapy/badge/master)](https://www.codefactor.io/repository/github/cormorack/yodapy/overview/master)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
# yodapy
Your Ocean Data Access in Python (YODAPY)
## Installation
```bash
pip install yodapy
```
## Development
```bash
git clone https://github.com/cormorack/yodapy.git
cd yodapy
conda create -n yodapy -c conda-forge --yes python=3.6 --file requirements.txt --file requirements-dev.txt
source activate yodapy
pip install -e .
```
## Credentials
To start using yodapy for the ooi datasource,
you will need to setup your credential file.
*This will only need be set one time.*
```python
>>> from yodapy.utils.creds import set_credentials_file
>>> set_credentials_file(data_source='ooi', username='MyName', token='My secret token')
```
## Example running the program
```python
>>> from yodapy.datasources import OOI
>>> ooi = OOI()
>>> ooi.search(region='cabled', site='axial base shallow profiler', node='shallow profiler', instrument='CTD')
>>> ooi.view_instruments()
reference_designator name start_depth end_depth current_status preferred_stream preferred_parameter location
1287 RS03AXPS-SF03A-2A-CTDPFA302 CTD 5.0 200.0 ctdpf_sbe43_sample 908 Shallow Profiler
>>> ooi.data_availability()
{'RS03AXPS-SF03A-2A-CTDPFA302': [{'stream': 'ctdpf_sbe43_sample',
'method': 'streamed',
'count': 110547881,
'endTime': '2018-07-02T22:11:19.511Z',
'beginTime': '2014-10-07T21:32:53.602Z'}]}
>>> begin_date = '2018-01-01'
>>> end_date = '2018-01-02'
>>> ooi.request_data(begin_date=begin_date, end_date=end_date)
>>> ooi.check_status()
Request Completed
>>> ds_list = ooi.to_xarray()
>>> ds_list
[<xarray.Dataset>
Dimensions: (time: 86398)
...]
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yodapy-0.2.3b0.tar.gz
(115.9 kB
view details)
Built Distribution
yodapy-0.2.3b0-py3-none-any.whl
(113.2 kB
view details)
File details
Details for the file yodapy-0.2.3b0.tar.gz
.
File metadata
- Download URL: yodapy-0.2.3b0.tar.gz
- Upload date:
- Size: 115.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.10.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.23.3 CPython/3.6.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48052e96bdfa1e065d18a3bd91c73100d789e35b8f37c585e7914e1403b5e1ab |
|
MD5 | aaa63b106252742c88679a1c3bb1b0a1 |
|
BLAKE2b-256 | 23e7bac2166beb094b098026598b64d45310822b41bd4c30d537e23ff006be99 |
File details
Details for the file yodapy-0.2.3b0-py3-none-any.whl
.
File metadata
- Download URL: yodapy-0.2.3b0-py3-none-any.whl
- Upload date:
- Size: 113.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.10.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.23.3 CPython/3.6.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc2500fb2906435c3a27990553e23c0c94fcda0e49fda727f25c54ea3fe7ce99 |
|
MD5 | 2f2f7b5a4cd3c83dfb9c04c34d2d19f5 |
|
BLAKE2b-256 | f5fc5e34840ad40b72aa7bdb064b8ca9b372609dcf3c47bc43a1d03a717a5251 |