Readme.txt file for data packages associated with paper on "Prey encounters and spatial memory influence Area Restricted Search behaviour in a marine central place forager”. Data were collected by the University of Aberdeen in collaboration with the University of St. Andrews Sea Mammal Research Unit as part of the Marine Mammal Monitoring Programme funded by Beatrice Offshore WindFarm Ltd. All codes to process the data and generate the outputs can be found at: https://github.com/virginiaIorio/Drivers-of-seal-ARS-behaviour Contact for queries Virginia Iorio, v.iorio1.18@abdn.ac.uk. 1. Summary data on the individual seals tagged during the study used remove the data occurring in the 1st week post tagging (see Table 1 and Table S1). Filename = “pv64-2017_seal_summary.txt”. Six columns = Tag_start, ID, Sex, Weight, Length, Tag_end. Tag_start is the date in which the seal was tagged as dd/mm/yyyy. The ID is the seal unique ID number from the Lighthouse Field Station harbour seal photo-ID catalogue. Sex is the seal gender 1 is male and 2 is female. Weight is the weight of the seals in kg measured at the time of capture. Length is the length of the seals from the nose to the tail in cm at the time of capture. Tag_end is the last date for which we have data available for each individual as dd/mm/yyyy. 2. Data on individual at-sea trips used to identify foraging trips. Filename = “pv64-2017_trip_summaries.txt”. Sixteen columns = ID, REF, PTT, Trip_No, Trip_Code, Trip_Start, Trip_End, Trip_Duration, Start_Haulout_Lon, Start_Haulout_Lat, End_Haulout_Lon, End_Haulout_Lat, Dist_haulouts, MaxDist_Start_Haulout, MaxDist_End_Haulout, Max_Depth. The ID is the seal unique ID number from the Lighthouse Field Station harbour seal photo-ID catalogue. REF is the tag deployment reference code. PTT is the tag identification number. Trip_No is the incremental number of trips done by each individual seal. Trip_Code is a combination of the PTT and Trip_No, so that all the trips have a unique identification number. Trip_Start is the date and time of the begginning of a trip as yyyy-mm-dd hh:hh:ss. Trip_End is the date and time of the end of a trip as yyyy-mm-dd hh:hh:ss. Trip_Duration is the time difference between the Trip_Start and Trip_End in hours. Start_Haulout_Lon and Start_Haulout_Lat are the longitude and latitude coordinates of the haulout site prior to the beginning of the trip. End_Haulout_Lon and End_Haulout_Lat are the longitude and latitude coordinates of the haulout location at the end of the trip. Dist_haulouts is the distance between the haulout locations before and after the trip in kilometers. MaxDist_Start_Haulout and MaxDist_End_Haulout are the maximum distances in kilometers reached during the trip to the haulout locations at the beginning and at the end of the trip respectively. Max_depth is the maximum diving depth reached during the trip in meters. 3. GPS location data with trip information used to identify uncertain dive locations in the diving dats (see Fig. 1). Filename =“pv64-2017_gps_data_with_haulout_&_trip_info.txt”. Thirteen columns = ID, PTT, D_DATE, LAT, LON, EST_SPEED, hauledout, trip_or_haulout_number, trip_code, duration, posn_in_trip, mid_80, dist_haulouts. The ID is the seal unique ID number from the Lighthouse Field Station harbour seal photo-ID catalogue. PTT is the tag identification number. D_DATE is the date and time when the GPS location was recorded as yyyy-mm-dd hh:mm:ss. LAT and LON are the latitude and longitude of the GPS location. EST_SPEED is the speed across the surface estimated by the location filtering algorithm in m/s. Hauledout is a binary column representing when the animal is hauledout 1 or at-sea 0. Trip_or_haulout_number provides an incremental number of “haulout-trip” sequences for each individual. Trip_code is a combination of the PTT and the trip_or_haulout_number which is unique to each “haulout-trip” sequence. Duration is the duration of the haulout period or trip respectively. Posn_in_trip represents the proportion of the time elapsed since the beginning of the haulout phase or an at-sea trip. Mid-80 is a binary value that reprents whether that GPS location is within the 10%-90% of an haulout phase or an at-sea trip. Dist-haulouts is the distance between the haulout locations before and after the trip in kilometers. 4. Seal diving data used to create the dive batches for the analysis and to identify the bottom phase of each dive where to calculare prey catch attempts (See Fig. S3). Filename = “pv64-2017_dive.txt” Sixtyeight columns = ID, REF, PTT, DS_DATE, JUL, DE_DATE, DIVE_DUR, SURF_DUR, MAX_DEP, START_LAT, START_LON, END_LAT, END_LON, PERCENT_AREA, T1, T2, …,T22, T23, D1, D2, …, D22, D23, N_DEPTHS, Trip_No, Posn_in_Trip, Trip_Code, date, sunrise, sunset, daynigth. The ID is the seal unique ID number from the Lighthouse Field Station harbour seal photo-ID catalogue. REF is the tag deployment reference code. PTT is the tag identification number. DS_DATE is the dive start date and time as dd/mm/yyyy hh:mm:ss. JUL is the julian day of when the dive started. DE_DATE is the dive end date and time as dd/mm/yyyy hh:mm:ss. DIVE_DUR is the time difference between the DS_DATE and the DE_DATE in seconds. SURF_DUR is the post-dive surface duration, calculated as the time difference in seconds between the DE_DATE and the start time of the following dive. MAX_DEP is the maximum diving depth reached during the dive in meters. START_LAT and START_LON are the latitude and longitude location where the dive started, locations are interpolated from the GPS data. END_LAT and END_LON are the latitude and longitude location where the dive ended, locations are interpolated from the GPS data. PERCENT_AREA is the area of the dive used to calculate the TAD (Time-At-Depth) index. It is calculated using the mean dive depth divided by the maximum depth in a dive. T1, T2, …, T22 and T23 are the percentage of the dive duration that has elapsed since the beginning of the dive when a depth record is taken. D1, D2, …, D22 and D23 are the depth bin in meters where the seal was at the corresponding percentage of the dive (Tx). N_DEPTHS is the number of depth recordings that have been taken during the dive. Trip_No is the incremental number of trips done by each individual seal. Posn_in_trip represents the proportion of the time elapsed since the beginning of the trip. Trip_Code is a combination of the PTT and Trip_No, so that all the trips have a unique identification number. Date is the date in which the dive starts as yyyy-mm-dd. Sunrise is the sunrise date and time on the day in which the dive started as yyyy-mm-dd hh:mm:ss. Sunset is the sunset date and time on the day in which the dive started as yyyy-mm-dd hh:mm:ss. Daynight is a binary variable representing whether the dive occurred during the day 1 or night 0 determined from the sunrise and sunset times. 5. Accelerometer data used to calculate the prey catch attempts occurring during each dive (see Fig.3A and Figure S2, S3). Accelerometer data are stored in separate text files for each of the 5 individual seals. Filename = “Accelerometer_data.zip” Thirteen columns = ddate, DATE, X, Y, Z, Xs, Ys, Zs, Xd, Yd, Zd, Gd, Gs. Ddate is the date and time when the accelerometer record was taken, as yyy-mm-dd hh:mm:ss.ms. Date is the date in which the record was taken. DATE is the date in which the record was taken as yyyy/mm/dd. X, Y and Z are the accelerometer reading on the three axes measure in g. The axes represent the surge, sway and heave respectively. Xs, Ys and Zs are the static acceleration on the three axes in g. Xd, Yd and Zd are the dynamic accelation on the three axes in g. Gd is the total dynamic acceleration in g. Gs is the total static acceleration in g. 6. Moray Firth 1x1km grid shapefile used to create the maps of where the seal displayed ARS behaviour during the period of a month (see Fig. 3B). Filelename = “Moray_Firth_1km_grid_shapefile.zip”. The zipped folder containes the .dbf, .prj, .shp and .shx files needed to read the grid in R. 7. Coastline of the UK projected Filename = "Coastline_UTM30.zip" The zipped folder containe the .dbf, .prj, .shp and .shx files of a map of the UK which allows to recreate some of the figures plotted in the manuscript. ### Within the outputs folder 8. Dive data grouped in dive batches to use as input for Model 1. This output is generated by Script 1. Filename = "Dive batches dataset - 2017.txt" Twelve columns = seal_ID, PTT, ID, start.time, end.time, batch.duration, batch.start.lon, batch.start.lat, batch.end.lon, batch.end.lat, x, y. Seal_ID is the seal unique ID number from the Lighthouse Field Station harbour seal photo-ID catalogue. PTT is the tag identification number. ID is a combination of the PTT and unique trip number, so that all the trips have a unique identification number. Start.time is the start time of the dive batch, as the beginning of the first dive of the batch. End.time is the end time of the dive batch, as the end of dive cycle (after the surface perdiod) of the last dive of the batch. Batch.duration is the duration in minutes of the dive batch, as given by the time difference between the start.time and the end.time. Batch.start.lon and batch.start.lat are the latitude and longitude location where the dive batch started, as the beginning of the first dive of the batch (Individuals dive locations are interpolated from the GPS data). Batch.end.lon and batch.end.lat are the latitude and longitude location where the dive batch ends, as the end of the last dive of the batch (Individuals dive locations are interpolated from the GPS data). X and Y are the projected locations onto UTM 30 of the start dive batch location (i.e. batch.start.lon and batch.start.lat) 9. Step length and turning angle initial parameters from the 50 iterations run of Model 1. This output is used to select the best initial parameters for Model 1, using those from the iteration with the lowest AIC. This output is generated by Script 2. Filename = "Model 1 - initial parameters selection output.txt" Eleven columns = iter, s1_mean, s2_mean, s1_sd, s2_sd, s1_zero, s2_zero, s1_angle, s2_angle, AIC, loglik. Iter is the iteration number. S1_mean and S2_mean are the mean step length for state 1 and state 2. S1_sd and S2_sd are the standard deviation of the step length for state 1 and state 2. S1_zero and S2_zero are the zero mass parameters for state 1 and state 2. S1_angle and S2_angle are the angle concentration parameters for state 1 and state 2. AIC is the AIC value of the model run in that iteration. Loglik is the Log-likelihood of the model run in that iteration. 10. Dive batches with Model 1 state classification. This output is generated by Script 2. Filename = "Model 1 - HMM dive batches classified.txt" Seventeen columns = ID, step, angle, seal_ID, PTT, start.time, end.time, batch.duration, batch.start.lon, batch.start.lat, batch.end.lon, batch.end.lat, x, y, flag, HMMstate, state ID is a combination of the PTT and unique trip number, so that all the trips have a unique identification number. Step is the step length of the dive batch in meters. Angle is the turning angle of the dive batch, which is the change in direction between consecutive batches. Seal_ID is the seal unique ID number from the Lighthouse Field Station harbour seal photo-ID catalogue. PTT is the tag identification number. Start.time is the start time of the dive batch, as the beginning of the first dive of the batch. End.time is the end time of the dive batch, as the end of dive cycle (after the surface perdiod) of the last dive of the batch. Batch.duration is the duration in minutes of the dive batch, as given by the time difference between the start.time and the end.time. Batch.start.lon and batch.start.lat are the latitude and longitude location where the dive batch started, as the beginning of the first dive of the batch (Individuals dive locations are interpolated from the GPS data). Batch.end.lon and batch.end.lat are the latitude and longitude location where the dive batch ends, as the end of the last dive of the batch (Individuals dive locations are interpolated from the GPS data). X and Y are the projected locations onto UTM 30 of the start dive batch location (i.e. batch.start.lon and batch.start.lat) Flag is a column highlighting which dive batch are to be considered unreliable (=1) or which ones are to be kept in the analysis (=0). Please see Methods of the paper and Appendix B. HMMstate is the state assigned by the HMM as either state 1 or state 2. state is a categorical version of the HMM version where the state with the shortest step length is called "ARS" and the other state "Transit". 11. Individual memory raster maps with the proportion of dive batches spent in ARS in a 1x1 km grid cells with foraging trips occurring in April. The maps use the dive batches classified as ARS by Model 1. Maps are generated using the Script 4a. Filename = "April memory raster maps" (folder) The folder contains individual raster maps renamed with the seal_ID as .tif files. Thes files can be re-open in R as rasters. 12. Individual memory raster maps with the proportion of dive batches spent in ARS in a 1x1 km grid cells with foraging trips occurring during a month prior to the beginning of the accelerometer data for the five individuals for which the tags were recovered. The maps use the dive batches classifiedas ARS by Model 1. Maps are generated using the Script 4b. Filename = "Accelerometer memory raster maps" (folder) The folder contains individual raster maps renamed with the seal_ID as .tif files. Thes files can be re-open in R as rasters. 13. Step length and turning angle initial parameters from the 50 iterations run of Model 2. This output is used to select the best initial parameters for Model 2, using those from the iteration with the lowest AIC. This output is generated by Script 5. Filename = "Model 2 - initial parameters selection output.txt" Eleven columns = iter, s1_mean, s2_mean, s1_sd, s2_sd, s1_zero, s2_zero, s1_angle, s2_angle, AIC, loglik. Iter is the iteration number. S1_mean and S2_mean are the mean step length for state 1 and state 2. S1_sd and S2_sd are the standard deviation of the step length for state 1 and state 2. S1_zero and S2_zero are the zero mass parameters for state 1 and state 2. S1_angle and S2_angle are the angle concentration parameters for state 1 and state 2. AIC is the AIC value of the model run in that iteration. Loglik is the Log-likelihood of the model run in that iteration. 14. To make the accelerometer data more manageable we have extracted from the larger files in "Accelerometer_data.zip", only those times occurring during foraging trips. This output is generated using Script 6. Filename = "Raw accelerometer data per trip" (folder) - "pv_PTT_TripNo_trip_data.txt" (individual files) Fourteen columns = ddate, DATE, X, Y, Z, Xs, Ys, Zs, Xd, Yd, Zd, Gd, Gs, seconds. Ddate is the date and time when the accelerometer record was taken, as yyy-mm-dd hh:mm:ss. Date is the date in which the record was taken. DATE is the date in which the record was taken as yyyy/mm/dd. X, Y and Z are the accelerometer reading on the three axes measure in g. The axes represent the surge, sway and heave respectively. Xs, Ys and Zs are the static acceleration on the three axes in g. Xd, Yd and Zd are the dynamic accelation on the three axes in g. Gd is the total dynamic acceleration in g. Gs is the total static acceleration in g. Seconds is the date and time when the accelerometer record was taken, as yyy-mm-dd hh:mm:ss.ms. 15. Individual specific axes threshold to be used for the estimation of prey catch attempts (see Cox et al. 2017).This output is generated by Script 7. Filename = "Prey encounters - cluster analysis axis thresholds.txt" Five columns = ID, PTT, ThresholdX, ThresholdY, ThresholdZ ID is the seal unique ID number from the Lighthouse Field Station harbour seal photo-ID catalogue. PTT is the tag identification number. ThresholdX is the dynamic acceleration threshold to be used for the X axis for that individual. ThresholdY is the dynamic acceleration threshold to be used for the Y axis for that individual. ThresholdZ is the dynamic acceleration threshold to be used for the Z axis for that individual. 16. Processed accelerometer parameters by dive for each individuals for all the trips combined. This output is generated with Script 9. Filename = "Processed accelerometer parameters" (folder) - "PTT_processed_accelerometer_parameters.txt" (individual files) Thirty columns = ID, REF, PTT, DS_DATE, JUL, DE_DATE, DIVE_DUR, SURF_DUR, MAX_DEP, START_LAT, START_LON, END_LAT, END_LON, PERCENT_AREA, Trip_No, Posn_in_Trip, Trip_Code, date, sunrise, sunset, daynight, descent_start, bottom_start, ascent_start, TAD, descent.speed, ascent.speed, PrCA, pitch.diff20, overlap The ID is the seal unique ID number from the Lighthouse Field Station harbour seal photo-ID catalogue. REF is the tag deployment reference code. PTT is the tag identification number. DS_DATE is the dive start date and time as dd/mm/yyyy hh:mm:ss. JUL is the julian day of when the dive started. DE_DATE is the dive end date and time as dd/mm/yyyy hh:mm:ss. DIVE_DUR is the time difference between the DS_DATE and the DE_DATE in seconds. SURF_DUR is the post-dive surface duration, calculated as the time difference in seconds between the DE_DATE and the start time of the following dive. MAX_DEP is the maximum diving depth reached during the dive in meters. START_LAT and START_LON are the latitude and longitude location where the dive started, locations are interpolated from the GPS data. END_LAT and END_LON are the latitude and longitude location where the dive ended, locations are interpolated from the GPS data. PERCENT_AREA is the area of the dive used to calculate the TAD (Time-At-Depth) index. It is calculated using the mean dive depth divided by the maximum depth in a dive. Trip_No is the incremental number of trips done by each individual seal. Posn_in_trip represents the proportion of the time elapsed since the beginning of the trip. Trip_Code is a combination of the PTT and Trip_No, so that all the trips have a unique identification number. Date is the date in which the dive starts as yyyy-mm-dd. Sunrise is the sunrise date and time on the day in which the dive started as yyyy-mm-dd hh:mm:ss. Sunset is the sunset date and time on the day in which the dive started as yyyy-mm-dd hh:mm:ss. Daynight is a binary variable representing whether the dive occurred during the day 1 or night 0 determined from the sunrise and sunset times. Descent_start is the start time of the descent phase of the dive which is the same of the DS_DATE as dd/mm/yyyy hh:mm:ss. Bottom_start is the start time of the bottom phase of the dive defined as the time of the first depth record below the 80% of the maximum depth of each dive. Ascent_start is the start time of the ascent phase of the dive defined as the time of the first depth record above the 80% of the maximum depth of each dive. PrCA is the number of Prey Catch Attempts calculated from the dynamic acceleration, for details please see Methods. Pitch.diff.20 is the number of catch attempts calculated from the difference in body pitch angle, for details please see Methods. overlap is the number of attempts identified by the two methods that occurred at the same time. 17. Dive data grouped in dive batches with summarised accelerometer data to use as input for Model 3. This output is generated by Script 10. Filename = "Dive batches dataset - Accelerometer.txt" Twenty-one columns = seal_ID, PTT, trip.N, ID, start.time, ID, start.time, end.time, batch.duration_mins, batch.dive.dur_secs, batch.surface.dur_secs, batch.max.depth, batch.pos.trip.start, batch.pos.trip.end, batch.PrCA, batch.benthic, batch.foraging.index, batch.start.lat, batch.start.lon, batch.end.lon, batch,end.lat, x, y. Seal_ID is the seal unique ID number from the Lighthouse Field Station harbour seal photo-ID catalogue. PTT is the tag identification number. Trip.N ID is a combination of the PTT and unique trip number, so that all the trips have a unique identification number. Start.time is the start time of the dive batch, as the beginning of the first dive of the batch. End.time is the end time of the dive batch, as the end of dive cycle (after the surface perdiod) of the last dive of the batch. Batch.duration_mins is the duration in minutes of the dive batch, as given by the time difference between the start.time and the end.time. Batch.dive.dur_secs is the mean dive duration in seconds of the dives in the dive batch. Batch.surface.dur_secs is the mean surface duration in seconds of the dives in the dive batch. Batch.max.depth is the mean maximum depth in meters of the dives in the dive batch. Batch.pos.trip.start is the proportion of the time elapsed since the beginning of the trip at the beginning of the dive batch. Batch.pos.trip.end is the proportion of the time elapsed since the beginning of the trip at the end of the dive batch. Batch.PrCA is the mean prey catch attempts from the dynamic acceleration of the dives in the dive batch. Batch.benthic is the mean prey catch attempts from the changes in body pitch angle of the dives in the dive batch. Batch.foraging.index is the foraging index of the dives in the dive batch. The foraging index is calculated for each dive as the sum of the PrCA and the benthic attempts minus any overlap. Batch.start.lon and batch.start.lat are the latitude and longitude location where the dive batch started, as the beginning of the first dive of the batch (Individuals dive locations are interpolated from the GPS data). Batch.end.lon and batch.end.lat are the latitude and longitude location where the dive batch ends, as the end of the last dive of the batch (Individuals dive locations are interpolated from the GPS data). X and Y are the projected locations onto UTM 30 of the start dive batch location (i.e. batch.start.lon and batch.start.lat) 18. Step length and turning angle initial parameters from the 50 iterations run of Model 3. This output is used to select the best initial parameters for Model 3, using those from the iteration with the lowest AIC. This output is generated by Script 11. Filename = "Model 3 - initial parameters selection output.txt" Eleven columns = iter, s1_mean, s2_mean, s1_sd, s2_sd, s1_zero, s2_zero, s1_angle, s2_angle, AIC, loglik. Iter is the iteration number. S1_mean and S2_mean are the mean step length for state 1 and state 2. S1_sd and S2_sd are the standard deviation of the step length for state 1 and state 2. S1_zero and S2_zero are the zero mass parameters for state 1 and state 2. S1_angle and S2_angle are the angle concentration parameters for state 1 and state 2. AIC is the AIC value of the model run in that iteration. Loglik is the Log-likelihood of the model run in that iteration.