Skip to content

A script to generate an email visualization of recent bird detections from the BirdWeather API

Notifications You must be signed in to change notification settings

Nelluk/birdweather_report

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

BirdWeather Report Generator

Generates and emails HTML reports of bird detections from a BirdWeather station using their API. The report includes:

  • Species detection counts
  • Time-of-day activity patterns
  • Station images for each species
  • Links to audio recordings of best detections

birdweather_report

Setup

  1. Clone this repository
  2. Install requirements:
pip install requests jinja2
  1. Create a config.py file with your settings:
EMAIL_TO = "[email protected]"
EMAIL_FROM = "[email protected]"
EMAIL_PASSWORD = "your_app_password"  # SMTP password (or Gmail app-specific password)
SMTP_SERVER = "smtp.example.com"  # email sending server
SMTP_PORT = 587
STATION_TOKEN = "your_station_token"  # BirdWeather station ID (eg 12345)

Usage

Basic usage with default 24-hour report:

python birdweather_report.py

Generate report for different time period:

python birdweather_report.py --hours 48  # Last 48 hours

Output

The script generates and emails an HTML report containing:

  • Total species count and detection count
  • Per-species statistics:
    • Total detections
    • Highest confidence level
    • Hour-by-hour activity heatmap
    • Station photo
    • Link to best detection audio

Requirements

  • Python 3.7+
  • requests
  • jinja2
  • SMTP e-mail credentials
  • BirdWeather station ID

License

MIT License

About

A script to generate an email visualization of recent bird detections from the BirdWeather API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages