Connecting Research Questions

Clara Bird, Masters Student, OSU Department of Fisheries and Wildlife, Geospatial Ecology of Marine Megafauna Lab

The field season can be quite a hectic time of year. Between long days out on the water, trouble-shooting technology issues, organizing/processing the data as it comes in, and keeping up with our other projects/responsibilities, it can be quite overwhelming and exhausting.

But despite all of that, it’s an incredible and exciting time of year. Outside of the field season, we spend most of our time staring at our computers analyzing the data that we spend a relatively short amount of time collecting. When going through that process it can be easy to lose sight of why we do what we do, and to feel disconnected from the species we are studying. Oftentimes the analysis problems we encounter involve more hours of digging through coding discussion boards than learning about the animals themselves. So, as busy as it is, I find that the field season can be pretty inspiring. I have recently been looking through our most recent drone footage of gray whales and feeling renewed excitement for my thesis.

At the moment, my thesis has four central questions: (1) Are there associations between habitat type and gray whale foraging tactic? (2) Is there evidence of individualization? (3) What is the relationship between behavior and body condition? (4) Do we see evidence of learning in the behavior of mom and calf pairs? As I’ve been organizing my thoughts, what’s become quite clear is how interconnected these questions are. So, I thought I’d take this blog to describe the potential relationships.

Let’s start with the first question: are there associations between habitat types and gray whale foraging tactics? This question is central because it relates foraging behavior to habitat, which is ultimately associated with prey. This relationship is the foundation of all other questions involving foraging tactics because food is necessary for the whales to have the energy and nutrients they need to survive. It’s reasonable to think that the whales are flexible and use different foraging tactics to eat different prey that live in different habitats. But, if different prey types have different nutritional value (this is something that Lisa is studying right now; check out the COZI project to learn more), then not all whales may be getting the same nutrients.

The next question relates to the first question but is not necessarily dependent on it. It’s the question of individualization, a topic Lisa also explored in a past blog. Within our Oregon field sites we have documented a variety of gray whale foraging tactics (Torres et al. 2018; Video 1) but we do not know if all gray whales use all the tactics or if different individuals only use certain tactics. While I think it’s unlikely that one whale only uses one tactic all the time, I think we could see an individual use one tactic more often than the others. I reason that there could be two reasons for this pattern. First, it could be a response to resource availability; certain tactics are more efficient than others, this could be because the tactic involves capturing the more nutritious prey or because the behavior is less energetically demanding. Second, foraging tactics are socially learned as calves from their mothers, and hence individuals use those learned tactics more frequently. This pattern of maternally inherited foraging tactics has been documented in other marine mammals (Mann and Sargeant 2009; Estes et al. 2003). These questions between foraging tactic, habitat and individualization also tie into the remaining two questions.

My third question is about the relationship between behavior and body condition. As I’ve discussed in a previous blog, I am interested in assessing the relative energetic costs and benefits of the different foraging tactics. Is one foraging tactic more cost-effective than another (less energy out per energy in)? Ever since our lab’s cetacean behavioral ecology class, I’ve been thinking about how my work relates to niche partitioning theory (Pianka 1974).This theory states that when there is low prey availability, niche partitioning will increase. Niche partitioning can occur across several different dimensions: for instance, prey type, foraging location, and time of day when active. If gray whales partition across the prey type dimension, then different whales would feed on different kinds of prey. If whales partition resources across the foraging location dimension, individuals would feed in different areas. Lastly, if whales partition resources across the time axis, individuals would feed at different times of day. Using different foraging tactics to feed on different prey would be an example of partitioning across the prey type dimension. If there is a more preferable prey type, then maybe in years of high prey availability, we would see most of the gray whales using the same tactics to feed on the same prey type. However, in years of low prey availability we might expect to see a greater variety of foraging tactics being used. The question then becomes, does any whale end up using the less beneficial foraging tactic? If so, which whales use the less beneficial tactic? Do the same individuals always switch to the less beneficial tactic? Is there a common characteristic among the individuals that switched, like sex, age, size, or reproductive status? Lemos et al. (2020) hypothesized that the decline in body condition observed from 2016 to 2017 might be a carryover effect from low prey availability in 2016. Could it be that the whales that use the less beneficial tactic exhibit poor body condition the following year?

My fourth, and final, question asks if foraging tactics are passed down from moms to their calves. We have some footage of a mom foraging with her calf nearby, and occasionally it looks like the calf could be copying its mother. Reviewing this footage spiked my interest in seeing if there are similarities between the behavior tactics used by moms and those used by their calves after they have been weaned. While this question clearly relates to the question of individualization, it is also related to body condition: what if the foraging tactics used by the mom is influenced by her body condition at the time?

I hope to answer some of these fascinating questions using the data we have collected during our long field days over the past 6 years. In all likelihood, the story that comes together during my thesis research will be different from what I envision now and will likely lead to more questions. That being said, I’m excited to see how the story unfolds and I look forward to sharing the evolving ideas and plot lines with all of you.

References

Estes, J A, M L Riedman, M M Staedler, M T Tinker, and B E Lyon. 2003. “Individual Variation in Prey Selection by Sea Otters: Patterns, Causes and Implications.” Source: Journal of Animal Ecology. Vol. 72.

Mann, Janet, and Brooke Sargeant. 2009. “ Like Mother, like Calf: The Ontogeny of Foraging Traditions in Wild Indian Ocean Bottlenose Dolphins ( Tursiops Sp.) .” In The Biology of Traditions, 236–66. Cambridge University Press. https://doi.org/10.1017/cbo9780511584022.010.

Pianka, Eric R. 1974. “Niche Overlap and Diffuse Competition” 71 (5): 2141–45.

Soledade Lemos, Leila, Jonathan D Burnett, Todd E Chandler, James L Sumich, and Leigh G. Torres. 2020. “Intra‐ and Inter‐annual Variation in Gray Whale Body Condition on a Foraging Ground.” Ecosphere 11 (4). https://doi.org/10.1002/ecs2.3094.

Torres, Leigh G., Sharon L. Nieukirk, Leila Lemos, and Todd E. Chandler. 2018. “Drone up! Quantifying Whale Behavior from a New Perspective Improves Observational Capacity.” Frontiers in Marine Science 5 (SEP). https://doi.org/10.3389/fmars.2018.00319.

Milling around in definitions

Clara Bird, Masters Student, OSU Department of Fisheries and Wildlife, Geospatial Ecology of Marine Megafauna Lab

A big part of graduate school involves extensive reading to learn about the previous research conducted in the field you are joining and the embedded foundational theories. A firm understanding of this background literature is needed in order to establish where your research fits. Science is a constructive process; to advance our disciplines we must recognize and build upon previous work. Hence, I’ve been reading up on the central topic of my thesis: behavioral ecology. It is equally important to study the methods used in these studies as to understand the findings. As discussed in a previous blog, ethograms are a central component of the methodology for studying behavior. Ethograms are lists of defined behaviors that help us properly and consistently collect data in a standardized approach. It is especially important in a project that spans years to know that the data collected at the beginning was collected in the same way as the data collected at the end of the project.

While ethograms and standardized methods are commonly used within a study, I’ve noticed from reading through studies on cetaceans, a lack of standardization across studies. Not all behaviors that are named the same way have matching definitions, and not all behaviors with similar definitions have matching names. Of all the behaviors, “milling” may be the least standardized.

While milling is not in our ethogram (Leigh believes this term is a “cheat” for when behavior is actually “unknown”), we occasionally use “milling” in the field to describe when the gray whales are swimming around in an area, not foraging, but not in any other primary behavior state (travel, social, or rest). Sometimes we use when we think the whale may be searching, but we aren’t 100% sure yet. A recent conversation during a lab meeting on the confusing nature of the term “milling” inspired me to dig into the literature for this blog. I searched through the papers I’ve saved for my literature review and found 18 papers that used the term milling. It was fascinating to read how variably the term has been defined and used.

