Argo data python library
argopy is a python library that aims to easy Argo data access, visualisation and manipulation for regular users as well as Argo experts and operators.
Several python packages exist: we are currently in the process of merging and structuring these libraries to have a single powerfull tool.
Install
Since this is a library in active development, use direct install from this repo to benefit from the last version:
pip install git+http://github.com/euroargodev/argopy.git
Examples
Examples of data fetching, manipulation and visualisation are available on the erddap examples repository.
You can run and test live example notebooks on Binder (thanks Pangeo) here:
Usage
The primary data model used to manipulate Argo data is xarray.
Argo Data Fetcher
API usage:
from argopy import DataFetcher as ArgoDataFetcher
argo_loader = ArgoDataFetcher()
argo_loader = ArgoDataFetcher(backend='erddap')
argo_loader = ArgoDataFetcher(cachedir='tmp')
argo_loader.region([-85,-45,10.,20.,0,1000.]).to_xarray()
argo_loader.region([-85,-45,10.,20.,0,1000.,'2012-01','2014-12']).to_xarray()
argo_loader.profile(6902746, 34).to_xarray()
argo_loader.profile(6902746, np.arange(12,45)).to_xarray()
argo_loader.profile(6902746, [1,12]).to_xarray()
argo_loader.float(6902746).to_xarray()
argo_loader.float([6902746, 6902747, 6902757, 6902766]).to_xarray()
argo_loader.float([6902746, 6902747, 6902757, 6902766], CYC=1).to_xarray()
Devlopment roadmap:
We aim to provide high level helper methods to load Argo data from:
- Ifremer erddap
- local copy of the GDAC ftp folder (help wanted)
- the argovis dataset (help wanted)
- any other usefull access point to Argo data ?
At this point data are fetched in memory as xarray.DataSet. From there, it is easy to convert it to other formats like a Pandas dataframe:
ds = argo_loader.profile(6902746, 34).to_xarray()
df = ds.to_dataframe()
and to export it to files:
ds = argo_loader.region([-85,-45,10.,20.,0,1000.]).to_xarray()
ds.to_netcdf('my_selection.nc')
# or by profiles:
ds.argo.point2profile().to_netcdf('my_selection.nc')
Argo data manipulation with xarray
The argopy library provides an xarray accessor named argo to help manipulate and analyse data.
Example: Convert a collection of points to a collections of profiles:
from argopy import DataFetcher as ArgoDataFetcher
ds = ArgoDataFetcher(ds='bgc').float(5903248).to_xarray()
ds = ds.argo.point2profile()
Metadata
Release files for argopy 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| argopy-0.1.0.tar.gz | 15.8 kB | Without provenance | Details for argopy-0.1.0.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| argopy-0.1.0-py3.6.egg | Legacy Egg format | - | - | Details for argopy-0.1.0-py3.6.egg |
| argopy-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for argopy-0.1.0-py3-none-any.whl |
Total release size: 52.7 kB
Release files / argopy-0.1.0.tar.gz
| Download URL | argopy-0.1.0.tar.gz |
|---|---|
| Size | 15.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cc8c29a451c6f643d51979cf68ec98d611f359e7c000040636f5f635406b1235
|
|
BLAKE2b-256 checksum How to use checksums |
5faf7ac2272680532168f63df13b295f7fae5bc42adaeb89211c2924c57da7aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.7
|
Release files / argopy-0.1.0-py3.6.egg
| Download URL | argopy-0.1.0-py3.6.egg |
|---|---|
| Size | 17.9 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
047360d46d09adc2748342f7218fac63393eb37cd44a6c9ff069a40219bd53ea
|
|
BLAKE2b-256 checksum How to use checksums |
418c249ef79b6c352cd7bf8964452cd82d4c2a8c04d198180d69ba114f78880a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.7
|
Release files / argopy-0.1.0-py3-none-any.whl
| Download URL | argopy-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
83cc3fc23c94022e3fb38615fe762178b89c637cf651da8d5311994366ce8b12
|
|
BLAKE2b-256 checksum How to use checksums |
6e5bbb15efe6a6f0e041ab8b4ceae163598e60e5f175805365579fc48c1005a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.7
|
Security for argopy 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.