{"id":1102,"date":"2017-01-14T05:20:14","date_gmt":"2017-01-14T05:20:14","guid":{"rendered":"http:\/\/blogs.oregonstate.edu\/gemmlab\/?p=1102"},"modified":"2018-10-17T15:31:31","modified_gmt":"2018-10-17T15:31:31","slug":"categorizing-behavior-states","status":"publish","type":"post","link":"https:\/\/dev.blogs.oregonstate.edu\/gemmlab\/2017\/01\/14\/categorizing-behavior-states\/","title":{"rendered":"Simple behavior classification of tracking data with residence in space and time"},"content":{"rendered":"<p><em>By Rachael Orben PhD., Postdoctoral Scholar in the <a href=\"http:\/\/hmsc.oregonstate.edu\/research-labs\/seabird-oceanography-lab\">Seabird Oceanography Lab<\/a> and the\u00a0<a href=\"http:\/\/mmi.oregonstate.edu\/gemm-lab\">Geospatial Ecology and Marine Megafauna Lab<\/a>\u00a0<\/em><\/p>\n<p>At 2pm, Jan 3, our paper entitled \u201c<strong>Classification of Animal Movement Behavior through Residence in Space and Time<\/strong>\u201d was published. At 14:03 I clicked on the <a href=\"http:\/\/journals.plos.org\/plosone\/article?id=10.1371\/journal.pone.0168513\">link<\/a> and there it was, type-set and crisp as a newly minted Open Access scientific contribution.<\/p>\n<p>So, what is this paper about? It presents a simple \u2013 yes simple &#8211; method of identifying simple behaviors states in two-dimensional animal tracking data (think latitude and longitude). Since the paper is open access you can go find the methods there. Categorizing these \u201cdots on a map\u201d into behaviors allows us to ask questions about how often, why, when and where simple behaviors happen. These behaviors really are simple (hopefully the somewhat grating repetitiveness of the word \u2018simple\u2019 has driven that point home by now!). We are identifying three basic, but fundamental, states:<\/p>\n<p style=\"text-align: left\">1) <strong>transit,<\/strong> characterized by fast somewhat straight line movement from a to b,<\/p>\n<p style=\"text-align: left\">2) a <strong>sedentary state<\/strong> characterized by relatively more time spent in an area with little distance traveled (such as resting behavior) and<\/p>\n<p style=\"text-align: left\">3) an <strong>active state<\/strong> characterized by lots of time spent in an area where an animal is also moving around a lot and covering a lot of ground.<\/p>\n<p>This new method, that we termed Residence in Space and Time (RST), can assist the fast-growing, sophisticated, big-data generating, conservation-orientated field of animal movement ecology. One of the first hurdles is data exploration and visualization. Modern ecologists deploy tracking devices that collect location data remotely to understand animal distribution and behavior. But at first glance tracks (like the figure below) can look like spaghetti dinner. Identifying movement behaviors can help to us see patterns in the tangles.<\/p>\n<figure id=\"attachment_1119\" aria-describedby=\"caption-attachment-1119\" style=\"width: 660px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/blogs.oregonstate.edu\/gemmlab\/files\/2017\/01\/spagetti-e1484353435212.jpg\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1119\" data-permalink=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2017\/01\/spagetti-e1484353435212.jpg\" data-orig-file=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2017\/01\/spagetti-e1484353435212.jpg\" data-orig-size=\"500,374\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"spaghetti\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2017\/01\/spagetti-300x224.jpg\" data-large-file=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2017\/01\/spagetti-1024x766.jpg\" class=\"wp-image-1119 size-large\" src=\"http:\/\/blogs.oregonstate.edu\/gemmlab\/files\/2017\/01\/spagetti-1024x766.jpg\" width=\"660\" height=\"494\" \/><\/a><figcaption id=\"caption-attachment-1119\" class=\"wp-caption-text\">24 GPS tracks of grey-headed albatross incubation foraging trips; tracked from Campbell Island, New Zealand.<\/figcaption><\/figure>\n<p>So how might this method work? First, let&#8217;s start with a track. Below\u00a0is a very short foraging trip from a thick-billed murre tracked with a GPS logger during chick rearing from St. Paul Island in Alaska (see <a href=\"http:\/\/www.int-res.com\/abstracts\/meps\/v533\/p261-276\/\">Parades et al 2015<\/a>).<\/p>\n<figure id=\"attachment_1108\" aria-describedby=\"caption-attachment-1108\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1108\" data-permalink=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2017\/01\/P1080393-e1484254730849.jpg\" data-orig-file=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2017\/01\/P1080393-e1484254730849.jpg\" data-orig-size=\"500,375\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;5.6&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;DMC-FZ20&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1218913831&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;72&quot;,&quot;iso&quot;:&quot;400&quot;,&quot;shutter_speed&quot;:&quot;0.00076923076923077&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}\" data-image-title=\"p1080393\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2017\/01\/P1080393-300x225.jpg\" data-large-file=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2017\/01\/P1080393-1024x768.jpg\" class=\"wp-image-1108 size-medium\" src=\"http:\/\/blogs.oregonstate.edu\/gemmlab\/files\/2017\/01\/P1080393-300x225.jpg\" alt=\"p1080393\" width=\"300\" height=\"225\" \/><figcaption id=\"caption-attachment-1108\" class=\"wp-caption-text\">A thick-billed murre (Uria lomvia), St. Paul Island, Alaska.<\/figcaption><\/figure>\n<p>The track below has points every second and we can imagine the murre flying from the colony, landing on the water, and then diving (indicated by the lack of GPS position data when the bird dives below the water to forage). Then the bird flies back to the colony to feed its chick. This trip is roughly 14 minutes long.<\/p>\n<p><a href=\"http:\/\/blogs.oregonstate.edu\/gemmlab\/files\/2017\/01\/MurreTrack.gif\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1105\" data-permalink=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2017\/01\/MurreTrack.gif\" data-orig-file=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2017\/01\/MurreTrack.gif\" data-orig-size=\"640,400\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"murretrack\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2017\/01\/MurreTrack-300x188.gif\" data-large-file=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2017\/01\/MurreTrack.gif\" class=\"alignnone size-full wp-image-1105\" src=\"http:\/\/blogs.oregonstate.edu\/gemmlab\/files\/2017\/01\/MurreTrack.gif\" alt=\"murretrack\" width=\"640\" height=\"400\" \/><\/a><\/p>\n<p>So I can take this track and run RST to identify three behavior states. As color-coded below, the <strong>black points indicate transit<\/strong>, <strong><span style=\"color: #ff0000\">red indicates relatively stationary behavior<\/span><\/strong>, and <span style=\"color: #0000ff\"><strong>blue indicates <\/strong><strong><span style=\"color: #0000ff\">p<\/span>oints where the bird was flying in a less direct manner<\/strong>\u00a0<strong>than pure transit potentially circling around before landing and moving between dives<\/strong><\/span>. The high resolution of the GPS data really helps us to understand how this bird was moving. Such behavior information is easily conserved in a high-resolution track like this.\u00a0Though in this case, the bird did a lot of transiting and only exhibited different movement behaviors in the vicinity of the two dives.<\/p>\n<p><a href=\"http:\/\/blogs.oregonstate.edu\/gemmlab\/files\/2017\/01\/murretrack_1sec_RST-copy.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1115\" data-permalink=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2017\/01\/murretrack_1sec_RST-copy-e1484257150665.png\" data-orig-file=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2017\/01\/murretrack_1sec_RST-copy-e1484257150665.png\" data-orig-size=\"600,481\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"murretrack_1sec_rst-copy\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2017\/01\/murretrack_1sec_RST-copy-300x240.png\" data-large-file=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2017\/01\/murretrack_1sec_RST-copy-e1484257150665.png\" class=\"aligncenter wp-image-1115 \" src=\"http:\/\/blogs.oregonstate.edu\/gemmlab\/files\/2017\/01\/murretrack_1sec_RST-copy.png\" alt=\"murretrack_1sec_rst-copy\" width=\"600\" height=\"481\" \/><\/a><\/p>\n<p>Logging locations at 1-second intervals is a stretch for the battery life of these miniaturized GPS loggers (~15g), and more often than not we would like the loggers to last much longer than 14 mins. So instead of 1 second we typically have tracks with less frequent locations. To me, this is akin to taking a 1-second track and then taking off my glasses and trying to see the same behaviors. Deciphering behavior states becomes a bit (or a lot) fuzzier. In the case of this murre track, when we down-sample the locations to every 10 seconds much of the resolution of this track is lost (see plot below). What happens when we run RST?<\/p>\n<p><a href=\"http:\/\/blogs.oregonstate.edu\/gemmlab\/files\/2017\/01\/murretrack_10sec_RST-copy-e1484257318840.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1116\" data-permalink=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2017\/01\/murretrack_10sec_RST-copy-e1484257318840.png\" data-orig-file=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2017\/01\/murretrack_10sec_RST-copy-e1484257318840.png\" data-orig-size=\"600,526\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"murretrack_10sec_rst-copy\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2017\/01\/murretrack_10sec_RST-copy-300x263.png\" data-large-file=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2017\/01\/murretrack_10sec_RST-copy-e1484257318840.png\" class=\"size-full wp-image-1116 aligncenter\" src=\"http:\/\/blogs.oregonstate.edu\/gemmlab\/files\/2017\/01\/murretrack_10sec_RST-copy-e1484257318840.png\" alt=\"murretrack_10sec_rst-copy\" width=\"600\" height=\"526\" \/><\/a><\/p>\n<p>As you can see some of the behavior is maintained and some of it is a bit fuzzier.<\/p>\n<p>A good rule of thumb is that if a behavior happens faster than the sampling interval the logger is recording at, then the behavior is not recorded. Seems simple, but it is an important consideration when programming loggers and designing animal movement studies. For murres, these quick trips to forage for their chicks are easily lost even at a 5-minute sampling interval, which is often used in seabird tracking studies where the birds are at sea for days. Often we work with such lower resolution location data and, instead of one trip from one bird, we have many trips from many individuals. RST allows a fast way to quickly and accurately identify simple behaviors in order to help with initial data exploration efforts and for answering more complex questions such as behavior specific habitat models.<\/p>\n<p>So, if you have some tracking data \u2013 of birds, marine mammals, or your dog! \u2013 you can learn how RST works (basically by summing up time and distance covered within a circle). I keep an updated version of the R code, a short guide, an example dataset on a GitHub repository:\u00a0<a href=\"https:\/\/github.com\/raorben\/RST\">https:\/\/github.com\/raorben\/RST<\/a>.<\/p>\n<p>Here is the spaghetti from above (tracks of Grey-headed albatrosses) with the behavioral states labeled using\u00a0RST: \u00a093,481 points and this behavior classification\u00a0took only 14\u00a0seconds to run!\u00a0\u00a0<a href=\"http:\/\/blogs.oregonstate.edu\/gemmlab\/files\/2017\/01\/albatrosstracks_RST.gif\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1122\" data-permalink=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2017\/01\/albatrosstracks_RST.gif\" data-orig-file=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2017\/01\/albatrosstracks_RST.gif\" data-orig-size=\"640,480\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"albatrosstracks_rst\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2017\/01\/albatrosstracks_RST-300x225.gif\" data-large-file=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2017\/01\/albatrosstracks_RST.gif\" class=\"size-full wp-image-1122 aligncenter\" src=\"http:\/\/blogs.oregonstate.edu\/gemmlab\/files\/2017\/01\/albatrosstracks_RST.gif\" alt=\"albatrosstracks_rst\" width=\"640\" height=\"480\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Rachael Orben PhD., Postdoctoral Scholar in the Seabird Oceanography Lab and the\u00a0Geospatial Ecology and Marine Megafauna Lab\u00a0 At 2pm, Jan 3, our paper entitled \u201cClassification of Animal Movement Behavior through Residence in Space and Time\u201d was published. At 14:03 I clicked on the link and there it was, type-set and crisp as a newly &hellip; <a href=\"https:\/\/dev.blogs.oregonstate.edu\/gemmlab\/2017\/01\/14\/categorizing-behavior-states\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Simple behavior classification of tracking data with residence in space and time<\/span><\/a><\/p>\n","protected":false},"author":7022,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-1102","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5Mfqy-hM","_links":{"self":[{"href":"https:\/\/dev.blogs.oregonstate.edu\/gemmlab\/wp-json\/wp\/v2\/posts\/1102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.blogs.oregonstate.edu\/gemmlab\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.blogs.oregonstate.edu\/gemmlab\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.blogs.oregonstate.edu\/gemmlab\/wp-json\/wp\/v2\/users\/7022"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.blogs.oregonstate.edu\/gemmlab\/wp-json\/wp\/v2\/comments?post=1102"}],"version-history":[{"count":15,"href":"https:\/\/dev.blogs.oregonstate.edu\/gemmlab\/wp-json\/wp\/v2\/posts\/1102\/revisions"}],"predecessor-version":[{"id":2406,"href":"https:\/\/dev.blogs.oregonstate.edu\/gemmlab\/wp-json\/wp\/v2\/posts\/1102\/revisions\/2406"}],"wp:attachment":[{"href":"https:\/\/dev.blogs.oregonstate.edu\/gemmlab\/wp-json\/wp\/v2\/media?parent=1102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.blogs.oregonstate.edu\/gemmlab\/wp-json\/wp\/v2\/categories?post=1102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.blogs.oregonstate.edu\/gemmlab\/wp-json\/wp\/v2\/tags?post=1102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}