eBird API Data is a reusable Django app for loading data from eBird into a database.
Project description
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 only contains the admin pages, but that is sufficient for you to browse the data.
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
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 log into the Django Admin <http:localhost:8000/admin> to browse the tables.
Project Information
Documentation: https://ebird-api-data.readthedocs.io/en/latest/
Issues: https://github.com/StuartMacKay/ebird-api-data/issues
Repository: https://github.com/StuartMacKay/ebird-api-data
The app is tested on Python 3.10+, and officially supports Django 4.2, 5.0 and 5.1.
eBird API Data is released under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ebird_api_data-0.1.1.tar.gz.
File metadata
- Download URL: ebird_api_data-0.1.1.tar.gz
- Upload date:
- Size: 24.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42eaa1dc56d50648e70fad375c0e0509848e704076fbb22fc9ac7ad70a801295
|
|
| MD5 |
4a6c0289bc2f859ea61972d3c740a2b6
|
|
| BLAKE2b-256 |
2961f2bbe83a85690a9b7c5c4fc1a81b6f66d3d5987e00eeb68f1b34a2c8a459
|
File details
Details for the file ebird_api_data-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ebird_api_data-0.1.1-py3-none-any.whl
- Upload date:
- Size: 33.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
110d6ed5c77b69b88c581efa0a4622ce3aeacbe77e756520dae225e382290b40
|
|
| MD5 |
b63c21ca4b278e6963265cc94360bb3d
|
|
| BLAKE2b-256 |
a2d62c272cd6ec939ced25c2efe9a7244b7bf0073a55951fa176983ddb0b95d9
|