When milling was defined in these papers, it was most commonly described as numerous directional changes in movement within a restricted area 1–8. Milling often co-occurred with other behavior states. Five of these eight studies described milling as co-occurring with foraging behavior 3–6,8. In one case, milling was associated with foraging and slow movement 8. While another study described milling as passive, slow, nondirectional movement 9.

Eight studies used the term milling without defining the behavior 10–17. Of these, five described milling as being associated with other behavior states. Three studies described milling as co-occurring with foraging 10,14,16, one said that it co-occurred with social behavior 13, and another described milling as being associated with resting/slow movement 12.

In addition to this variety of definitions and behavior associations, there were also inconsistencies with the placement of “milling” within ethograms. In nine studies, milling was listed as a primary state 1,2,4,7–9,15,17,18. But, in two studies that mentioned milling and used an ethogram, milling was not included in the ethogram 6,14.

Diving into the associations between milling and foraging reveal how varied the use of milling has been within the cetacean literature. For example, two studies simply described milling as occurring near foraging in time 10,16. While another two studies explained that milling was applied in situations where there was evidence of feeding without feeding being directly observed 8,14. Bobkov et al. (2019) described milling as occurring between feeding cycles along with breathing. Lastly, two studies describe milling as a behavior within the foraging primary state 3,5, while another study described feeding as a behavior within milling 4.

It’s all rather confusing, huh? Across these studies, milling has been defined, mentioned without being defined, included in ethograms as a primary state, included in ethograms as a sub-behavior, and excluded from ethograms. Milling has also been associated with multiple primary behavior states (foraging, resting, and socializing). It has been described as both passive 9 and slow 12, and strong 16 and active 5.

It appears that milling is often used to describe behaviors that the observer cannot distinctly classify or describe its function. I have also struggled to define these times when a whale is in between behavior states; I often end up calling it “just being a whale”, which includes time spent breathing at the surface, or just swimming around.

As I’ve said above, Leigh thinks that this term is a “cheat” for when a behavior is actually “unknown”. I think we have trouble equating “milling” with “unknown” because it seems like “unknown” should refer to a behavior where we can’t quite tell what the whale is doing. However, during milling, we can see that the whale is swimming at the surface. But here’s the thing, while we can see what the whale is doing, the function of the behavior is still unknown. Instead of using an indistinct term, we should use a term that better describes the behavior.  If it’s swimming at the surface, name the behavior “swimming at the surface”. If we can’t tell what the whale is doing because we can’t quite see what it’s doing, then name the behavior “unknown-partially visible”. Instead of using vague terminology, we should use clear names for behaviors and embrace using the term “unknown”.

I am most certainly not criticizing these studies as they all provided valuable contributions and interesting results. The studies that asked questions about behavioral ecology defined milling. The term was mentioned without being defined in studies focused on other topics. So, defining behaviors mentioned was less important.

With this exploration into the use of “milling” in studies, I am not implying that all behavioral ecologists need to agree on the use of the same behavior terms. However, I have learned clear definitions are critical. This lesson is also important outside of behavioral ecology. Different labs, and different people, use different terms for the same things. As I dig into my thesis, I am keeping a list of terminology I use and how I define those terms, because as I learn more, my terminology evolves and changes. For example, at the beginning of my thesis I used “sub-behavior” to refer to behaviors within the primary state categories. But, now after chatting with Leigh and learning more, I’ve decided to use the term “tactic” instead as these are often processes or events that contribute to the broader behavior state. My running list of terminology helps me remember what I meant when I used a certain word, so that when I read my notes from three months ago, I can know what I meant.  Digging into the literature for this blog reminded me of the importance of clearly defining all terminology and never assuming that everyone uses the same term in the same way.

Check out these videos to see some of the behaviors we observe:

References

1.        Mallonee, J. S. Behaviour of gray whales (Eschrichtius robustus) summering off the northern California coast, from Patrick’s Point to Crescent City. Can. J. Zool. 69, 681–690 (1991).

2.        Clarke, J. T., Moore, S. E. & Ljungblad, D. K. Observations on gray whale (Eschrichtius robustus) utilization patterns in the northeastern Chukchi Sea. Can. J. Zool 67, (1988).

3.        Ingram, S. N., Walshe, L., Johnston, D. & Rogan, E. Habitat partitioning and the influence of benthic topography and oceanography on the distribution of fin and minke whales in the Bay of Fundy, Canada. J. Mar. Biol. Assoc. United Kingdom 87, 149–156 (2007).

4.        Lomac-MacNair, K. & Smultea, M. A. Blue Whale (Balaenoptera musculus) Behavior and Group Dynamics as Observed from an Aircraft off Southern California. Anim. Behav. Cogn. 3, 1–21 (2016).

5.        Lusseau, D., Bain, D. E., Williams, R. & Smith, J. C. Vessel traffic disrupts the foraging behavior of southern resident killer whales Orcinus orca. Endanger. Species Res. 6, 211–221 (2009).

6.        Bobkov, A. V., Vladimirov, V. A. & Vertyankin, V. V. Some features of the bottom activity of gray whales (Eschrichtius robustus) off the northeastern coast of Sakhalin Island. 1, 46–58 (2019).

7.        Howe, M. et al. Beluga, Delphinapterus leucas, ethogram: A tool for cook inlet beluga conservation? Mar. Fish. Rev. 77, 32–40 (2015).

8.        Clarke, J. T., Christman, C. L., Brower, A. A. & Ferguson, M. C. Distribution and Relative Abundance of Marine Mammals in the northeastern Chukchi and western Beaufort Seas, 2012. Annu. Report, OCS Study BOEM 117, 96349–98115 (2013).

9.        Barendse, J. & Best, P. B. Shore-based observations of seasonality, movements, and group behavior of southern right whales in a nonnursery area on the South African west coast. Mar. Mammal Sci. 30, 1358–1382 (2014).

10.      Le Boeuf, B. J., M., H. P.-C., R., J. U. & U., B. R. M. and F. O. High gray whale mortality and low recruitment in 1999: Potential causes and implications. (Eschrichtius robustus). J. Cetacean Res. Manag. 2, 85–99 (2000).

11.      Calambokidis, J. et al. Abundance, range and movements of a feeding aggregation of gray whales (Eschrictius robustus) from California to southeastern Alaska in 1998. J. Cetacean Res. Manag. 4, 267–276 (2002).

12.      Harvey, J. T. & Mate, B. R. Dive Characteristics and Movements of Radio-Tagged Gray Whales in San Ignacio Lagoon, Baja California Sur, Mexico. in The Gray Whale: Eschrichtius Robustus (eds. Jones, M. Lou, Folkens, P. A., Leatherwood, S. & Swartz, S. L.) 561–575 (Academic Press, 1984).

13.      Lagerquist, B. A. et al. Feeding home ranges of pacific coast feeding group gray whales. J. Wildl. Manage. 83, 925–937 (2019).

14.      Barrett-Lennard, L. G., Matkin, C. O., Durban, J. W., Saulitis, E. L. & Ellifrit, D. Predation on gray whales and prolonged feeding on submerged carcasses by transient killer whales at Unimak Island, Alaska. Mar. Ecol. Prog. Ser. 421, 229–241 (2011).

15.      Luksenburg, J. A. Prevalence of External Injuries in Small Cetaceans in Aruban Waters, Southern Caribbean. PLoS One 9, e88988 (2014).

16.      Findlay, K. P. et al. Humpback whale “super-groups” – A novel low-latitude feeding behaviour of Southern Hemisphere humpback whales (Megaptera novaeangliae) in the Benguela Upwelling System. PLoS One 12, e0172002 (2017).

17.      Villegas-Amtmann, S., Schwarz, L. K., Gailey, G., Sychenko, O. & Costa, D. P. East or west: The energetic cost of being a gray whale and the consequence of losing energy to disturbance. Endanger. Species Res. 34, 167–183 (2017).

18.      Brower, A. A., Ferguson, M. C., Schonberg, S. V., Jewett, S. C. & Clarke, J. T. Gray whale distribution relative to benthic invertebrate biomass and abundance: Northeastern Chukchi Sea 2009–2012. Deep. Res. Part II Top. Stud. Oceanogr. 144, 156–174 (2017).

