9 Example 1: Flapping

Photograph by Frank Vassen, (c) creative commons

Figure 9.1: Photograph by Frank Vassen, (c) creative commons

9.1 Classifying migratory flapping flight in Hoopoes :The dataset

Hoopoes (Upupa epops) have been tracked on the their migrations from Switzerland (to sub-Saharan Africa) using SOI-GDL3pam loggers.

  • Pressure is recorded every 15 minutes
  • Light is recorded every 5 minutes
  • Activity is recorded every 5 minutes
  • Pitch is recorded every 5 minutes
  • Temperature is recorded every 15 minutes
  • Tri-axial acceleration is recorded every 4 hours
  • Tri-axial magnetic field is recorded every 4 hours

9.3 What should we look for?

Base on this plot, it is possible to see that nightime is the darker areas on the right and left sides of the plot, and daytime the “blob” in the middle. During the migratiory season (august/september and march), the nightime period is very different, with higher activity and pitch, and lower than usual temperature and pressure. These correspond to migratory flight periods.

This can also be seen by cutting out a period in september are looking at the raw data.

9.4 Performing the classification

Because flapping is widespread in birds, pamlr integrates a pre-defined function classify_flap() to classify this behaviour.

This function assumes that if the bird has displayed high activity for x number of consecutive minutes, then it is flapping. It is therefore important to think about what constitutes high activity and how long this period should be. At the moment, the function uses k-means clustering to identify the threshold between high and low activity. Using to_plot = TRUE then allows the user to see where that threshold was drawn. The period of high activity is set by default to period = 3. This is because activity is recorded (on this logger) every 5 minutes and we assume that after an hour of high activity, the bird must be flapping.

Thus “high activity duration” / “data resolution” = “period” and 60 minutes / 5 minutes = period of 12.

## List of 7
##  $ timetable     :'data.frame':  32 obs. of  3 variables:
##   ..$ start       : POSIXct[1:32], format: "2016-08-06 20:20:00" "2016-08-07 19:40:00" ...
##   ..$ end         : POSIXct[1:32], format: "2016-08-07 01:50:00" "2016-08-08 09:15:00" ...
##   ..$ Duration (h): num [1:32] 5.5 13.58 8.67 4.25 1.33 ...
##  $ classification: num [1:92449] 0 0 0 0 0 0 1 0 0 0 ...
##  $ no_movement   : num 0
##  $ low_movement  : num 1
##  $ high_movement : num 2
##  $ migration     : num 3
##  $ threshold     : num 13.5

This classification therefore provides different pieces of infomration.

  • timetable shows when a migratory flapping flight started and stopped, and how long it lasted (in hours)
  • classification is the output from the classification. In this case, each cluster/classs/state is represented by numbers between one 1 and 4. To find out what behaviour each of these numbers represent, we can refer to low_movement, high_movement, migration and no_movement
  • threshold represents the threshold between high and low activity.

Using these information, it’s therefore possible to plot the classification: