Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 1.77 KB

README.md

File metadata and controls

34 lines (23 loc) · 1.77 KB

GBIF download stats

See how popular your published datasets are.

Introduction

The GBIF API allows you to query the download statistics of your published datasets. This script demonstrates how to do this.

Dependencies

This script uses Python (2.7.x) and the following modules:

  • datetime: Part of the standard Python package.
  • json: Part of the standard Python package.
  • pandas: install with pip install pandas
  • python-dateutil: install with pip install python-dateutil
  • pytz: install with pip install pytz
  • Requests: install with pip install requests

Run the script

Usage:

python get_gbif_stats.py <filter_type> <instance_name> > output_file.txt

The script will fetch all datasets published by the instance and statistics of successful downloads per dataset and per year. The script reports the number of download events and the number of downloaded occurrences. Since only successful downloads are considered, these numbers may slightly differ from the numbers shown at the GBIF portal.