pygbif

GBIF Python client

https://github.com/gbif/pygbif

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    3 of 18 committers (16.7%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.6%) to scientific vocabulary

Keywords

api biodiversity data ecology gbif

Keywords from Contributors

oscibio lifewatch species spocc reproducibility weather genomics metagenomics
Last synced: 6 months ago · JSON representation

Repository

GBIF Python client

Basic Info
Statistics
  • Stars: 134
  • Watchers: 16
  • Forks: 35
  • Open Issues: 36
  • Releases: 12
Topics
api biodiversity data ecology gbif
Created about 11 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License

README.rst

pygbif
======

|pypi| |docs| |ghactions| |coverage| |black|

Python client for the `GBIF API `_

`Source on GitHub at gbif/pygbif `_

Other GBIF clients:

* R: `rgbif`, `ropensci/rgbif `_
* Ruby: `gbifrb`, `sckott/gbifrb `_
* PHP: `php-gbif`, `restelae/php-gbif `_

Contributing: `CONTRIBUTING.md `_

Installation
============

Stable from pypi

.. code-block:: console

    pip install pygbif

Development version

.. code-block:: console

    [sudo] pip install git+git://github.com/gbif/pygbif.git#egg=pygbif


`pygbif` is split up into modules for each of the major groups of API methods.

* Registry - Datasets, Nodes, Installations, Networks, Organizations
* Species - Taxonomic names
* Occurrences - Occurrence data, including the download API
* Maps - Maps, get raster maps from GBIF as png or mvt

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

In addition there is a utils module, currently with one method: `wkt_rewind`, and
a `caching` method to manage whether HTTP requests are cached or not. See `?pygbif.caching`.

Registry module
===============

registry module API:

* `organizations`
* `nodes`
* `networks`
* `installations`
* `datasets`
* `dataset_metrics`
* `dataset_suggest`
* `dataset_search`

Example usage:

.. code-block:: python

    from pygbif import registry
    registry.dataset_metrics(uuid='3f8a1297-3259-4700-91fc-acc4170b27ce')

Species module
==============

species module API:

* `name_backbone`
* `name_suggest`
* `name_usage`
* `name_lookup`
* `name_parser`

Example usage:

.. code-block:: python

    from pygbif import species
    species.name_suggest(q='Puma concolor')

Occurrences module
==================

occurrences module API:

* `search`
* `get`
* `get_verbatim`
* `get_fragment`
* `count`
* `count_basisofrecord`
* `count_year`
* `count_datasets`
* `count_countries`
* `count_schema`
* `count_publishingcountries`
* `download`
* `download_meta`
* `download_list`
* `download_get`
* `download_citation`
* `download_describe`
* `download_sql`

Example usage:

.. code-block:: python

    from pygbif import occurrences as occ
    occ.search(taxonKey = 3329049)
    occ.get(key = 252408386)
    occ.count(isGeoreferenced = True)
    occ.download('basisOfRecord = PRESERVED_SPECIMEN')
    occ.download('taxonKey = 3119195')
    occ.download('decimalLatitude > 50')
    occ.download_list(user = "sckott", limit = 5)
    occ.download_meta(key = "0000099-140929101555934")
    occ.download_get("0000066-140928181241064")
    occ.download_citation("0002526-241107131044228")
    occ.download_describe("simpleCsv")
    occ.download_sql("SELECT gbifid,countryCode FROM occurrence WHERE genusKey = 2435098")

Maps module
===========

maps module API:

* `map`

Example usage:

.. code-block:: python

    from pygbif import maps
    out = maps.map(taxonKey = 212, year = 1998, bin = "hex",
           hexPerTile = 30, style = "classic-noborder.poly")
    out.response
    out.path
    out.img
    out.plot()

.. image:: https://github.com/gbif/pygbif/raw/master/gbif_map.png
   :width: 25%

utils module
============

utils module API:

* `wkt_rewind`

Example usage:

.. code-block:: python

    from pygbif import utils
    x = 'POLYGON((144.6 13.2, 144.6 13.6, 144.9 13.6, 144.9 13.2, 144.6 13.2))'
    utils.wkt_rewind(x)



Contributors
============

* `Scott Chamberlain `_
* `Robert Forkel `_
* `Jan Legind `_
* `Stijn Van Hoey `_
* `Peter Desmet `_
* `Nicolas Noé `_

Meta
====

* License: MIT, see `LICENSE file `_
* Please note that this project is released with a `Contributor Code of Conduct `_. By participating in this project you agree to abide by its terms.

.. |pypi| image:: https://img.shields.io/pypi/v/pygbif.svg
   :target: https://pypi.python.org/pypi/pygbif

.. |docs| image:: https://readthedocs.org/projects/pygbif/badge/?version=latest
   :target: http://pygbif.rtfd.org/

.. |ghactions| image:: https://github.com/gbif/pygbif/workflows/Python/badge.svg
   :target: https://github.com/gbif/pygbif/actions?query=workflow%3APython

.. |coverage| image:: https://codecov.io/gh/gbif/pygbif/branch/master/graph/badge.svg?token=frXPREGk1D
   :target: https://codecov.io/gh/gbif/pygbif

.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
   :target: https://github.com/psf/black


Owner

  • Name: Global Biodiversity Information Facility
  • Login: gbif
  • Kind: organization
  • Location: Copenhagen, Denmark

GitHub Events