How we plan to follow whales

Clara Bird, Masters Student, OSU Department of Fisheries and Wildlife, Geospatial Ecology of Marine Megafauna Lab

The GEMM Lab gray whale team is in the midst of preparing for our fifth field season studying the Pacific Coast Foraging Group (PCFG): whales that forage off the coast of Newport, OR, USA each summer. On any given good weather day from June to October, our team is out on the water in a small zodiac looking for gray whales (Figure 1). When we find a gray whale, we try to collect photo ID data, fecal samples, drone data, and behavioral data. We use the drone data to study both the whale’s body condition and their behavior. In a previous blog, I described ethograms and how I would like to use the behavior data from drone videos to classify behaviors, with the ultimate goal of understanding how gray whale behavior varies across space, time, and by individual. However, this explanation of studying whale behavior is actually a bit incomplete. Before we start fieldwork, we first need to decide how to collect that data.

Figure 1. Image of GEMM lab team collecting gray whale UAS data. Image taken under NOAA/NMFS permit #16111

As observers, we are far from omnipresent and there is no way to know what the animals are doing all of the time. In any environment, scientists have to decide when and where to observe their animals and what behaviors they are interested in recording. In many studies, behavior is recorded live by an observer. In those studies, other limitations need to be taken into account, such as human error and observer fatigue. Collecting behavioral data is particularly challenging in the marine environment. Cetaceans spend most of their lives out of sight from humans, their time at the surface is brief, and when they appear together in large groups it can be very difficult to keep track of who is doing what when. Imagine being in a boat trying to keep track of what three different whales are doing without a pre-determined method – the task could quickly become overwhelming and biased. This is why we need a methodology for collecting and classifying behavior. We cannot study behavior without acknowledging these limitations and the potential biases that come with the methods we choose. Different data collection methods are better suited to address different questions.

The use of drones gives us the ability to record cetacean behavior non-invasively, from a perspective that allows greater observation (Figure 2, Torres et al. 2018), and for later review, which is a significant improvement. However, as we prepare to collect more behavior data, we need to study the methods and understand the benefits and disadvantages of each approach so that we capture the information we need without bias. Altmann (1974) provides a thorough overview of behavioral sampling methods.

Figure 2. Diagram illustrating “whale surface time” relative to “whale visible time” data as collected from an unmanned aerial systems (UAS) aircraft flying over a gray whale as it moves sequentially (from right to left) from “headstand” foraging to surfacing. Figure from Torres et al. (2018).

Ad libitum behavioral sampling has no structure and occurs when we find a group of whales and just write down everything they are doing. This method is a good first step, however it comes with bias.  Without structure, we cannot be sure that there was an equal probability of detecting each kind of behavior; this problem is called detectability bias. This type of bias is an issue if we are trying to answer questions about how often a behavior occurs, or what percent of time is spent in each behavior state. This is a bias to be especially concerned about when it comes to cetaceans because there are many examples of behaviors with different levels of detectability. An extreme example would be the detectability of breaching versus a behavior that takes place under the surface. A breaching whale is easier to spot and more exciting, which could lead to results suggesting that whales breach more often than they do relative to underwater behaviors. While it’s impossible to eliminate detectability bias, other sampling methods employ decision rules to try and reduce its effect. Many decision rules revolve around time, such as setting a minimum or maximum observation time interval. Other time rules involve recording the behavior state at set intervals of time (e.g., every 5 minutes). Setting observation boundaries helps standardize the methods and the data being collected.

In a structured sampling plan, the first big decision that needs to be addressed is the need to know the duration of behaviors. Point events do not include duration data but can be used to study the frequencies of behaviors. For example, if my research question was “Do whales perform “headstands” in a specific habitat type?”, then I would need point events of headstanding behavior. But, if I wanted to ask, “Do whales spend more time spent headstanding in a specific habitat type than in other habitat types?”, I would need headstanding to be a state event. State events are events with associated duration information and can be used for activity budgets. Activity budgets show how much time an animal spends in each behavior state. Some sampling methods focus on collecting only point events. However, to get the most complete understanding of behavior I think it’s important to collect both. Focal animal follows are another method of collecting more detailed data and is commonly used in cetacean studies.

The explanation of a focal follow method is in the name.  We focus on one individual, follow it, and record all of its behaviors. When employing this method, decisions are made about how an individual is chosen and how long it is followed. In some cases, the behavior of this animal is used as a proxy for the behavior of an entire group. I essentially use the focal follow method in my research. While I review drone footage to record behavioral data instead of recording behaviors live in the field, I focus on one individual a time as I go through the videos. To do this I use a software called BORIS (Friard and Gamba 2016) to mark the time of each behavior per individual (Figure 3). If there are three individuals in a video, I’ll review the footage three times to record behaviors once per individual, focusing on each in turn.

Figure 3. Screenshot of BORIS layout.

While the drone footage brings the advantages of time to review and a better view of the whale, we are constrained by the duration of a flight. Focal follows would ideally last longer than the ~15 minutes of battery life per drone flight. Our previously collected footage gives us snapshots of behavior, and this makes it challenging to compare and analyze durations of behaviors. Therefore, I am excited that we are going to try conducting drone focal follows this summer by swapping out drones when power runs low to achieve longer periods of video coverage of whale behavior. I’ll be able to use these data to move from snapshots to analyzing longer clips and better understanding the behavioral ecology of gray whales. As exciting as this opportunity is, it also presents the challenge of method development. So, I now need to develop decision rules and data collection methods to answer the questions that I have been eagerly asking.

References

Altmann, Jeanne. 1974. “Observational Study of Behavior: Sampling Methods.” Behaviour 49 (3–4): 227–66. https://doi.org/10.1163/156853974X00534.

Friard, Olivier, and Marco Gamba. 2016. “BORIS: A Free, Versatile Open-Source Event-Logging Software for Video/Audio Coding and Live Observations.” Methods in Ecology and Evolution 7 (11): 1325–30. https://doi.org/10.1111/2041-210X.12584.

Torres, Leigh G., Sharon L. Nieukirk, Leila Lemos, and Todd E. Chandler. 2018. “Drone up! Quantifying Whale Behavior from a New Perspective Improves Observational Capacity.” Frontiers in Marine Science 5 (SEP). https://doi.org/10.3389/fmars.2018.00319.

Whale blow: good for more than spotting whales

Clara Bird, Masters Student, OSU Department of Fisheries and Wildlife, Geospatial Ecology of Marine Megafauna Lab

Whale blow, the puff of air mixed with moisture that a whale releases when it comes to the surface, is a famously thrilling indicator of the presence of a whale. From shore, spotting whale blow brings the excitement of knowing that there are whales nearby. During boat-based field work, seeing or hearing blow brings the rush of adrenaline meaning that it’s game time. Whale blow can also be used to identify different species of whales, for example gray whale blow is heart shaped (Figure 1). However, whale blow can be used for more than just spotting and identifying whales. We can use the time between blows to study energetics.

Figure 1. Gray whale blow is often heart shaped (when there is very little wind). Source: https://www.lajollalight.com/sdljl-natural-la-jolla-winter-wildlife-2015jan08-story.html

A blow interval is the time between consecutive blows when a whale is at the surface (Stelle, Megill, and Kinzel 2008). These are also known as short breath holds, whereas long breath holds are times between surfacings (Sumich 1983).  Sumich (1983) hypothesized that short breath holds lead to efficient rates of oxygen use. The body uses oxygen to create energy, so “efficient rate of oxygen use” means that longer breath holds do not use much more oxygen and subsequently do not produce more energy.  Surfacings, during which short blow intervals occur, are often thought of as recovery periods for whales. Think of it this way, when you sprint, immediately afterwards you typically need to take a break to just breathe and recover.

