Skip to main content

Python client for OBIS

Project description

pyobis

pypi Conda Version docs tests

Python client for the `OBIS API(https://api.obis.org/).

Source on GitHub at iobis/pyobis

What is it?

Pyobis is an interesting python package that helps users fetch data from OBIS API which harvests occurrence records from thousands of datasets and makes them available as a single integrated dataset.

The Ocean Biodiversity Information System (OBIS) is a global open-access data and information clearing-house on marine biodiversity for science, conservation, and sustainable development, maintained by IOOS.

Other OBIS clients:

Main Features

Here are just a few of things pyOBIS can do:

  • Easy handling of OBIS data, easy fetching without handling the raw API response directly.
  • Built-in functions for occurrence, taxon, node, checklist and dataset endpoints of OBIS API.
  • Provides easy export of data to Pandas DataFrame, and helps researchers focus more on analysis rather than data mining.

For examples of how to use this repo, see the jupyter notebooks in the /notebooks/ directory. NOTE: GitHub's jupyter notebook display does not show interactive plots; open the notebooks in a jupyter hub (eg colab, binder, etc) for the full experience.

Installation

Install from PyPI

pip install pyobis

Install from conda-forge

Installing pyobis from the conda-forge channel can be achieved by adding conda-forge to your channels with:

conda install pyobis --channel conda-forge

More information here

Install latest development version from GitHub

pip install git+git://github.com/iobis/pyobis.git#egg=pyobis

Install editable dev version from github for local development. System prerequisites: python3, conda

# fetch code
git clone git@github.com:iobis/pyobis.git
cd pyobis
# install
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m pip install -e .
# test your installation
python -m pytest
# test and generate a coverage report
python -m pytest -rxs --cov=pyobis tests

Documentation

The official documentation is hosted on GitHub Pages https://iobis.github.io/pyobis.

Library API

pyobis is split up into modules for each of the groups of API methods.

  • checklist - Checklist. Generate a checklist of species under a taxa, IUCN Red List, or most recently added species.
  • dataset - Dataset. Get metadata of datasets (including datasetid, owner, institution, number of records, etc) for a queried spatiotemporal region or taxa.
  • nodes - Nodes. Get records or activities for an OBIS node.
  • occurrences - Occurrence. Fetch occurrence records, geopoints, lookup for a scientificname, extensions (e.g. DNADerivedData, MeasurementOrFacts, etc.)
  • taxa - Taxonomic names. Get taxon records with taxonid or scientificname, and scientific name annotations by the WoRMS team.

You can import the entire library, or each module individually as needed.

Usage Guide

For a detailed usage guide with information about inputs, output and module functions please read the Usage Guide

Sample analysis

Some Jupyter Notebook based sample analysis and visualization of data grabbed through pyobis have been made available through /notebooks/ directory. To get full experience of the interactive plots (eg. geoplots, etc) please open notebooks in a Jupyter Hub (eg. through Google Colab, Binder, local installation, etc.)

Meta

Further Reading

  • In case you face data quality issues, please look at OBIS QC repo
  • For issues with the package itself, feel free to open an issue here!

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

pyobis-1.4.0.tar.gz (8.0 MB view details)

Uploaded Source

Built Distribution

pyobis-1.4.0-py3-none-any.whl (22.3 kB view details)

Uploaded Python 3

File details

Details for the file pyobis-1.4.0.tar.gz.

File metadata

  • Download URL: pyobis-1.4.0.tar.gz
  • Upload date:
  • Size: 8.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for pyobis-1.4.0.tar.gz
Algorithm Hash digest
SHA256 cb70a1b5b7c2d79d7bae5bacde01c782e65da27ead49e173a08e50288c85297f
MD5 8f6b67e977de9703029c1eb872cb2143
BLAKE2b-256 2989c44daeb602c464eb3f8cde118c9297634682367f9157dbdfd61582434029

See more details on using hashes here.

File details

Details for the file pyobis-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: pyobis-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 22.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for pyobis-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 df6006296d27c0e622defdd60b0b2b0736d8e3b152803c2462ceecbb32553cb5
MD5 0a2389751eb7a601eaa8a13813934a46
BLAKE2b-256 37bf356913981d960a8ad4a8923f44730033fb72fa0537a17414fd4307500d4b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page