Categories
Outdoors

Visualizing Ducks

We have a lot of ducks, mostly mallards, on the trail near here. I’ve been snapping pics of them as we walk the trail. I’m wondering where the ducks tend to be. Are they evenly distributed, using the entire stream, or do they favor particular places?

I captured the data about the duck pictures from my Google Photos album of the duck pictures. While the album displays the pictures nicely, it does not easily get you the latitude, longitude, and date-time for the photos in a batch. You can download the extended data using a Google utility called Google takeout. Warning– it will download all the data you’ve stored in Google unless you select just what you want. I chose the Ducks album only. It is a batch process, and eventually you will get by email links to some zip files containing your data.

Part of the data you get is a set of JSON files for each photo, containing the metadata for each picture. I then had to write a program to extract the appropriate JSON data in each file and write it all into a GPX file. A GPX file is coded in XML, so you just need to get the necessary information inside the proper tags. I chose php to write the program.

Once you have the GPX file, you can upload it into any mapping environment that will let you do so. I downloaded my GPX file to my desktop. I chose Google’s MyMaps to visualize the data. The result is a Google satellite map with the duck sightings placed on it.

As I take more pictures, I will repeat this process periodically till I have mapped the duck sightings I observed for a year. I should have a nice map of the ducks. Then I will work on the second year.