We hypothesize that we can use blow intervals as a measure of how strenuous an activity is; shorter blow intervals may indicate that an activity is more energetically demanding (Wursig, Wells, and Croll 1986). Let’s go back to the sprinting analogy and compare the energetic demands of walking and running. Imagine I asked you to walk for five minutes, stop and measure the time between each breath, and then run for five minutes and do the same; after running, you would likely breathe more heavily and take more breaths with less time between them. This result indicates that running is more demanding, which we already know because we can do other experiments with humans to study metabolic rate and related metrics. In the case of gray whales, we cannot do experiments in the same way, but we can use the same analogy. Several studies have examined how blow intervals differ between travelling and foraging.

Wursig, Wells, and Croll (1986) measured blow interval, surfacing time, and estimated dive depth and duration of gray whales in Alaska from a boat during the foraging season. They found that blow intervals were shorter during feeding. They also found that the number of blows per surfacing increased with increasing depth. Overall these findings suggest that during the foraging season, feeding is more strenuous than other behaviors and that deeper dives may be more physiologically stressful.

Stelle, Megill, and Kinzel (2008) studied gray whales foraging off of British Columbia, Canada. They found shorter blow intervals during foraging, intermediate blow intervals during searching, and longer blow intervals during travelling. Interestingly, within feeding behaviors, they found a difference between whales feeding on mysids (krill-like animals that swim in the water column) and whales feeding benthically on amphipods. They found that whales feeding on mysids made more frequent but shorter dives with short blow intervals at surface, while whales feeding benthically had longer dives with longer blow intervals. They hypothesized that this difference in surfacing pattern is because mysids might scatter when disturbed, so gray whales surface more often to allow the mysids swarm to reform. These studies inspired me to start investigating these same questions with my drone video data.

As I review the drone footage and code the behaviors I also mark the time of each blow. I’ve done some initial video coding and using this data I have started to look into differences in blow intervals. As it turns out, we see a similar difference in blow interval relative to behavior state in our data: whales that are foraging have shorter blow intervals than when traveling (Figure 2). It is encouraging to see that our data shows similar patterns.

Figure 2. Boxplot of mean blow interval per sighting of foraging whales and travelling whales.

Next, I would like to examine how blow intervals differ between foraging tactics. A significant part of my thesis is dedicated to studying specific foraging tactics. The perspective from the drone allows us to identify behaviors in greater detail than studies from shore or boat (Torres et al. 2018), allowing us to dig into the differences between the different foraging behaviors. The purpose of foraging is to gain energy. However, this gain is a net gain. To understand the different energetic “values” of each tactic we need to understand the cost of each behavior, i.e. how much energy is required to perform the behavior. Given previous studies, maybe blow intervals could help us measure this cost or at least compare the energetic demands of the behaviors relative to each other. Furthermore, because different behaviors are likely associated with different prey types (Dunham and Duffus 2001), we also need to understand the different energetic gains of each prey type (this is something that Lisa is studying right now, check out the COZI project to learn more). By understanding both of these components – the gains and costs – we can understand the energetic tradeoffs of the different foraging tactics.

Another interesting component to this energetic balance is a whale’s health and body condition. If a whale is in poor health, can it afford the energetic costs of certain behaviors? If whales in poor body condition engage in different behavior patterns than whales in good body condition, are these patterns explained by the energetic costs of the different foraging behaviors? All together this line of investigation is leading to an understanding of why a whale may choose to use different foraging behaviors in different situations. We may never get the full picture; however, I find it really exciting that something as simple and non-invasive as measuring the time between breaths can contribute such a valuable data stream to this project.

References

Dunham, Jason S., and David A. Duffus. 2001. “Foraging Patterns of Gray Whales in Central Clayoquot Sound, British Columbia, Canada.” Marine Ecology Progress Series 223 (November): 299–310. https://doi.org/10.3354/meps223299.

Stelle, Lei Lani, William M. Megill, and Michelle R. Kinzel. 2008. “Activity Budget and Diving Behavior of Gray Whales (Eschrichtius Robustus) in Feeding Grounds off Coastal British Columbia.” Marine Mammal Science 24 (3): 462–78. https://doi.org/10.1111/j.1748-7692.2008.00205.x.

Sumich, James L. 1983. “Swimming Velocities, Breathing Patterns, and Estimated Costs of Locomotion in Migrating Gray Whales, Eschrichtius Robustus.” Canadian Journal of Zoology 61 (3): 647–52. https://doi.org/10.1139/z83-086.

Torres, Leigh G., Sharon L. Nieukirk, Leila Lemos, and Todd E. Chandler. 2018. “Drone up! Quantifying Whale Behavior from a New Perspective Improves Observational Capacity.” Frontiers in Marine Science 5 (SEP). https://doi.org/10.3389/fmars.2018.00319.

Wursig, B., R. S. Wells, and D. A. Croll. 1986. “Behavior of Gray Whales Summering near St. Lawrence Island, Bering Sea.” Canadian Journal of Zoology 64 (3): 611–21. https://doi.org/10.1139/z86-091.

Coding stories, tips, and tricks

Clara Bird1 and Karen Lohman2

1Masters Student in Wildlife Science, Geospatial Ecology of Marine Megafauna Lab

2Masters Student in Wildlife Science, Cetacean Conservation and Genomics Laboratory

In a departure from my typical science-focused blog, this week I thought I would share more about myself. This week I was inspired by International’s Woman’s Day and, with some reflection on the last eight months as a graduate student, I decided to look back on the role that coding has played in my life. We hear about how much coding can be empowering but I thought it might be cool to talk about my personal experience of feeling empowered by coding. I’ve also invited a fellow grad student in the Marine Mammal Institute, Karen Lohman, to co-author this post. We’re going to briefly talk about our experience with coding and then finish with advice for getting started with coding and coding for data analysis.

Our Stories

Clara

I’ve only been coding for a little over two and a half years. In summer 2017 I did an NSF REU (Research Experience for Undergraduates) at Bigelow Laboratory for Ocean Sciences and for my project I taught myself python (with the support of a post-doc) for a data analysis project. During those 10 weeks, I coded all day, every workday. From that experience, I not only acquired the hard skill of programming, but I gained a good amount of confidence in myself, and here’s why: For the first three years of my undergraduate career coding was a daunting skill that I knew I would eventually need but did not know where to start. So, I essentially ended up learning by jumping off the deep end. I found the immersion experience to be the most effective learning method for me. With coding, you find out if you got something right (or wrong) almost instantaneously. I’ve found that this is a double-edged sword. It means that you can easily have days where everything goes wrong. But, the feeling when it finally works is what I think of when I hear the term empowerment. I’m not quite sure how to put it into words, but it’s a combination of independence, confidence, and success. 

Aside from learning the fundamentals, I finished that summer with confidence in my ability to teach myself not just new coding skills, but other skills as well. I think that feeling confident in my ability to learn something new has been the most helpful aspect to allow me to hit the ground running in grad school and also keeping the ‘imposter syndrome’ at bay (most of the time).

Clara’s Favorite Command: pd.groupby (python) – Say you have a column of measurements and a second column with the field site of each location. If you wanted the mean of the measurement per each location, you could use groupby to get this. It would look like this: dataframe.groupby(‘Location’)[‘Measurement’].mean().reset_index()

Karen

I’m quite new to coding, but once I started learning I was completely enchanted! I was first introduced to coding while working as a field assistant for a PhD student (a true R wizard who has since developed deep learning computer vision packages for automated camera trap image analysis) in the cloud forest of the Ecuadorian Andes. This remote jungle was where I first saw how useful coding can be for data management and analysis. It was a strange juxtaposition between being fully immersed in nature for remote field work and learning to think along the lines of coding syntax. It wasn’t the typical introduction to R most people have, but it was an effective hook. We were able to produce preliminary figures and analysis as we collected data, which made a tough field season more rewarding. Coding gave us instant results and motivation.

I committed to fully learning how to code during my first year of graduate school. I first learned linux/command line and python, and then I started working in R that following summer. My graduate research uses population genetics/genomics to better understand the migratory connections of humpback whales. This research means I spend a great deal of time working to develop bioinformatics and big data skills, an essential skill for this area of research and a goal for my career. For me, coding is a skill that only returns what you put in; you can learn to code quite quickly, if you devote the time. After a year of intense learning and struggle, I am writing better code every day.

