Skip to main content

eBird API Data is a reusable Django app for loading data from eBird into a database.

Project description

eBird API Data

eBird API Data is a reusable Django app for loading data from eBird into a database.

Overview

The Cornell Laboratory of Ornithology in Ithaca, New York runs the eBird database which collects observations of birds from all over the world. All the observations are published on eBird.org, and they also make them available via an API. This project contains a loader and models to take data from the API and load it into a database. From there you can analyse the data with python, jupyter notebooks, or build a web site.

To get started, you will need to sign up for an eBird account, if you don't already have one and register to get an API key. Make sure you read and understand the Terms of use, and remember bandwidth and servers cost money, so don't abuse the service. If you need large numbers of observations, then sign up to receive the eBird Basic Dataset.

Install

You can use either pip or uv to download the package from PyPI and install it into a virtualenv:

pip install ebird-api-data

or:

uv add ebird-api-data

Update INSTALLED_APPS in your Django setting:

INSTALLED_APPS = [
    ...
    ebird.api.data
]

Finally, run the migrations to create the tables:

python manage.py migrate

Demo

If you check out the code from the repository there is a fully functioning Django site. It contains pages for checklists, observations and species, where you can browse the records or search by location, observer. date. etc. The Django Admin lets you browse and edit the records in the database.

git clone git@github.com:StuartMacKay/ebird-api-data.git
cd ebird-api-data

Create the virtual environment:

uv venv

Activate it:

source .venv/bin/activate

Install the requirements:

uv sync

Create a copy of the .env.example file and add your API key:

cp .env.example .env

For example:

EBIRD_API_KEY=<my api key>

Run the database migrations:

python manage.py migrate

Create a user:

python manage.py createsuperuser

Create a copy of the .env.example file and add your API key:

cp .env.example .env
EBIRD_API_KEY=<my api key>

Now, download data from the API:

python manage.py add_checklists --days 2 US-NY-109

This loads all the checklists, submitted in the past two days by birders in Tompkins County, New York, where the Cornell Lab is based. You can use any location code used by eBird, whether it's for a country, state/region, or county. Remember, read the terms of use.

Run the demo:

python manage.py runserver

Now, either visit the site, http:localhost:8000/, or log into the Django Admin, http:localhost:8000/admin to browse the tables.

Project Information

The repository is also mirrored on Github:

The app is tested on Python 3.10+, and officially supports Django 4.2, 5.0 and 5.1.

License

eBird API Data is released under the terms of the MIT license.

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

ebird_api_data-0.3.0.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ebird_api_data-0.3.0-py3-none-any.whl (34.2 kB view details)

Uploaded Python 3

File details

Details for the file ebird_api_data-0.3.0.tar.gz.

File metadata

  • Download URL: ebird_api_data-0.3.0.tar.gz
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.2

File hashes

Hashes for ebird_api_data-0.3.0.tar.gz
Algorithm Hash digest
SHA256 181be10ab7a69a8eacdfd2ebdf0973c9e6fb5154b5f01957e76bd28b7547e26b
MD5 0e0b5a9a3674f56592777d1b7782b5a7
BLAKE2b-256 5fc1c78ab1a8d9624af9eb1f207201c65bf2468d4312a910a09eaaf3cf2e3a1b

See more details on using hashes here.

File details

Details for the file ebird_api_data-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ebird_api_data-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 361d7482fcf59d32cd5e24765fa3e67bc0118a6bec431e5c35c5c8ccfa1bc6a3
MD5 bdd99a9c6232b66856617f434f3ced3b
BLAKE2b-256 2b9ff43e652c7a22666270ca8fa3586237f5ba4708b832600659735b7eb7587d

See more details on using hashes here.

Supported by

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