Telling Stories with Bird Data

I’m a big fan of data visualization. It’s one thing to have a huge data set of something you’re measuring, perform some statistical analyses on it, and see if the results are significant. But I think being able to create some sort of visualization really allows the data tell us more of a story.

I wanted to see if I can tell a story of the Piping Plover (Charadrius melodus). If you don’t know anything about this bird, that’s okay! But don’t Google anything about it yet. Let’s first see if we can make a data visualization for this species and figure out some information about it. I have some large sets of data that I requested from eBird a while back for the project I am working on this summer. One such data set is all submitted checklists that included observations of one or more Piping Plovers.

What I wanted to do was to create some sort of animation that shows the yearly migration patterns of the Piping Plover. I turned to R for this project, a scientific programming language.

My main goal was to plot points on a map corresponding to where Piping Plovers have been spotted for each day of the year, and then loop that in an animated GIF to show the overall pattern. The first thing I needed to do was to generate a map in R. I used the ggmap library to accomplish this.

After some fiddling around, I was finally able to generate the following map.

Rplot.png

So now we have a nice clean slate to add things onto.

The data set I’m using has observations dating back to the mid-late 1800s. Initially, I wanted to make an animation that captured EVERY day since then, but in the interest of computation time (I’m a bit impatient when I’m excited for results) I decided to simply group all unique days together. For example, if I had observations from 1 January 1987, 1 January 2009, and 1 January 1899, they would all be lumped under the single category of 1 January. This allowed me to simply create 366 individual maps (one for every day of the year including the pesky February 29th) and mash them together into an animation.

After plenty of trial and error, and error, and error, and error, here is the result:

pipl-migration

It’s not the best looking visual in my opinion, but it’s not too bad.

What story can we build from this? Let’s take a look at a few trends we can see. Again, if you’ve never heard of the Piping Plover before and have resisted the urge to Google information about it, this will be perfect for you as now you are going to learn a bit of the Piping Plover’s life story!

Let’s start with a pretty basic observation. Can we figure out where the Piping Plover spends its winters? Notice in the top right left of the animation, I’ve included the day of the year in “mm dd” format, so all we have to do is see where all the red dots are when we are in winter months (consider from December to February). We can see that the Piping Plover’s main winter grounds are in the Gulf of Mexico, Florida’s east coast, and the Caribbean. I don’t blame them, it’s nice and warm down there.

Next, can we figure out where they breed? For this purpose, let’s say breeding take place roughly from mid-April until mid-August. Because it’s a little hard to see in the animation (in my opinion), take a look at the following single frame of June 16:

169

Our first observation would probably be that their breeding grounds are in the northern United States and southern parts of Canada. This is true! From observing two different parts of this animation, we now have (more or less) a full migration pattern of the Piping Plover.

Looking at the above frame from June 16th again, is there anything else we can say about their breeding grounds? In particular, I want to focus on where the points are kind of “clustering” to. Take a look at the following image which is the same frame, but I’ve circled some “clusters of interest”:

169-pops

These clusters almost appear to be isolated in that we do not see many points between these clusters that would “bridge” these clusters together. In addition, we can see that each of these clusters appear in differing geographical regions: the left-most cluster appears in the Great Plains, the middle cluster appears in the Great Lakes, and the right-most appears on the Atlantic coast. Could these Piping Plovers, that seemingly winter together in the same general area, actually be different populations?

In fact, yes! There are three distinct populations of Piping Plover in North America, aptly named from their geographic separation: Great Plains, Great Lakes, and Atlantic. Even more interesting is that there are actually two separate subspecies of Piping Plover. We have Charadrius melodus circumcinctus, the subspecies that occurs in the Great Plains and Great Lakes populations, and Charadrius melodus melodus, the subspecies that occurs in the Atlantic population.

The last thing I want to look at may be a little hard to notice without having another species animation map to compare to. For this purpose, allow me to introduce the Semipalmated Plover (Charadrius semipalmatus), a close relative of the Piping Plover. Their winter grounds and breeding grounds are fairly similar and the timing of their migrations are also fairly similar. However, I think you will notice one stark difference between the two. Take a look at the side-by-side map:

