Data Expeditions: Estimating home ranges using track data in QGIS and RStudio

Project Summary

We introduced students to spatial analysis in QGIS and R using location data from two whale species tagged with satellite transmitters. Students were given satellite tracks from five Cuvier’s beaked whales (Ziphius cavirostris) and five short-finned pilot whales (Globicephala macrorhynchus) tagged off the North Carolina coast. Students then used RStudio to calculate two metrics of these species' spatial ranges: home range (where a species spends 95% of its time) and core range (where a species spends 50% of its time). Next, students used QGIS to visualize the data, producing maps that displayed the whales' tracks and their ranges.

Themes and Categories

Graduate Students: Amanda Lohmann, Ph.D., Student in Ecology, and Ann-Marie Jacoby, Ph.D., Student in Marine Science and Conservation

Faculty: Dr. Andrew Read

Course: "Marine Mammals" (BIOLOGY 376LA; 2018)

Data Description

The dataset consists of series of location points recorded from satellite tags on five short-finned pilot whales and five Cuvier's beaked whales. The whales were tagged off Cape Hatteras, NC between 2014 and 2016 as part of a joint effort between Duke University and the US Navy Marine Species Monitoring Program (Deep Divers and Satellite Tagging Records).

Class Summary

We gave a brief overview of the ARGOS satellite system and issues involved in cleaning up the error-prone data that is recorded by ARGOS satellite tags. We introduced the concept of geographic information system (GIS) software used for geospatial analysis. We discussed the need to project three-dimensional spatial data from the Earth's surface onto two-dimensional planes for analysis in GIS software and explained the importance of consistently using the same projection within a single project.

We then presented the whale track data and explained the concept of home ranges and core ranges. Next, we gave students the instructions sheet, which walked them through calculating home range and core range for both species of whale. The assignment asked students to: use the open-source QGIS program to load satellite-recorded whale locations; project the 3D latitude-longitude coordinates onto a 2D plane; export the projected coordinates into a file that could be loaded with the R programming language; use R to calculate the home range and core range of each species using a method known as kernel density estimation (KDE); transfer the resulting polygons back into QGIS; and create clear, easy-to-read maps in QGIS displaying the whales' tracks and their ranges.


  1. Create two maps in QGIS one for short-finned pilot whales (Globicephala macrorhynchus) and one for Cuvier’s beaked whales (Ziphius cavirostris) displaying the track points, core range, and home range for all animals using kernel density estimations in R.
  2. Descriptively compare pilot whale and Cuvier’s beaked whale home ranges by completing the following:
    1. Describe the two species' home ranges and core ranges.
    2. Compare the two species' home ranges (similarities and differences), and
    3. Give possible reasons as of to why there are similarities and differences between the two species' home ranges. Think about their physiology, diet, behavior, etc., as well as the continental shelf and Gulf Stream.

We expect a paragraph but no more than one page. Please cite the sources you use.

Course Materials

  1. Thorne LH, Foley HJ, Baird RW, Webster DL, Swaim ZT, Read AJ (2017) Movement and foraging behavior of short-finned pilot whales in the Mid-Atlantic Bight: importance of bathymetric features and implications for management. Mar Ecol Prog Ser 584:245-257. 
  2. Stanistreet, JE, Nowacek DP, Baumann-Pickering S, Bell JT, Cholewiak DM, Hildebrand JA, Hodge LEW, Moors-Murphy HB, Van Parijs SM, Read AJ.  2017. Using passive acoustic monitoring to document the distribution of beaked whale species in the western North Atlantic Ocean. Canadian Journal of Fisheries and Aquatic Sciences.


Pilot Whale Tracks

Pilot whale home range and core range

Beaked whale home range and core range

Related Projects

KC and Patrick led two hands-on data workshops for ENVIRON 335: Drones in Marine Biology, Ecology, and Conservation. These labs were intended to introduce students to examples of how drones are currently being used as a remote sensing tool to monitor marine megafauna and their environments, and how machine learning can be used to efficiently analyze remote sensing datasets. The first lab specifically focused on how drones are being used to collect aerial images of whales to measure changes in body condition to help monitor populations. Students were introduced to the methods for making accurate measurements and then received an opportunity to measure whales themselves. The second lab then introduced analysis methods using computer vision and deep neural networks to detect, count, and measure objects of interest in remote sensing data. This work provided students in the environmental sciences an introduction to new techniques in machine learning and remote sensing that can be powerful multipliers of effort when analyzing large environmental datasets.

This two-week teaching module in an introductory-level undergraduate course invites students to explore the power of Twitter in shaping public discourse. The project supplements the close-reading methods that are central to the humanities with large-scale social media analysis. This exercise challenges students to consider how applying visualization techniques to a dataset too vast for manual apprehension might enable them to identify for granular inspection smaller subsets of data and individual tweets—as well as to determine what factors do not lend themselves to close-reading at all. Employing an original dataset of almost one million tweets focused on the contested 2018 Florida midterm elections, students develop skills in using visualization software, generating research questions, and creating novel visualizations to answer those questions. They then evaluate and compare the affordances of large-scale data analytics with investigation of individual tweets, and draw on their findings to debate the role of social media in shaping public conversations surrounding major national events. This project was developed as a collaboration among the English Department (Emma Davenport and Astrid Giugni), Math Department (Hubert Bray), Duke University Library (Eric Monson), and Trinity Technology Services (Brian Norberg).

Understanding how to generate, analyze, and work with datasets in the humanities is often a difficult task without learning how to code or program. In humanities centered courses, we often privilege close reading or qualitative analysis over other methods of knowing, but by learning some new quantitative techniques we better prepare the students to tackle new forms of reading. This class will work with the data from the HathiTrust to develop ideas for thinking about how large groups and different discourse communities thought of queens of antiquity like Cleopatra and Dido.

Please refer to for more information.