A few years ago I got an idea… there were birds on my bird feeder that I didn’t know the name of. There were some times of the year they showed up and others where they didn’t. I wanted to get a better understanding of why certain birds showed up at certain times, where the hot spots were, and what kinds were prevalent. I started recording by hand and used a book but quickly got tired, or was just forgetful. So I thought… what if I could automate this?
Another problem surfaced itself… so many students leaving college or high school are completely unprepared for productive technology life. Neither had adequately prepared them with skills that are relevant and I wanted to think about how students could get exposure to modern cloud architectures with an intuitive learning program.
Then, I thought… what if I could kill two birds with one stone (pun intended). What if I could build a lightweight way to track wildlife (birds, deer, rodents, fox, etc.) and educate at the same time. Perhaps this could even get more interesting and capable… so I set out to build an architecture.
The Starting Architecture
So, I thought the best thing was to combine commodity with commodity and enable something almost anyone could build, but also took some work. Here is the high level:
- Remote capture platform (iphone, deer cam, etc.)
- Storage of photos moved, synced, or sent to OneDrive (other platforms supported too)
- Logic App fires on storage of files in OneDrive
- Logic App sends data to Microsoft AI for Earth classification
- Information captured and Azure Function pulls EXIF data from image, especially GPS
- Image data stored in Cosmos DB for later analysis
- Notebooks / Power BI used for analysis
- Prod/NonProd with automated release where possible
Here is another diagram of the same:
Seems simple enough, right?
Logic App Structure
So, I set off to accomplish this project in weekends and spare time. It ultimately looked a lot like this:
- Install Visual Studio Code on laptop
- Install Python and pre-reqs
- Setup an Azure subscription or free trial
- Ensure access to Azure subscription targets and login with Visual Studio Code (login to your subscription)
- Capture images with an iphone (manual), iphone (motion sensor) or with deer cam. Ensure the settings are on jpg and you are copying them to your target OneDrive account.
- Create a OneDrive account to upload the images to (could be something else vs. OneDrive). Capture this login properly.
- Build Cosmos DB and configure Logic App to store data
- Provision an Azure Storage environment for captured images
- Create Azure Function to retrieve data and find GPS coordinates from an image stored in Azure Storage
- Build Logic App components + Azure Function to interpret the data and response, leveraging Microsoft’s AI for Earth capabilities
- Test runs and analyze (let’s validate your production application against images from your OneDrive).
- Create copy of production in NonProd
- Validate deployment approach with DevOps into both targets vs manually
And…. we’re off! So, after a few weeks of tinkering all the gotchas were eliminated and we had an initial production environment. With the steps above, you should be able to create your own and succeed at duplicating it for your education environment.