153

(Note: I had initially wanted to post a side-by-side animation of these two species, but it turned out like crap, so now you just get a single frame).

The biggest thing that sticks out to me is the vast difference in number of points between the Semipalmated Plover and the Piping Plover. There are two possibilities that come to mind when I see this: 1) The Piping Plover is a very secretive bird that is hard to find, or 2) The Piping Plover has a really low population.

Unfortunately, the correct answer is number 2 (although technically because of the low population, it DOES make #1 partially correct in that it is hard to find one). In fact, depending on where you are in the world, the Piping Plover’s conservation status ranges from Near-threatened to Endangered. If you’re a Piping Plover in Ontario, you are unfortunately considered endangered.

It’s estimated that the global population of Piping Plovers is actually less than 8000 individuals, which isn’t a whole lot. Piping Plovers are very sensitive to human disruption, and that’s actually the focal point of the project I will be working on this summer. I won’t get into that right now as that will be for a later post.

Let’s go back to the original point of this post; that is, telling a story using data visualization. By simply making an animated map of the Piping Plover’s migration pattern (and also one of the Semipalmated Plover), we have learned the following:

  • The Piping Plover winters in the Gulf of Mexico, Florida, and the Caribbean
  • The Piping Plover breeds in the northern United States and southern Canada
  • There are actually 3 distinct populations of Piping Plovers named for their geographical separation (Great Plains, Great Lakes, and Atlantic). Though we can’t see it from the map, these 3 populations consist of the two subspecies Charadrius melodus circumcinctus (Great Plains + Great Lakes population) and Charadrius melodus melodus (Atlantic population)
  • The total population of Piping Plovers is so low that they are actually considered endangered in some areas such as Ontario.

I’m certainly not saying that data visualization is the absolute most important thing in analyzing a dataset as you could very well come across “trends” that are not actually trends at all; rather, they may just be noise in the data. But it’s clear that visualizing data sets allows us to gain a different picture of what our data set looks like and, as I said, allows us to create a story about the data.

I’m hoping as I learn more data visualization techniques that I can make more posts like this in the future. Hopefully you found this interesting!

If you are interested in viewing the code for this, here it is: https://github.com/BrandonEdwards/migration-map

Bonus Deduction

Remember how we figured out that the Piping Plover migrates from the southern United States to the northern United States for breeding? In particular, the Atlantic population would likely migrate up the east coast of the United States. One would assume that at the end of breeding season, the Atlantic population of Piping Plovers would migrate back down the eastern coast of the United States. When would this migration take place? We can see on the map that the autumn migration probably peaks around mid-August to late-September. What else peaks around this exact time?

If you said the Atlantic hurricane season, you’d be correct! Can we hypothesize that the Atlantic hurricane season might negatively impact the migrating Atlantic Piping Plovers?

Unfortunately, yes.

Acknowledgements and Citations

eBird Basic Dataset. Version: EBD_relAug-2016. Cornell Lab of Ornithology, Ithaca, New York. Aug 2016.

D. Kahle and H. Wickham. ggmap: Spatial Visualization with ggplot2. The R Journal, 5(1),
144-161. URL http://journal.r-project.org/archive/2013-1/kahle-wickham.pdf

Doug McIlroy. Packaged for R by Ray Brownrigg, Thomas P Minka and transition to Plan 9 codebase
by Roger Bivand. (2015). mapproj: Map Projections. R package version 1.2-4.
http://CRAN.R-project.org/package=mapproj

Matt Dowle and Arun Srinivasan (2017). data.table: Extension of `data.frame`. R package version
1.10.4. http://CRAN.R-project.org/package=data.table

Baptiste Auguie (2016). gridExtra: Miscellaneous Functions for “Grid” Graphics. R package
version 2.2.1. http://CRAN.R-project.org/package=gridExtra

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: