Seeing the geese in Waterloo got me thinking, where do they go anyways when they're not bothering us? While I couldn't find a dataset on Waterloo geese to answer the question for myself, I was able to find a dataset on North-East American Canadian geese with 1,680,000+ data points to analyze.
- What does their migration route look like?
- Where do the majority of geese tend to reside/lay over?
- What months have the most geese movement?
To answer this, I created a visualization of the dataset using pandas and Plotly:
- Data is grouped into intervals of 3 days to reduce data points, lowering strain on the program
- Data is mapped starting from 2017-08-08 due to the lack of data points from 2015-2017
- Slider to view how geese distributions changed from 2017-2021
To answer this, I generalized each latitude/longitude coordinate as a city/region and found the most common occurrences of the cities/regions.
| Rank | Location | Region / Country | Coordinates |
|---|---|---|---|
| 1 | Vaughan | ON, Canada | (43.8, -79.5) |
| 2 | Baie-d'Hudson | QC, Canada | (59.9, -77.4) |
| 3 | Baie-d'Hudson | QC, Canada | (59.4, -77.7) |
| 4 | Syosset | New York, USA | (40.8, -73.5) |
| 5 | Pineville | Pennsylvania, USA | (40.3, -75.0) |
Notes on the process:
- Originally, I was going to find each city/region for each data point using Geopy, but I ran into a blocker:
- Would require me to send several hundred to thousand API requests to Geopy
- Would require me to significantly reduce the number of data points to make the requests manageable
- Instead, I performed the following:
- Rounded longitude/latitude values to the nearest 0.1 to get ~11 km resolution for city-level precision
- Counted the top 5 repeating cities/regions
- Plugged the 5 repeating regions into Google Maps to retrieve the names of the actual locations
Steps to determine this:
- Sum the distance traveled over several 3-day intervals throughout each month per goose
- Take the average of all geese per each month
Notes on the process:
- Originally, Geopy's distance function was going to be used to calculate distances between points, but due to the volume of data points, the process was taking too long
- Resolved this by implementing a custom distance function

