They say that when you turn 50, you either get really into World War II documentaries, grilling thermometers, or birds. I chose birds. (Okay, and maybe a little grilling.)
For years my wife and I have enjoyed using the Merlin app (from Cornell labs) on our smartphones to identify the birds we hear around our home. The app is like Shazam for birds, but instead of telling you it's Taylor Swift, it tells you it's a Chimney Swift (or maybe a Carolina Wren). As fun as that is, the Merlin app has a limitation: it can only listen when you listen in the moment.
Enter BirdNET-PI
BirdNET-PI is a Raspberry Pi-based system that uses machine learning to detect and identify birdsongs in real time.
I set up a BirdNET-PI device in my backyard in Raleigh, NC. It listens 24/7, logs detections, and stores them in a local database. Within days, I had a treasure trove of bird call data—timestamps, species names, confidence scores, and audio clips. It's been running for over 6 months now, and it has detected over 140,000 bird songs!
I first learned about BirdNET-PI during a session at All Things Open, a huge annual conference about open source technologies and community. (SAS has been a sponsor of the event.) You can learn more about my experience with BirdPI-NET by reading this post I shared on LinkedIn.
From Chirps to Charts with SAS
Naturally, I wanted to do more than just listen. I wanted to see the patterns. So I built a SAS program to ingest the BirdNET-PI data and generate reports:
- Species frequency over time: Which birds are most common in the morning vs. evening?
- Seasonal trends: Are the warblers just passing through, or do they stick around?
- Confidence heatmaps: How sure is BirdNET-PI about what it hears?
Using combination of SAS code and SAS Visual Analytics, I created dashboards that let me explore the data interactively. Here are a few example insights I've captured.
First, a heatmap of all of the bird species and the number of detections over time. It's a long chart because there are over 100 detected species. From this chart you can see that some birds are seasonal (obviously!) while others we hear all year long!
Our listening device is always on and working hard. From this Daily Detections plot, you can see that it's picking up anywhere from dozens to thousands of detections per day!
I've configured our BirdNET-PI device to record detections only if the machine learning algorithm scores the certainty at 0.7 (70%) or higher. In this SAS Visual Analytics table, I've enabled the "heat map" visualization for the Confidence value for each detection. The algorithm isn't just matching the bird song with 5-second snippets -- it's also considering our geography and time of year when it assigns the probability (in case a song sounds a bit like a European magpie, but we know that just cannot be in my backyard).
Some species visit only in certain seasons, and hummingbirds are back! We've put out our hummingbird feeders and it's bringing them in. Our BirdNET-PI device is detecting their chirps, as you can see from this SAS Visual Analytics chart.
We're always delighted when we hear owls. They are with us year round, but you can see that they are more vocal in the springtime. I'm guessing they are looking for love, or at least a hootin' good time!
Try it yourself: analyze our birdsong data!
Interested in seeing what you can do with this data? I periodically update my GitHub site with the latest detection data from our device. You can always grab the latest with this SAS code:
filename birdcsv temp; proc http method="GET" url="https://raw.githubusercontent.com/cjdinger/birdnet-data/refs/heads/main/alldetect.csv" out=birdcsv; run; proc import file=birdcsv out=birds dbms=csv replace; run; |
On my GitHub project, you can also grab a more complete program that imports the data, summarizes it a bit, and generates the heatmap chart.
Building a happy nest for birds and data
This project has been the perfect mashup of my love for nature and my obsession with data. Even better? It's one of the few tech experiments my wife hasn't just tolerated—-she's genuinely into it. She checks the bird detection logs like she's reading the morning paper, and she even let me mount a microphone on the side of the house and set up a Raspberry Pi in the family room. Some might say she's humoring me in my "mature years," but I prefer to think I’ve finally proven that marrying a data nerd has its perks. At the very least, our living room now has the best bird surveillance system on the block.
Want to build your own?
If you're inspired to put together your own BirdNET-PI device, here's a link to the instructions that I used. The Rasberry Pi device and accessories cost only about $40 US, and I already had a suitable microphone in my box of disused equipment.
5 Comments
This is awesome! Shazam for birds... Could a version be built that detects major and minor keys in a bird's song? For years, in late winter/early spring, a bird came through our neighborhood whose song was two major notes and one minor note. Didn't hear it this year. Wish I'd identified it when I had the chance.
My birds are probably your birds too, neighbor! If you want to check out the "live" data from my listening station, I do have it contributing to the BirdNET community of stations. You can see my station here.
That's quite a collection of bird calls and songs! I didn't find the tune I used to hear, but the first one in this list seems is the closest I've found! A black-capped chickadee? Why not. https://www.allaboutbirds.org/guide/Black-capped_Chickadee/sounds#:~:text=In%20most%20of%20North%20America,on%20Martha's%20Vineyard%20in%20MA.
interesting
Hi Chris,
Great project, I struggled initially following the instructions as I think it works up to a Pi4. Here’s a link for PI5, though should work with earlier versions.
https://github.com/Nachtzuster/BirdNET-Pi?tab=readme-ov-file
Will take a bit of while to build up the same collection as you, but all working and using the rtsp feed of an outdated camera to provide the sound input.
Will try taking into VA at some point and compare notes.
Colin