argopandas package API
The root package contains the interface for argopandas.
Global indexes
argopandas.meta
The
argopandas.global_index.GlobalMeta
for the currentdefault_mirror()
.
argopandas.tech
The
argopandas.global_index.GlobalTech
for the currentdefault_mirror()
.
argopandas.prof
The
argopandas.global_index.GlobalProf
for the currentdefault_mirror()
.
argopandas.traj
The
argopandas.global_index.GlobalTraj
for the currentdefault_mirror()
.
argopandas.bio_traj
The
argopandas.global_index.GlobalBioTraj
for the currentdefault_mirror()
.
argopandas.bio_prof
The
argopandas.global_index.GlobalBioProf
for the currentdefault_mirror()
.
argopandas.synthetic_prof
The
argopandas.global_index.GlobalSyntheticProf
for the currentdefault_mirror()
.
>>> import argopandas as argo
>>> argo.meta.head(1)
file profiler_type institution date_update
0 aoml/13857/13857_meta.nc 845 AO 2018-10-11 20:00:14+00:00
>>> argo.tech.head(1)
file institution date_update
0 aoml/13857/13857_tech.nc AO 2021-04-28 20:03:35+00:00
>>> argo.prof.head(1)
file date latitude longitude ocean profiler_type institution date_update
0 aoml/13857/profiles/R13857_001.nc 1997-07-29 20:03:00+00:00 0.267 -16.032 A 845 AO 2018-10-11 18:05:20+00:00
>>> argo.bio_prof.head(1)
file date latitude ... parameters parameter_data_mode date_update
0 aoml/1900722/profiles/BD1900722_001.nc 2006-10-22 02:16:24+00:00 -40.316 ... PRES TEMP_DOXY BPHASE_DOXY DOXY RRRD 2020-03-12 15:32:30+00:00
[1 rows x 10 columns]
>>> argo.synthetic_prof.head(1)
file date latitude longitude ... institution parameters parameter_data_mode date_update
0 aoml/1900722/profiles/SD1900722_001.nc 2006-10-22 02:16:24+00:00 -40.316 73.389 ... AO PRES TEMP PSAL DOXY DDDD 2020-10-30 13:30:05+00:00
[1 rows x 10 columns]
>>> argo.bio_traj.head(1)
file latitude_max latitude_min ... institution parameters date_update
0 bodc/3901496/3901496_BRtraj.nc None None ... BO PRES C1PHASE_DOXY C2PHASE_DOXY TEMP_DOXY DOXY ... 2021-07-22 15:44:18+00:00
[1 rows x 9 columns]
Mirror setters and getters
- default_mirror() argopandas.mirror.Mirror
Get the default mirror (e.g., used to populate the global indexes).
>>> import argopandas as argo >>> argo.default_mirror() argo.CachedUrlMirror('https://data-argo.ifremer.fr')
- set_default_mirror(mirror: argopandas.mirror.Mirror) argopandas.mirror.Mirror
Set the default mirror.
- Parameters
mirror – One of
url_mirror()
orfile_mirror()
.
- file_mirror(root) argopandas._interactive.MirrorContext
Returns a mirror from a local file system.
- Parameters
root – A directory that contains a dac/ directory and a listing of .txt.gz index files.
- url_mirror(root, cache_dir=None, cached=True) argopandas._interactive.MirrorContext
Returns a mirror with an optional cache directory.
- Parameters
root – A URL that contains a dac/ directory and a listing of .txt.gz index files.
cache_dir – Use
None
to use a temporary file or sepcify an existing cache directory.cached – Use
False
to skip the cache step completely and operate on data sets in memory.
- reset()
Forget cached index files and temporary downloads from the current mirror; redefine global indexes.
Quick access to floats and files
- float(float_id: Union[str, int, Iterator[Union[str, int]]]) Union[argopandas.float.Float, Iterator[argopandas.float.Float]]
Subset all the global indexes for a given float.
- Parameters
float_id – A string or int float identifier or iterable
- nc(path: Union[str, Iterator[str]]) Union[str, Iterator[argopandas.netcdf.NetCDFWrapper]]
Get a
netCDF4.Dataset
or iterate over multiple data sets.
- filename(path: Union[str, Iterator[str]]) Union[str, Iterator[str]]
Download a one or more files and return the filename.
- url(path: Union[str, Iterator[str]]) Union[str, Iterator[str]]
Return the URL to one or more files. If
default_mirror()
is afile_mirror()
, this will be afile://
URL.
- open(path: Union[str, Iterator[str]]) Union[str, Iterator[BinaryIO]]
Open a file or iterate over open files on the default mirror.
- Parameters
path – One or more paths relative to the root directory.