Total
  • Create event: 9
  • Release event: 1
  • Issues event: 11
  • Watch event: 20
  • Delete event: 14
  • Issue comment event: 9
  • Push event: 31
  • Pull request review comment event: 4
  • Pull request review event: 7
  • Pull request event: 11
  • Fork event: 8
Last Year
  • Create event: 9
  • Release event: 1
  • Issues event: 11
  • Watch event: 20
  • Delete event: 14
  • Issue comment event: 9
  • Push event: 31
  • Pull request review comment event: 4
  • Pull request review event: 7
  • Pull request event: 11
  • Fork event: 8

Committers

Last synced: 6 months ago

All Time
  • Total Commits: 297
  • Total Committers: 18
  • Avg Commits per committer: 16.5
  • Development Distribution Score (DDS): 0.327
Past Year
  • Commits: 15
  • Committers: 4
  • Avg Commits per committer: 3.75
  • Development Distribution Score (DDS): 0.467
Top Committers
Name Email Commits
Scott Chamberlain m****s@g****m 200
Cecilie Svenningsen 5****e 31
stijnvanhoey s****y@g****m 15
John Waller j****r@g****m 11
John Waller f****2@k****k 8
Matthew Blissett m****t@g****g 8
Nicolas Noé n****e@i****e 7
Marie Grosjean m****n@g****g 4
Peter Desmet p****k@g****m 4
Daniel Lusk d****k@p****t 1
Keenan Ganz 3****z 1
Ryan Vandersmith r****h@g****m 1
dependabot-preview[bot] 2****] 1
lucbettaieb l****b@g****m 1
gbifnorway g****t@n****o 1
Fabian-Robert Stöter f****r@i****r 1
marcowyzajomc 1****c 1
xrotwang x****g@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 110
  • Total pull requests: 78
  • Average time to close issues: 8 months
  • Average time to close pull requests: about 2 months
  • Total issue authors: 37
  • Total pull request authors: 18
  • Average comments per issue: 1.95
  • Average comments per pull request: 1.19
  • Merged pull requests: 45
  • Bot issues: 1
  • Bot pull requests: 11
Past Year
  • Issues: 12
  • Pull requests: 21
  • Average time to close issues: 1 day
  • Average time to close pull requests: 4 days
  • Issue authors: 7
  • Pull request authors: 3
  • Average comments per issue: 0.08
  • Average comments per pull request: 0.14
  • Merged pull requests: 14
  • Bot issues: 0
  • Bot pull requests: 1
Top Authors
Issue Authors
  • sckott (37)
  • CecSve (15)
  • jhnwllr (8)
  • faroit (6)
  • niconoe (5)
  • MattBlissett (3)
  • bwakkie (2)
  • dfloer (2)
  • nleguillarme (2)
  • abubelinha (2)
  • nickynicolson (2)
  • laurabrenskelle (1)
  • data-biodiversity-aq (1)
  • s-kganz (1)
  • ManonGros (1)
Pull Request Authors
  • jhnwllr (24)
  • CecSve (16)
  • dependabot[bot] (10)
  • dluks (4)
  • sckott (4)
  • bbrangeo (4)
  • s-kganz (2)
  • lucbettaieb (2)
  • niconoe (2)
  • peterdesmet (2)
  • marcowyzajomc (1)
  • xrotwang (1)
  • jlegind (1)
  • rvanasa (1)
  • stijnvanhoey (1)
Top Labels
Issue Labels
downloads (18) enhancement (4) docs (3) bug (3) from-email (2) later (1)
Pull Request Labels
dependencies (11) downloads (1) python (1)

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 8,728 last-month
  • Total docker downloads: 8,425
  • Total dependent packages: 3
    (may contain duplicates)
  • Total dependent repositories: 24
    (may contain duplicates)
  • Total versions: 27
  • Total maintainers: 2
pypi.org: pygbif

Python client for GBIF

  • Versions: 14
  • Dependent Packages: 3
  • Dependent Repositories: 24
  • Downloads: 8,728 Last month
  • Docker Downloads: 8,425
Rankings
Docker downloads count: 1.2%
Dependent repos count: 3.0%
Dependent packages count: 3.3%
Average: 4.9%
Downloads: 6.2%
Stargazers count: 7.6%
Forks count: 8.3%
Maintainers (2)
Last synced: 6 months ago
proxy.golang.org: github.com/gbif/pygbif
  • Versions: 13
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago

Dependencies

requirements.txt pypi
  • appdirs >=1.4.3
  • codecov *
  • geojson_rewind *
  • geomet *
  • matplotlib *
  • pytest *
  • pytest-cov *
  • requests >2.7
  • requests-cache *
  • shapely >=1.5.13
  • sphinx_issues *
  • vcrpy *
setup.py pypi
  • appdirs >=1.4.3
  • geojson_rewind *
  • geomet *
  • matplotlib *
  • requests >2.7
  • requests-cache *
.github/workflows/python.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
pyproject.toml pypi
.github/workflows/python_live_tests.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
docs/requirements.txt pypi
  • appdirs >=1.4.3
  • codecov *
  • geojson_rewind *
  • geomet *
  • matplotlib *
  • pytest *
  • pytest-cov *
  • requests >2.7
  • requests-cache *
  • shapely >=1.5.13
  • sphinx_issues *
  • urllib3 ==1.26.14
  • vcrpy ==4.2.1