Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ registry module API:
* `dataset_suggest`
* `dataset_search`

Example usage:
Example usage:

.. code-block:: python

Expand Down Expand Up @@ -121,8 +121,19 @@ Example usage:
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")
occ.download_describe("simpleCsv")
occ.download_sql("SELECT gbifid,countryCode FROM occurrence WHERE genusKey = 2435098")

.. note::
Download endpoints require GBIF credentials.
Set them as environment variables:

.. code-block:: bash

export GBIF_USER="your_gbif_username"
export GBIF_PWD="your_gbif_password"

You can also pass credentials directly via ``user=`` and ``pwd=`` arguments.

Maps module
===========
Expand Down
27 changes: 19 additions & 8 deletions docs/modules/occurrence.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ occurrence module API:
* `download_describe`
* `download_citation`

Example usage:
Example usage:

.. code-block:: python

Expand All @@ -39,12 +39,23 @@ Example usage:
occ.download_list(user = "sckott", limit = 5)
occ.download_meta(key = "0000099-140929101555934")
occ.download_get("0000066-140928181241064")
occ.download_sql("SELECT datasetKey, countryCode, COUNT(*) FROM occurrence WHERE continent = 'EUROPE' GROUP BY datasetKey, countryCode")
occ.download_describe("simpleCsv")
occ.download_citation("0002526-241107131044228")


occurrences API
occ.download_sql("SELECT datasetKey, countryCode, COUNT(*) FROM occurrence WHERE continent = 'EUROPE' GROUP BY datasetKey, countryCode")
occ.download_describe("simpleCsv")
occ.download_citation("0002526-241107131044228")

.. note::
Download endpoints require GBIF credentials.
Set them as environment variables:

.. code-block:: bash

export GBIF_USER="your_gbif_username"
export GBIF_PWD="your_gbif_password"

You can also pass credentials directly via ``user=`` and ``pwd=`` arguments.


occurrences API
===============


Expand All @@ -68,4 +79,4 @@ occurrences API
.. automethod:: occurrences.download_sql
.. automethod:: occurrences.download_describe
.. automethod:: occurrences.download_citation