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
- Clone this repository
- Install requirements:
pip install requests jinja2
- 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)
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
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
- Python 3.7+
- requests
- jinja2
- SMTP e-mail credentials
- BirdWeather station ID
MIT License