In grad school research progress can be nebulous, but for me coding has become a concrete way to measure success. If my code ran, I have a win for the week. If not, then I have a clear place to start working the next day. These “tiny wins” are adding up, and coding has become a huge confidence boost.

Karen’s Favorite Command: grep (linux) – Searches for a string pattern and prints all lines containing a match to the screen. Grep has a variety of flags making this a versatile command I use every time I’m working in linux.

Advice

Getting Started

  • Be kind to yourself, think of it as a foreign language. It takes a long time and a lot of practice.
  • Once you know the fundamental concepts in any language, learning another will be easier (we promise!).
  • Ask for help! The chances that you have run into a unique error are quite small, someone out there has already solved your problem, whether it’s a lab mate or another researcher you find on Google!

Coding Tips

1. Set yourself up for success by formatting your datasheets properly

  • Instead of making your spreadsheet easy to read, try and think about how you want to use the data in the analysis.
  • Avoid formatting (merged cells, wrap text) and spaces in headers
  • Try to think ahead when formatting your spreadsheet
    • Maybe chat with someone who has experience and get their advice!

2. Start with a plan, start on paper

This low-tech solution saves countless hours of code confusion. It can be especially helpful when manipulating large data frames or in multistep analysis. Drawing out the structure of your data and checking it frequently in your code (with ‘head’ in R/linux) after manipulation can keep you on track. It is easy to code yourself into circles when you don’t have a clear understanding of what you’re trying to do in each step. Or worse, you could end up with code that runs, but doesn’t conduct the analysis you intended, or needed to do.

3. Good organization and habits will get you far

There is an excellent blog by Nice R Code on project organization and file structure. I highly recommend reading and implementing their self-contained scripting suggestions. The further you get into your data analysis the more object, directory, and function names you have to remember. Develop a naming scheme that makes sense for your project (i.e. flexible, number based, etc.) and stick with it. Temporary object names in functions or code blocks can be a good way to clarify what is the code-in-progress or the code result.

