Skip to content

Analysis of migration patterns of western marsh harriers using GPS tracking data for Vansteelant et al. (2020)

License

Notifications You must be signed in to change notification settings

inbo/wmh-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Analysis of migration patterns of western marsh harriers using GPS tracking data

DOI

Rationale

This repository contains analysis code for the paper:

Vansteelant WMG, Klaassen R, Strandberg R, Janssens K, T'Jollyn F, Bouten W, Koks BJ & Anselin A (2020) Western Marsh Harriers Circus aeruginosus from nearby breeding areas migrate along comparable loops, but on contrasting schedules in the West African–Eurasian flyway. Journal of Ornithology 161, 953–965. https://doi.org/10.1007/s10336-020-01785-6

To study their migration patterns, the paper makes use of GPS tracking data of 3 breeding populations of Circus aeruginosus:

Shortname Population Tracked birds Data collected by Movebank study Deposited data
Belgian dataset Near the Belgium-Netherlands border in the provinces East Flanders (Belgium) and Zeeland (the Netherlands)  4 Research Institute for Nature and Forest (INBO) 604806671 Anselin et al. (2019)
Dutch dataset In the province of Groningen (the Netherlands) 2 Dutch Montagu’s Harrier Foundation 922263102 Koks et al. (2019)
Swedish dataset In Southern Sweden 4 Lund University 49909355 -

Repo structure

The repository structure is based on Cookiecutter Data Science. Files and directories indicated with GENERATED should not be edited manually.

├── README.md              : Description of this repository
├── LICENSE                : Repository license
├── wmh-analysis.Rproj     : RStudio project file
├── .gitignore             : Files and directories to be ignored by git
│
├── data                   
│   ├── raw                : Data used for this analysis
│   └── maps               : Maps downloaded by scripts (ignored by git) GENERATED
│
├── reports
│   ├── figures            : Figures generated by scripts (ignored by git) GENERATED
│   └── tables             : Tables generated by scripts (ignored by git) GENERATED
│
└── src                    : Analysis scripts
    └── resampling         : Data resampling scripts

Usage

Packages

Run src/p1_loadPackages.R to install and load all required packages.

Analysis scripts

These scripts are available in src and can be used to reproduce all figures and analyses from the paper. They are intended to be run consecutively.

  1. p2a_analyses_read_processed_data.R: read data files
  2. p2b_analyses_annotate&clean_processed_data.R: clean data
  3. p3_Fig1A_Lat-vs-yday.R: make figure 1A of the paper
  4. p3a_Fig1B&C.R: make figures 1B and 1C
  5. p3b_FigS2_Wintering-fin.R: make figure S2
  6. p4_wind-fin.R: read wind data and calculate mean daily wind components
  7. p5_CompileData-PerTrip-PerID_TableS1&S9.R: make table S1 and S9
  8. p6_Figure2&TablesS5-S6.R: make table S5 and S6
  9. p6_TableS2.R: make table S2
  10. p6a_TableS3_Long-diff-pops.R: make table S3
  11. p6b_TablesS7&8_WindSelectivity_glmms&posthoc.R: make table S7 and S8

Side scripts

These scripts are helper scripts automatically loaded when running the main analysis scripts.

  • pt2pt_fxns.R: functions to compute distance, duration and speed
  • sidescript_CalcDailyStats.R: compute daily statistics
  • sidescript_CalcStopovers.R: compute coordinates and duration of stopovers
  • sidescript_readDEM.R: read and manipulate DEM for making maps
  • sidescript_readSwedes.R: read Swedish dataset, make selection and manipulate data to match with MH-resampled-23092017.csv

Resampling scripts

These scripts are available in src/resampling and were used to resample the raw GPS data for the Belgian and Dutch datasets stored in the UvA-BiTS database to an hourly resolution. The resampled data are stored in data, so running this code is not required to replicate our analysis.

Data

Source data

Source data are available in data/raw.

annotation.csv

Annotated version of the Belgian and Dutch datasets. Wouter Vansteelant determined the start and end dates of migratory and non-migratory periods through expert interpretation of tracks in Google Earth.

Fields:

  • naam: bird name
  • cycle: migratory cycle (winter, spring, summer, autumn + year)
  • date: starting date
  • type: behaviour type (breeding, dead, migration, move, pre-migration, winter.stage1, winter.stage2, winter.stage3)
  • complete: criterion for selection in analysis
  • use.date: criterion for selection in analysis

annotation-swedes.csv

Annotated version of the Swedish dataset. Wouter Vansteelant determined the start and end dates of migratory and non-migratory periods through expert interpretation of tracks in Google Earth.

Fields: same as annotation.csv

MH-resampled-23092017.csv

Belgian and Dutch tracking data downloaded from the UvA-BiTS database on September 23, 2017 (also available on Movebank and Zenodo, see above).

Fields:

  • dev: device code
  • name: bird name
  • dt: datetime
  • lat: latitude
  • long: longitude
  • alt: altitude
  • date: date component of dt
  • mth: month
  • yr: year
  • season: spring/autumn
  • julian: Julian date
  • yday: day of year
  • indday: combination of name and julian, thus providing a unique identifier for each bird-day
  • migr: combination of name, yr and season, thus providing a unique identifier for each migratory trip
  • origin: data provider
  • dist: distance (calculated using pt2pt_fxns.R)
  • dur: duration (calculated using pt2pt_fxns.R)
  • spd: speed (dist/dur, calculated using pt2pt_fxns.R)
  • dist.b: the distance between point i and i-1 (dist is from i to i+1)
  • dur.b: the duration between point i and i-1 (dur is from i to i+1)
  • spd.b: the speed between point i and i-1 (spd is from i to i+1)
  • high: classifier marking records with unrealistically high speed values

swedes.csv

Swedish tracking data, obtained from Raymond Klaassen (also available on Movebank, see above).

Fields:

  • dev: device code
  • lat: latitude
  • long: longitude
  • alt: altitude
  • dtx: date time rounded to an hour
  • dt: date time
  • dif: -
  • filter: criterion for selection in analysis (1 = use, 0 = do not use)

weather.csv

Table containing wind parameters as extracted with RNCEP for the fixes obtained nearest to 6:00, 12:00 or 18:00 UTC on each day. These variables are used to estimate mean daily wind conditions analogous to Klaassen et al. (2010).

Fields:

  • dt: datetime
  • date: date component of dt
  • name: bird name
  • indday: combination of name and Julian date, thus providing a unique identifier for each bird-day
  • u: u-component (i.e. zonal component) of the wind vector (positive values towards east, negative towards west)
  • v: v-component (i.e. meridionaal component) of the wind vector (positive values towards north, negative towards south)
  • w: wind strength
  • alfa: wind direction (in degrees relative to north)
  • tag2: label indicating whether this is a fix

External GIS data

These data are downloaded by the scripts into data/maps and are also available online:

  • ne_50m_admin_0_countries: shapefile containing country boundaries, source: Natural Earth
  • alt_30s_bil: raster file containing a DEM of the world, source: worldclim, version 1.4

Acknowledgements

This work makes use of data and/or infrastructure provided by INBO and funded by Research Foundation - Flanders (FWO) as part of the Belgian contribution to LifeWatch.