How do I use Birdnet-Pi and Sas to pursue my neighbors with feather
They say that when you turn 50, you either really enter World War II documentaries, baking thermometers or birds. I chose birds. (Okay, and maybe a little frying.)
For years my wife and I have enjoyed using the Merlin app (by Cornell Labs) on smartphones to identify the birds we hear around our house. The app is like shazam for birds, but instead of telling you it’s Taylor Swift, it tells you it’s a Swift chimney (or maybe a Wren Carolina). No matter how fun it may be, the Merlin app has a restriction: it can only hear when you Listen in the moment.
Sign in Birdnet-Pi
Birdnet-Pi is a Pi raspberry-based system that uses machinery teaching to discover and identify real-time birdsongs.
I placed a Birdnet-Pi device in my backyard at Raleigh, NC. He listens 24/7, records the discoveries and stores them on a local database. Within days, I had a treasure trove of bird call databases – durations, species names, trust results and audio clips. He is now running for over 6 months, and has discovered over 140,000 bird songs!
I first learned of Birdnet-Pi during a session in all open things, a major annual conference on open source technologies and the community. (Sas has been a sponsor of the event.) You can learn more about my Birdpi-Net experience by reading this post I have shared at Linked.
From chirps to tables with SAS
Of course, I wanted to do more than to hear. I wanted to see the patterns. So I built a SAS program to devour Birdnet-Pi data and generate reports:
- Frequency of species over time: Which birds are most common in the morning against the evening?
- Seasonal Trends: Are Warblers passing, or are they around?
- Heat Maps of Faith: How safe is Birdnet-Pi for what you hear?
Using the combination of SAS and SAS Visual Analytics code, I created dashboard that allow me to explore the data interactively. Here are some mirrors of the example I have caught.
First, a heat map of all bird species and the number of discoveries over time. It is a long table because there are over 100 species discovered. From this table you can see that some birds are seasonal (obviously!) While others we hear all year long!
Our hearing device is always on and works hard. From this plot of daily discoveries, you can see that you are receiving everywhere from tens to thousands of discoveries a day!
I have configured our Birdnet-Pi device to record the discoveries only if the machine learning algorithm marks safety in 0.7 (70%) or higher. In this table Sas Visual Analytics, I have enabled the “heat map” visualization for the value of confidence for each discovery. The algorithm does not only match the bird song with 5 second pieces-but also examines our geography and the time of the year it determines probability (in case a song sounds a little as a European magic, but we know that simply cannot be in my yard).
Some species visit only in certain seasons, and the first pumpkins are back! We have prompted our hummingbird nutrients and is bringing them. Our Birdnet-Pi device is discovering their chirps, as you can see from this table Sas Visual Analytics.
We are always pleased to hear owls. They are with us throughout the year, but you can see that they are more vocal in the spring. I’m thinking they are looking for love, or at least a good time to Hoot!
Try it yourself: Analyze our Birdsong data!
Are you interested in seeing what you can do with this data? I periodically update my gittub site with the latest detection data from our device. You can always catch the last 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; |
In my Github project, you can also catch a fuller program that imports data, summarizes it a little and generates the graph of the heat map.
Building a happy nest for birds and data
This project has been the perfect creation of my love for nature and my obsession with the data. Even better? One of the few technology experiments, my wife has not tolerated them alone-it is really in it. She controls bird detection records like she is reading the morning paper, and she even allowed me to mount a microphone on the side of the house and create a raspberry in the family room. Some may say she is humoring me in “my mature years”, but I prefer to think that I have finally proven that marrying a Nerd data has its vibrancy. At least, our living room now has the best bird supervision system in the block.
Want to build your own?
If you are inspired to join your Birdnet-Pi device, here is a link to the instructions I have used. The raspberry device and accessories cost only about $ 40 US, and I already had a suitable microphone in my waste equipment box.