Figure 1. An example of project based workflow directory organization from Nice R Code (https://nicercode.github.io/blog/2013-04-05-projects/ )

4. Annotate. Then annotate some more.

Make comments in your code so you can remember what each section or line is for. This makes debugging much easier! Annotation is also a good way to stay on track as you code, because you’ll be describing the goal of every line (remember tip 1?). If you’re following a tutorial (or STACKoverflow answer), copy the web address into your annotation so you can find it later. At the end of a coding session, make a quick note of your thought process so it’s easier to pick up when you come back. It’s also a good habit to add some ‘metadata’ details to the top of your script describing what the script is intended for, what the input files are, the expected outputs, and any other pertinent details for that script. Your future self will thank you!

Figure 2. Example code with comments explaining the purpose of each line.

5. Get with git/github already

Github is a great way to manage version control. Remember how life-changing the advent of dropbox was? This is like that, but for code! It’s also become a great open-source repository for newly developed code and packages. In addition to backing up and storing your code, GitHub has become a ‘coding CV’ that other researchers look to when hiring.

Wondering how to get started with GitHub? Check out this guide: https://guides.github.com/activities/hello-world/

Looking for a good text/code editor? Check out atom (https://atom.io/), you can push your edits straight to git from here.

6. You don’t have to learn everything, but you should probably learn the R Tidyverse ASAP

Tidyverse is a collection of data manipulation packages that make data wrangling a breeze. It also includes ggplot, an incredibly versatile data visualization package. For python users hesitant to start working in R, Tidyverse is a great place to start. The syntax will feel more familiar to python, and it has wonderful documentation online. It’s also similar to the awk/sed tools from linux, as dplyr removes any need to write loops. Loops in any language are awful, learn how to do them, and then how to avoid them.

7. Functions!

Break your code out into blocks that can be run as functions! This allows easier repetition of data analysis, in a more readable format. If you need to call your functions across multiple scripts, put them all into one ‘function.R’ script and source them in your working scripts. This approach ensures that all the scripts can access the same function, without copy and pasting it into multiple scripts. Then if you edit the function, it is changed in one place and passed to all dependent scripts.

8. Don’t take error messages personally

  • Repeat after me: Everyone googles for every other line of code, everyone forgets the command some (….er every) time.
  • Debugging is a lifestyle, not a task item.
  • One way to make it less painful is to keep a list of fixes that you find yourself needing multiple times. And ask for help when you’re stuck!

9. Troubleshooting

  • Know that you’re supposed to google but not sure what?
    • start by copying and pasting the error message
  • When I started it was hard to know how to phrase what I wanted, these might be some common terms
    • A dataframe is the coding equivalent of a spreadsheet/table
    • Do you want to combine two dataframes side by side? That’s a merge
    • Do you want to stack one dataframe on top of another? That’s concatenating
    • Do you want to get the average (or some other statistic) of values in a column that are all from one group or category? Check out group by or aggregate
    • A loop is when you loop through every value in a column or list and do something with it (use it in an equation, use it in an if/else statement, etc).

Favorite Coding Resource (other than github….)

  • Learnxinyminutes.com
    • This is great ‘one stop googling’ for coding in almost any language! I frequently switch between coding languages, and as a result almost always have this open to check syntax.
  • https://swirlstats.com/
    • This is a really good resource for getting an introduction to R

Parting Thoughts

We hope that our stories and advice have been helpful! Like many skills, you tend to only see people once they have made it over the learning curve. But as you’ve read Karen and I both started recently and felt intimidated at the beginning. So, be patient, be kind to yourself, believe in yourself, and good luck!

The complex relationship between behavior and body condition

Clara Bird, Masters Student, OSU Department of Fisheries and Wildlife, Geospatial Ecology of Marine Megafauna Lab

Imagine that you are a wild foraging animal: In order to forage enough food to survive and be healthy you need to be healthy enough to move around to find and eat your food. Do you see the paradox? You need to be in good condition to forage, and you need to forage to be in good condition. This complex relationship between body condition and behavior is a central aspect of my thesis.

One of the great benefits of having drone data is that we can simultaneously collect data on the body condition of the whale and on its behavior. The GEMM lab has been measuring and monitoring the body condition of gray whales for several years (check out Leila’s blog on photogrammetry for a refresher on her research). However, there is not much research linking the body condition of whales to their behavior. Hence, I have expanded my background research beyond the marine world to looked for papers that tried to understand this connection between the two factors in non-cetaceans. The literature shows that there are examples of both, so let’s go through some case studies.

Ransom et al. (2010) studied the effect of a specific type of contraception on the behavior of a population of feral horses using a mixed model. Aside from looking at the effect of the treatment (a type of contraception), they also considered the effect of body condition. There was no difference in body condition between the treatment and control groups, however, they found that body condition was a strong predictor of feeding, resting, maintenance, and social behaviors. Females with better body condition spent less time foraging than females with poorer body condition. While it was not the main question of the study, these results provide a great example of taking into account the relationship between body condition and behavior when researching any disturbance effect.

While Ransom et al. (2010) did not find that body condition affected response to treatment, Beale and Monaghan (2004) found that body condition affected the response of seabirds to human disturbance. They altered the body condition of birds at different sites by providing extra food for several days leading up to a standardized disturbance. Then the authors recorded a set of response variables to a disturbance event, such as flush distance (the distance from the disturbance when the birds leave their location). Interestingly, they found that birds with better body condition responded earlier to the disturbance (i.e., when the disturbance was farther away) than birds with poorer body condition (Figure 1). The authors suggest that this was because individuals with better body condition could afford to respond sooner to a disturbance, while individuals with poorer body condition could not afford to stop foraging and move away, and therefore did not show a behavioral response. I emphasize behavioral response because it would have been interesting to monitor the vital rates of the birds during the experiment; maybe the birds’ heart rates increased even though they did not move away. This finding is important when evaluating disturbance effects and management approaches because it demonstrates the importance of considering body condition when evaluating impacts: animals that are in the worst condition, and therefore the individuals that are most vulnerable, may appear to be undisturbed when in reality they tolerate the disturbance because they cannot afford the energy or time to move away.

Figure 1.  Figure showing flush distance of birds that were fed (good body condition) and unfed (poor body condition).

These two studies are examples of body condition affecting behavior. However, a study on the effect of habitat deterioration on lizards showed that behavior can also affect body condition. To study this effect, Amo et al. (2007) compared the behavior and body condition of lizards in ski slopes to those in natural areas. They found that habitat deterioration led to an increased perceived risk of predation, which led to an increase in movement speed when crossing these deteriorated, “risky”, areas. In turn, this elevated movement cost led to a decrease in body condition (Figure 2). Hence, the lizard’s behavior affected their body condition.


Figure 2. Figure showing the difference in body condition of lizards in natural and deteriorated habitats.

Together, these case studies provide an interesting overview of the potential answers to the question: does body condition affect behavior or does behavior affect body condition? The answer is that the relationship can go both ways. Ransom et al. (2004) showed that regardless of the treatment, behavior of female horses differed between body conditions, indicating that regardless of a disturbance, body condition affects behavior. Beale and Monaghan (2004) demonstrated that seabird reactions to disturbance differed between body conditions, indicating that disturbance studies should take body condition into account. And, Amo et al. (2007) showed that disturbance affects behavior, which consequently affects body condition.

Looking at the results from these three studies, I can envision finding similar results in my gray whale research. I hypothesize that gray whale behavior varies by body condition in everyday circumstances and when the whale is disturbed. Yet, I also hypothesize that being disturbed will affect gray whale behavior and subsequently their body condition. Therefore, what I anticipate based on these studies is a circular relationship between behavior and body condition of gray whales: if an increase in perceived risk affects behavior and then body condition, maybe those affected individuals with poor body condition will respond differently to the disturbance. It is yet to be determined if a sequence like this could ever be detected, but I think that it is important to investigate.

Reading through these studies, I am ready and eager to start digging into these hypotheses with our data. I am especially excited that I will be able to perform this investigation on an individual level because we have identified the whales in each drone video. I am confident that this work will lead to some interesting and important results connecting behavior and health, thus opening avenues for further investigations to improve conservation studies.

References

Beale, Colin M, and Pat Monaghan. 2004. “Behavioural Responses to Human Disturbance: A Matter of Choice?” Animal Behaviour 68 (5): 1065–69. https://doi.org/10.1016/j.anbehav.2004.07.002.

Ransom, Jason I, Brian S Cade, and N. Thompson Hobbs. 2010. “Influences of Immunocontraception on Time Budgets, Social Behavior, and Body Condition in Feral Horses.” Applied Animal Behaviour Science 124 (1–2): 51–60. https://doi.org/10.1016/j.applanim.2010.01.015.

Amo, Luisa, Pilar López, and José Martín. 2007. “Habitat Deterioration Affects Body Condition of Lizards: A Behavioral Approach with Iberolacerta Cyreni Lizards Inhabiting Ski Resorts.” Biological Conservation 135 (1): 77–85. https://doi.org/10.1016/j.biocon.2006.09.020.

What are the ecological impacts of gray whale benthic feeding?

Clara Bird, Masters Student, OSU Department of Fisheries and Wildlife, Geospatial Ecology of Marine Megafauna Lab

Happy new year from the GEMM lab! Starting graduate school comes with a lot of learning. From skills, to learning about how much there is to learn, to learning about the system I will be studying in depth for the next few years. This last category has been the most exciting to me because digging into the literature on a system or a species always leads to the unearthing of some fascinating and surprising facts. So, for this blog I will write about one of the aspects of gray whale foraging that intrigues me most: benthic feeding and its impacts.

How do gray whales feed?

Gray whales are a unique species. Unlike other baleen whales, such as humpback and blue whales, gray whales regularly feed off the bottom of the ocean (Nerini, 1984). They roll to one side and swim along the bottom, they then suction up (by depressing their tongue) the sediment and prey, then the sediment and water is filtered out of the baleen. In fact, we use sediment streams, shown in Figure 1, as an indicator of benthic feeding behavior when analyzing drone footage (Torres et al. 2018).

Figure 1. Screenshot of drone video showing sediment streaming from mouth of a whale after benthic feeding. Video taken under NOAA/NMFS permit #21678

Locations of benthic feeding can be identified without directly observing a gray whale actively feeding because of the excavated pits that result from benthic feeding (Nerini 1984). These pits can be detected using side-scan sonar that is commonly used to map the seafloor. Oliver and Slattery (1985) found that the pits typically are from 2-20 m2. In some of the imagery, consecutive neighboring pits are visible, likely created by one whale in series during a feeding event. Figure 2 shows different arrangements of pits.

Figure 2. Different arrangements of pits created by feeding whales (Nerini 1984).

Aside from how fascinating the behavior is, benthic feeding is also interesting because it has a large impact on the environment. Coming from a background of studying baleen whales that primarily feed on krill, I had not really considered the potential impacts of whale foraging other than removing prey from the environment. However, when gray whales feed, they excavate large areas of the benthic substrate that disturb and impact the habitat.

The impacts of benthic feeding

Weitkamp et al. (1992) conducted a study on gray whale benthic foraging on ghost shrimp in Puget Sound, WA, USA. This study, conducted over two years, focused on measuring the impact of benthic foraging by its effect on prey abundance. They found that the standing stock of ghost shrimp within a recently excavated pit was two to five times less than that outside the pit, and that 3100 to 5700 grams of shrimp can be removed per pit. From aerial surveys they estimated that within one season feeding gray whales created between 2700 and 3200 pits. Using these values, they calculated that 55 to 79% of the standing stock of ghost shrimp was removed each season by foraging gray whales. Interestingly, they found that the shrimp biomass within an excavated pit recovered within about two months.

Oliver and Slattery (1985) also found a recovery period of about 2 months per pit in their study on the effect of gray whale benthic feeding on the prey community in the Bering Sea. They sampled prey within and outside feeding excavations, both actual whale pits and man-made, to test the response of the benthic community to the disturbance of a feeding event. They found that after the initial feeding disturbance, the excavated area was rapidly colonized by scavenging lysianassid amphipods, which are small (10 mm) crustaceans that typically eat dead organic material. These amphipods rushed in and attacked the organisms that were injured or dislodged by the whale feeding event, typically small crustaceans and polychaete worms. Within hours of the whale feeding event, these amphipods had dispersed and a different genre of scavenging lysianassid amphipods slowly invaded the excavated pit further and stayed much longer. After a few days or weeks these pits collected and trapped organic debris that attracted more colonists. Indeed, they found that the number of colonists remained elevated within the excavated areas for over two months.

Notably, these results on how the disturbance of gray whale benthic feeding changes sediment composition support the idea that this foraging behavior maintains the sand substrate and therefore helps to maintain balanced levels of benthic dwelling amphipods, their primary source of prey in this study area (Johnson and Nelson, 1984). Gray whales scour the sea floor when they feed and this process leads to the resuspension of lots of sediments and nutrients that would otherwise remain on the seafloor. Therefore, while this feeding may seem like a violent disturbance, it may in fact play a large role in benthic productivity (Johnson and Nelson, 1984; Oliver and Slattery, 1985).

These ecosystem impacts of gray whale benthic feeding I have described above demonstrate the various stages of invaders after a feeding disturbance, and the process of succession. Succession is the ecological process of how a community structure builds and grows. Primary succession is when the structure grows from truly nothing and secondary succession occurs after a disturbance, such as a fire. In secondary succession, there are typically pioneer species that first appear and then give way to other species and a more complex community eventually emerges. Succession is well documented in many terrestrial studies after disturbance events, and the processes of secondary succession is very important to community ecology and resilience.

Since gray whale benthic foraging does not impact an entire habitat all at once, the process is not perfectly comparable to secondary succession in terrestrial systems. Yet, when thinking about the smaller scale, another example of succession in the marine environment takes place at a whale fall. When a whale dies and sinks to the ocean floor, a small ecosystem emerges. Different organisms arrive at different stages to scavenge different parts of the carcass and a food web is created around it.

To me the impacts of gray whale benthic feeding are akin to both terrestrial disturbance events and whale falls. The excavation serves as a disturbance, and through secondary succession the habitat is refreshed via stages of different species colonization until the system eventually returns to the pre-disturbance levels. However, like a whale fall the feeding event leaves behind injured or displaced organisms that scavengers consume; in fact seabirds are known to take advantage of benthic invertebrates that are brought to the surface by a gray whale feeding event (Harrison, 1979). 

So much of our research is focused on questions about how the changing environment impacts our study species and not the other way around. This venture into the literature has provided me with an important reminder to think about flipping the question. I have enjoyed starting 2020 with a reminder of how cool gray whales are, and that while a disturbance can initially be thought of as negative, it may actually bring about important, and positive, change.

References

Nerini, Mary. 1984. “A Review of Gray Whale Feeding Ecology.” In The Gray Whale: Eschrichtius Robustus, 423–50. Elsevier Inc. https://doi.org/10.1016/B978-0-08-092372-7.50024-8.

Oliver, J. S., and P. N. Slattery. 1985. “Destruction and Opportunity on the Sea Floor: Effects of Gray Whale Feeding.” Ecology 66 (6): 1965–75. https://doi.org/10.2307/2937392.

Torres, Leigh G., Sharon L. Nieukirk, Leila Lemos, and Todd E. Chandler. 2018. “Drone up! Quantifying Whale Behavior from a New Perspective Improves Observational Capacity.” Frontiers in Marine Science 5 (SEP). https://doi.org/10.3389/fmars.2018.00319.

Weitkamp, Laurie A, Robert C Wissmar, Charles A Simenstad, Kurt L Fresh, and Jay G Odell. 1992. “Gray Whale Foraging on Ghost Shrimp (Callianassa Californiensis) in Littoral Sand Flats of Puget Sound, USA.” Canadian Journal of Zoology 70 (11): 2275–80. https://doi.org/10.1139/z92-304.

Johnson, Kirk R., and C. Hans Nelson. 1984. “Side-Scan Sonar Assessment of Gray Whale Feeding in the Bering Sea.” Science 225 (4667): 1150–52.

Harrison, Craig S. 1979. “The Association of Marine Birds and Feeding Gray Whales.” The Condor 81 (1): 93. https://doi.org/10.2307/1367866.

Classifying cetacean behavior

Clara Bird, Masters Student, OSU Department of Fisheries and Wildlife, Geospatial Ecology of Marine Megafauna Lab

The GEMM lab recently completed its fourth field season studying gray whales along the Oregon coast. The 2019 field season was an especially exciting one, we collected rare footage of several interesting gray whale behaviors including GoPro footage of a gray whale feeding on the seafloor, drone footage of a gray whale breaching, and drone footage of surface feeding (check out our recently released highlight video here). For my master’s thesis, I’ll use the drone footage to analyze gray whale behavior and how it varies across space, time, and individual. But before I ask how behavior is related to other variables, I need to understand how to best classify the behaviors.

How do we collect data on behavior?

One of the most important tools in behavioral ecology is an ‘ethogram’. An ethogram is a list of defined behaviors that the researcher expects to see based on prior knowledge. It is important because it provides a standardized list of behaviors so the data can be properly analyzed. For example, without an ethogram, someone observing human behavior could say that their subject was walking on one occasion, but then say strolling on a different occasion when they actually meant walking. It is important to pre-determine how behaviors will be recorded so that data classification is consistent throughout the study. Table 1 provides a sample from the ethogram I use to analyze gray whale behavior. The specificity of the behaviors depends on how the data is collected.

Table 1. Sample from gray whale ethogram. Based on ethogram from Torres et al. (2018).

In marine mammal ecology, it is challenging to define specific behaviors because from the traditional viewpoint of a boat, we can only see what the individuals are doing at the surface. The most common method of collecting behavioral data is called a ‘focal follow’. In focal follows an individual, or group, is followed for a set period of time and its behavioral state is recorded at set intervals.  For example, a researcher might decide to follow an animal for an hour and record its behavioral state at each minute (Mann 1999). In some studies, they also recorded the location of the whale at each time point. When we use drones our methods are a little different; we collect behavioral data in the form of continuous 15-minute videos of the whale. While we collect data for a shorter amount of time than a typical focal follow, we can analyze the whole video and record what the whale was doing at each second with the added benefit of being able to review the video to ensure accuracy. Additionally, from the drone’s perspective, we can see what the whales are doing below the surface, which can dramatically improve our ability to identify and describe behaviors (Torres et al. 2018).

Categorizing Behaviors

In our ethogram, the behaviors are already categorized into primary states. Primary states are the broadest behavioral states, and in my study, they are foraging, traveling, socializing, and resting. We categorize the specific behaviors we observe in the drone videos into these categories because they are associated with the function of a behavior. While our categorization is based on prior knowledge and critical evaluation, this process can still be somewhat subjective.  Quantitative methods provide an objective interpretation of the behaviors that can confirm our broad categorization and provide insight into relationships between categories.  These methods include path characterization, cluster analysis, and sequence analysis.

Path characterization classifies behaviors using characteristics of their track line, this method is similar to the RST method that fellow GEMM lab graduate student Lisa Hildebrand described in a recent blog. Mayo and Marx (1990) analyzed the paths of surface foraging North Atlantic Right Whales and were able to classify the paths into primary states; they found that the path of a traveling whale was more linear and then paths of foraging or socializing whales that were more convoluted (Fig 1). I plan to analyze the drone GPS track line as a proxy for the whale’s track line to help distinguish between traveling and foraging in the cases where the 15-minute snapshot does not provide enough context.

Figure 1. Figure from Mayo and Marx (1990) showing different track lines symbolized by behavior category.

Cluster analysis looks for natural groupings in behavior. For example, Hastie et al. (2004) used cluster analysis to find that there were four natural groupings of bottlenose dolphin surface behaviors (Fig. 2). I am considering using this method to see if there are natural groupings of behaviors within the foraging primary state that might relate to different prey types or habitat. This process is analogous to breaking human foraging down into sub-categories like fishing or farming by looking for different foraging behaviors that typically occur together.

Figure 2. Figure from Hastie et al. (2004) showing the results of a hierarchical cluster analysis.

Lastly, sequence analysis also looks for groupings of behaviors but, unlike cluster analysis, it also uses the order in which behaviors occur. Slooten (1994) used this method to classify Hector’s dolphin surface behaviors and found that there were five classes of behaviors and certain behaviors connected the different categories (Fig. 3). This method is interesting because if there are certain behaviors that are consistently in the same order then that indicates that the order of events is important. What function does a specific sequence of behaviors provide that the behaviors out of that order do not?

Figure 3. Figure from Slooten (1994) showing the results of sequence analysis.

Think about harvesting fruits and vegetables from a garden: the order of how things are done matters and you might use different methods to harvest different kinds of produce. Without knowing what food was being harvested, these methods could detect that there were different harvesting methods for different fruits or veggies. By then studying when and where the different methods were used and by whom, we could gain insight into the different functions and patterns associated with the different behaviors. We might be able to detect that some methods were always used in certain habitat types or that different methods were consistently used at different times of the year.

Behavior classification methods such as these described provide a more refined and detailed analysis of categories that can then be used to identify patterns of gray whale behaviors. While our ultimate goal is to understand how gray whales will be affected by a changing environment, a comprehensive understanding of their current behavior serves as a baseline for that future study.

References

Burnett, J. D., Lemos, L., Barlow, D., Wing, M. G., Chandler, T., & Torres, L. G. (2019). Estimating morphometric attributes of baleen whales with photogrammetry from small UASs: A case study with blue and gray whales. Marine Mammal Science, 35(1), 108–139. https://doi.org/10.1111/mms.12527

Darling, J. D., Keogh, K. E., & Steeves, T. E. (1998). Gray whale (Eschrichtius robustus) habitat utilization and prey species off Vancouver Island, B.C. Marine Mammal Science, 14(4), 692–720. https://doi.org/10.1111/j.1748-7692.1998.tb00757.x

Hastie, G. D., Wilson, B., Wilson, L. J., Parsons, K. M., & Thompson, P. M. (2004). Functional mechanisms underlying cetacean distribution patterns: Hotspots for bottlenose dolphins are linked to foraging. Marine Biology, 144(2), 397–403. https://doi.org/10.1007/s00227-003-1195-4

Mann, J. (1999). Behavioral sampling methods for cetaceans: A review and critique. Marine Mammal Science, 15(1), 102–122. https://doi.org/10.1111/j.1748-7692.1999.tb00784.x

Slooten, E. (1994). Behavior of Hector’s Dolphin: Classifying Behavior by Sequence Analysis. Journal of Mammalogy, 75(4), 956–964. https://doi.org/10.2307/1382477

Torres, L. G., Nieukirk, S. L., Lemos, L., & Chandler, T. E. (2018). Drone up! Quantifying whale behavior from a new perspective improves observational capacity. Frontiers in Marine Science, 5(SEP). https://doi.org/10.3389/fmars.2018.00319

Mayo, C. A., & Marx, M. K. (1990). Surface foraging behaviour of the North Atlantic right whale, Eubalaena glacialis, and associated zooplankton characteristics. Canadian Journal of Zoology, 68(10), 2214–2220. https://doi.org/10.1139/z90-308

Demystifying the algorithm

By Clara Bird, Masters Student, OSU Department of Fisheries and Wildlife, Geospatial Ecology of Marine Megafauna Lab

Hi everyone! My name is Clara Bird and I am the newest graduate student in the GEMM lab. For my master’s thesis I will be using drone footage of gray whales to study their foraging ecology. I promise to talk about how cool gray whales in a following blog post, but for my first effort I am choosing to write about something that I have wanted to explain for a while: algorithms. As part of previous research projects, I developed a few semi-automated image analysis algorithms and I have always struggled with that jargon-filled phrase. I remember being intimidated by the term algorithm and thinking that I would never be able to develop one. So, for my first blog I thought that I would break down what goes into image analysis algorithms and demystify a term that is often thrown around but not well explained.

What is an algorithm?

The dictionary broadly defines an algorithm as “a step-by-step procedure for solving a problem or accomplishing some end” (Merriam-Webster). Imagine an algorithm as a flow chart (Fig. 1), where each step is some process that is applied to the input(s) to get the desired output. In image analysis the output is usually isolated sections of the image that represent a specific feature; for example, isolating and counting the number of penguins in an image. Algorithm development involves figuring out which processes to use in order to consistently get desired results. I have conducted image analysis previously and these processes typically involve figuring out how to find a certain cutoff value. But, before I go too far down that road, let’s break down an image and the characteristics that are important for image analysis.

Figure 1. An example of a basic algorithm flow chart. There are two inputs: variables A and B. The process is the calculation of the mean of the two variables.

What is an image?

Think of an image as a spread sheet, where each cell is a pixel and each pixel is assigned a value (Fig. 2). Each value is associated with a color and when the sheet is zoomed out and viewed as a whole, the image comes together.  In color imagery, which is also referred to as RGB, each pixel is associated with the values of the three color bands (red, green, and blue) that make up that color. In a thermal image, each pixel’s value is a temperature value. Thinking about an image as a grid of values is helpful to understand the challenge of translating the larger patterns we see into something the computer can interpret. In image analysis this process can involve using the values of the pixels themselves or the relationships between the values of neighboring pixels.

Figure 2. A diagram illustrating how pixels make up an image. Each pixel is a grid cell associated with certain values. Image Source: https://web.stanford.edu/class/cs101/image-1-introduction.html

Our brains take in the whole picture at once and we are good at identifying the objects and patterns in an image. Take Figure 3 for example: an astute human eye and brain can isolate and identify all the different markings and scars on the fluke. Yet, this process would be very time consuming. The trick to building an algorithm to conduct this work is figuring out what processes or tools are needed to get a computer to recognize what is marking and what is not. This iterative process is the algorithm development.

Figure 3. Photo ID image of a gray whale fluke.

Development

An image analysis algorithm will typically involve some sort of thresholding. Thresholds are used to classify an image into groups of pixels that represent different characteristics. A threshold could be applied to the image in Figure 3 to separate the white color of the markings on the fluke from the darker colors in the rest of the image. However, this is an oversimplification, because while it would be pretty simple to examine the pixel values of this image and pick a threshold by hand, this threshold would not be applicable to other images. If a whale in another image is a lighter color or the image is brighter, the pixel values would be different enough from those in the previous image for the threshold to inaccurately classify the image. This problem is why a lot of image analysis algorithm development involves creating parameterized processes that can calculate the appropriate threshold for each image.

One successful method used to determine thresholds in images is to first calculate the frequency of color in each image, and then apply the appropriate threshold. Fletcher et al. (2009) developed a semiautomated algorithm to detect scars in seagrass beds from aerial imagery by applying an equation to a histogram of the values in each image to calculate the threshold. A histogram is a plot of the frequency of values binned into groups (Fig. 4). Essentially, it shows how many times each value appears in an image. This information can be used to define breaks between groups of values. If the image of the fluke were transformed to a gray scale, then the values of the marking pixels would be grouped around the value for white and the other pixels would group closer to black, similar to what is shown in Figure 4. An equation can be written that takes this frequency information and calculates where the break is between the groups. Since this method calculates an individualized threshold for each image, it’s a more reliable method for image analysis. Other characteristics could also be used to further filter the image, such as shape or area.

However, that approach is not the only way to make an algorithm applicable to different images; semi-automation can also be helpful. Semi-automation involves some kind of user input. After uploading the image for analysis, the user could also provide the threshold, or the user could crop the image so that only the important components were maintained. Keeping with the fluke example, the user could crop the image so that it was only of the fluke. This would help reduce the variety of colors in the image and make it easier to distinguish between dark whale and light marking.

Figure 4. Example histogram of pixel values. Source: Moallem et al. 2012

Why algorithms are important

Algorithms are helpful because they make our lives easier. While it would be possible for an analyst to identify and digitize each individual marking from a picture of a gray whale, it would be extremely time consuming and tedious. Image analysis algorithms significantly reduce the time it takes to process imagery. A semi-automated algorithm that I developed to count penguins from still drone imagery can count all the penguins on a one km2 island in about 30 minutes, while it took me 24 long hours to count them by hand (Bird et al. in prep). Furthermore, the process can be repeated with different imagery and analysts as part of a time series without bias because the algorithm eliminates human error introduced by different analysts.

Whether it’s a simple combination of a few processes or a complex series of equations, creating an algorithm requires breaking down a task to its most basic components. Development involves translating those components step by step into an automated process, which after many trials and errors, achieves the desired result. My first algorithm project took two years of revising, improving, and countless trials and errors.  So, whether creating an algorithm or working to understand one, don’t let the jargon nor the endless trials and errors stop you. Like most things in life, the key is to have patience and take it one step at a time.

References

Bird, C. N., Johnston, D.W., Dale, J. (in prep). Automated counting of Adelie penguins (Pygoscelis adeliae) on Avian and Torgersen Island off the Western Antarctic Peninsula using Thermal and Multispectral Imagery. Manuscript in preparation

Fletcher, R. S., Pulich, W. ‡, & Hardegree, B. (2009). A Semiautomated Approach for Monitoring Landscape Changes in Texas Seagrass Beds from Aerial Photography. https://doi.org/10.2112/07-0882.1

Moallem, Payman & Razmjooy, Navid. (2012). Optimal Threshold Computing in Automatic Image Thresholding using Adaptive Particle Swarm Optimization. Journal of Applied Research and Technology. 703.