A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

pygbif

Making the data of the Global Biodiversity Information Facility API accessible via Python.
https://github.com/gbif/pygbif

Category: Biosphere
Sub Category: Biodiversity Data Access and Management

Keywords

api biodiversity data ecology gbif

Keywords from Contributors

lifewatch oscibio taxonomy biodiversity-informatics weather occurrence species jekyll reporter climate

Last synced: about 16 hours ago
JSON representation

Repository metadata

GBIF Python client

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 metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 6 days ago

Total Commits: 292
Total Committers: 18
Avg Commits per committer: 16.222
Development Distribution Score (DDS): 0.315

Commits in past year: 11
Committers in past year: 4
Avg Commits per committer in past year: 2.75
Development Distribution Score (DDS) in past year: 0.273

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 10
Matthew Blissett m****t@g****g 8
Nicolas Noé n****e@i****e 7
John Waller f****2@k****k 4
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:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 108
Total pull requests: 52
Average time to close issues: 8 months
Average time to close pull requests: 16 days
Total issue authors: 35
Total pull request authors: 18
Average comments per issue: 2.13
Average comments per pull request: 1.62
Merged pull request: 34
Bot issues: 1
Bot pull requests: 8

Past year issues: 13
Past year pull requests: 13
Past year average time to close issues: 28 days
Past year average time to close pull requests: 15 days
Past year issue authors: 6
Past year pull request authors: 4
Past year average comments per issue: 0.77
Past year average comments per pull request: 0.08
Past year merged pull request: 11
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/gbif/pygbif

Top Issue Authors

  • sckott (37)
  • CecSve (16)
  • faroit (6)
  • jhnwllr (6)
  • niconoe (5)
  • MattBlissett (3)
  • nickynicolson (3)
  • abubelinha (2)
  • nleguillarme (2)
  • bwakkie (2)
  • dfloer (2)
  • qgroom (1)
  • GrazingScientist (1)
  • laurabrenskelle (1)
  • aubreymoore (1)

Top Pull Request Authors

  • jhnwllr (13)
  • CecSve (10)
  • dependabot[bot] (7)
  • sckott (4)
  • dluks (2)
  • peterdesmet (2)
  • niconoe (2)
  • bbrangeo (2)
  • s-kganz (1)
  • dependabot-preview[bot] (1)
  • umeldt (1)
  • faroit (1)
  • stijnvanhoey (1)
  • jlegind (1)
  • marcowyzajomc (1)

Top Issue Labels

  • downloads (18)
  • enhancement (6)
  • docs (3)
  • bug (3)
  • from-email (2)
  • later (1)
  • dependencies (1)

Top Pull Request Labels

  • dependencies (8)
  • downloads (1)

Package metadata

pypi.org: pygbif

Python client for GBIF

  • Homepage: http://github.com/gbif/pygbif
  • Documentation: https://pygbif.readthedocs.io/
  • Licenses: MIT
  • Latest release: 0.6.5 (published 5 months ago)
  • Last Synced: 2025-04-25T14:34:31.922Z (1 day ago)
  • Versions: 14
  • Dependent Packages: 3
  • Dependent Repositories: 24
  • Downloads: 6,749 Last month
  • Docker Downloads: 8,425
  • Rankings:
    • Docker downloads count: 1.239%
    • Dependent repos count: 2.981%
    • Dependent packages count: 3.271%
    • Average: 4.921%
    • Downloads: 6.198%
    • Stargazers count: 7.559%
    • Forks count: 8.277%
  • Maintainers (2)

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

Score: 17.582675176176473