#### Draft Scientific Document

This document is under active development and subject to significant change at any time. Please do not cite or use the information in any form without contacting the author(s) for additional details.

# Satellite Telemetry Dataset (raw): bearded and spotted seals in 2004-2006, Kotzebue, Alaska

## Get Data from the Wildlife Computers Data Portal

### Josh M. London , Michael F. Cameron , Peter L. Boveng

- 1. Alaska Fisheries Science Center, NOAA Fisheries, Seattle, Washington, USA
     josh.london@noaa.gov
     http://orcid.org/0000-0002-3647-5046
  2. Alaska Fisheries Science Center, NOAA Fisheries, Seattle, Washington, USA

### Abstract

This document describes the process for downloading raw telemetry data from the Wildlife Computers (https://wildlifecomputers.com/) Data Portal via their API. The data are provided as zipped archives for each deployment and are preserved as is. The data files and associated metadata files are intended for publication on the DataOne network and the entire data package will be given a unique Digital Object Identifier.

# Connect to the Data Portal

Wildlife Computers (Redmond, Washington, USA) provides an API for their data portal that allows us to download the latest telemetry data for any deployment. To facilitate connection and use of this API within R, the `wcUtils` package has been developed.

The data portal is not a public repository. Data access is controlled by the data owner. Thus, only those users who are either owners of the deployment data or users who have been granted access by the owner can access the API.

The `wcUtils` package is available for install from GitHub:

    if (!require('devtools')) install.packages('devtools')
    if (!require('wcUtils')) {
      devtools::install_github('jmlondon/wcUtils')
    }
    if (!require('tidyverse')) install.packages('tidyverse')

# Download KotzEB04 Telemetry

All of the deployments have been labeled within the data portal as ProjectID = KotzEB04. We will use that information to only download the relevant data.

    # first thing, get deployment data from WCDP
    r <- wcUtils::wcPOST()
    # get KotzEB09 ids and download the data
    kotz_ids <- wcUtils::wcGetProjectIDs(r,project = 'KotzEB04')

    for (i in 1:length(kotz_ids)) {
      zipfile <- wcUtils::wcGetZip(id = kotz_ids[i])
      file.copy(zipfile,'.',overwrite = TRUE)
      file.rename(file.path(basename(zipfile)),
                  file.path(paste(kotz_ids[i],"zip",sep = '.'))
      )
    }

The zip files downloaded from the data portal are named based on the unique id assigned within the data portal. For our deployments, we have assigned each a unique `DeployID`. It would be more informative if we could rename all of these zip files to the assigned `DeployID`. Eventually, this functionality could be implemented within the `wcUtils` package and the API, but for now, we’ll just open each zip file and examine the data files to extract the assigned `DeployID`.

    df <- tibble::as_tibble()
    for (zipfile in list.files(pattern = ".zip",full.names = TRUE)) {
      summary_name <- grep('*-Summary.csv',
                          unzip(file.path(
                                          basename(zipfile)),
                                list = TRUE)$Name,
                           value = TRUE)
      deployid <- read.csv(unzip(zipfile, files = summary_name))$DeployID
      deployid <- as.character(deployid)
      ptt <- read.csv(unzip(zipfile, files = summary_name))$Ptt
      ptt <- as.character(ptt)
      instr <- read.csv(unzip(zipfile, files = summary_name))$Instr
      instr <- as.character(instr)
      first_tx <- read.csv(unzip(zipfile, files = summary_name))$LatestXmitTime
      first_tx <- as.character(first_tx)
      last_tx <- read.csv(unzip(zipfile, files = summary_name))$LatestXmitTime
      last_tx <- as.character(last_tx)
      ndays_tx <- read.csv(unzip(zipfile, files = summary_name))$XmitDays
      ndays_tx <- as.character(ndays_tx)

      file.remove(summary_name)
      file.rename(file.path(zipfile),
                  file.path(paste(deployid,"zip",sep = '.'))
      )

      df <- df %>% dplyr::bind_rows(list(filename = paste(deployid,"zip",sep = '.'),
                     instrument = instr,
                     "Ptt ID" = ptt,
                     "first transmission" = first_tx,
                     "last transmission" = last_tx,
                     "no. days" = ndays_tx
                     ))
    }

## List of Archive Files

    df %>% knitr::kable(booktabs = TRUE,
      caption = 'Files and Associated Key Deployment Statistics')

Table 1: Files and Associated Key Deployment Statistics
filename | instrument | Ptt ID | first transmission | last transmission | no. days
--- | --- | --- | --- | --- | ---
EB2005_5950_04L0168.zip | Splash | 59974 | 10:29:09 22-Feb-2006 | 10:29:09 22-Feb-2006 | 249
EB2004_5972_04L0016.zip | Splash | 53604 | 04:02:47 01-Feb-2005 | 04:02:47 01-Feb-2005 | 118
EB2004_5973_04L0035.zip | Splash | 53605 | 16:16:54 01-Dec-2004 | 16:16:54 01-Dec-2004 | 50
EB2005_5970_04L0040.zip | Splash | 53606 | 13:40:01 01-Apr-2006 | 13:40:01 01-Apr-2006 | 527
EB2005_5952_04L0041.zip | Splash | 53607 | 19:26:01 07-Feb-2006 | 19:26:01 07-Feb-2006 | 189
EB2005_5954_04L0043.zip | Splash | 53608 | 01:08:56 26-Nov-2005 | 01:08:56 26-Nov-2005 | 115
EB2005_6020_04L0044.zip | Splash | 53609 | 12:52:02 04-Jun-2006 | 12:52:02 04-Jun-2006 | 587
EB2006_5941_SN10466.zip | SPOT | 70414 | 23:06:14 12-Oct-2006 | 23:06:14 12-Oct-2006 | 36
EB2006_5944_SN10472.zip | Mk10 | 70415 | 23:10:08 26-Oct-2006 | 23:10:08 26-Oct-2006 | 50
EB2006_5942_SN10473.zip | Mk10 | 70416 | 22:40:13 18-Dec-2006 | 22:40:13 18-Dec-2006 | 103
EB2006_5943_SN10474.zip | Mk10 | 70417 | 00:41:16 31-Dec-2006 | 00:41:16 31-Dec-2006 | 115
EB2006_5940_SN10465.zip | UT | 70413 | 19:37:48 09-Oct-2006 | 19:37:48 09-Oct-2006 | 33
EB2005_5965_04L0161.zip | Splash | 59967 | 22:37:44 13-Oct-2005 | 22:37:44 13-Oct-2005 | 2
EB2005_5963_04L0163.zip | Splash | 59969 | 14:44:56 18-Nov-2005 | 14:44:56 18-Nov-2005 | 41
PL2005_5966_05L0002.zip | Splash | 57999 | 12:46:04 21-May-2006 | 12:46:04 21-May-2006 | 238
PL2005_5968_05L0005.zip | Splash | 58002 | 13:48:40 23-Dec-2005 | 13:48:40 23-Dec-2005 | 59
PL2005_5967_05L0026.zip | Splash | 58001 | 03:23:48 16-Dec-2005 | 03:23:48 16-Dec-2005 | 81
PL2005_5971_05L0017.zip | Splash | 58014 | 00:32:26 30-Mar-2006 | 00:32:26 30-Mar-2006 | 181
EB2006_5945_05L0097.zip | Splash | 58059 | 11:05:08 03-May-2007 | 11:05:08 03-May-2007 | 208
EB2006_5946_05L0098.zip | Splash | 58060 | 12:23:15 18-Jan-2007 | 12:23:15 18-Jan-2007 | 88
EB2005_5958_04L0164.zip | Splash | 59970 | 05:34:51 20-Apr-2006 | 05:34:51 20-Apr-2006 | 198
EB2005_5957_04L0047.zip | Splash | 53611 | 01:24:27 15-Jan-2006 | 01:24:27 15-Jan-2006 | 104
EB2005_5956_04L0165.zip | Splash | 59971 | 17:43:01 27-Dec-2005 | 17:43:01 27-Dec-2005 | 86
EB2005_5959_04L0166.zip | Splash | 59972 | 05:56:04 29-Mar-2006 | 05:56:04 29-Mar-2006 | 175
EB2005_5960_04L0167.zip | Splash | 59973 | 11:13:12 07-Jan-2006 | 11:13:12 07-Jan-2006 | 91
EB2005_5962_04L0162.zip | Splash | 59968 | 01:25:32 04-May-2006 | 01:25:32 04-May-2006 | 208
EB2005_6021_04L0046.zip | Splash | 53610 | 04:56:01 30-Apr-2006 | 04:56:01 30-Apr-2006 | 210
EB2005_5964_04L0170.zip | Splash | 59976 | 08:09:07 02-Feb-2006 | 08:09:07 02-Feb-2006 | 117
EB2006_5939_05L0107.zip | Splash | 58069 | 09:54:21 25-May-2007 | 09:54:21 25-May-2007 | 234
EB2006_5947_05L0258.zip | Splash | 65914 | 02:38:42 21-Dec-2006 | 02:38:42 21-Dec-2006 | 61
EB2004_5972_04L0016.zip | Splash | 53604 | 04:02:47 01-Feb-2005 | 04:02:47 01-Feb-2005 | 118
EB2004_5973_04L0035.zip | Splash | 53605 | 16:16:54 01-Dec-2004 | 16:16:54 01-Dec-2004 | 50
EB2005_5950_04L0168.zip | Splash | 59974 | 10:29:09 22-Feb-2006 | 10:29:09 22-Feb-2006 | 249
EB2005_5952_04L0041.zip | Splash | 53607 | 19:26:01 07-Feb-2006 | 19:26:01 07-Feb-2006 | 189
EB2005_5954_04L0043.zip | Splash | 53608 | 01:08:56 26-Nov-2005 | 01:08:56 26-Nov-2005 | 115
EB2005_5956_04L0165.zip | Splash | 59971 | 17:43:01 27-Dec-2005 | 17:43:01 27-Dec-2005 | 86
EB2005_5957_04L0047.zip | Splash | 53611 | 01:24:27 15-Jan-2006 | 01:24:27 15-Jan-2006 | 104
EB2005_5958_04L0164.zip | Splash | 59970 | 05:34:51 20-Apr-2006 | 05:34:51 20-Apr-2006 | 198
EB2005_5959_04L0166.zip | Splash | 59972 | 05:56:04 29-Mar-2006 | 05:56:04 29-Mar-2006 | 175
EB2005_5960_04L0167.zip | Splash | 59973 | 11:13:12 07-Jan-2006 | 11:13:12 07-Jan-2006 | 91
EB2005_5962_04L0162.zip | Splash | 59968 | 01:25:32 04-May-2006 | 01:25:32 04-May-2006 | 208
EB2005_5963_04L0163.zip | Splash | 59969 | 14:44:56 18-Nov-2005 | 14:44:56 18-Nov-2005 | 41
EB2005_5964_04L0170.zip | Splash | 59976 | 08:09:07 02-Feb-2006 | 08:09:07 02-Feb-2006 | 117
EB2005_5965_04L0161.zip | Splash | 59967 | 22:37:44 13-Oct-2005 | 22:37:44 13-Oct-2005 | 2
EB2005_5970_04L0040.zip | Splash | 53606 | 13:40:01 01-Apr-2006 | 13:40:01 01-Apr-2006 | 527
EB2005_6020_04L0044.zip | Splash | 53609 | 12:52:02 04-Jun-2006 | 12:52:02 04-Jun-2006 | 587
EB2005_6021_04L0046.zip | Splash | 53610 | 04:56:01 30-Apr-2006 | 04:56:01 30-Apr-2006 | 210
EB2006_5939_05L0107.zip | Splash | 58069 | 09:54:21 25-May-2007 | 09:54:21 25-May-2007 | 234
EB2006_5940_SN10465.zip | UT | 70413 | 19:37:48 09-Oct-2006 | 19:37:48 09-Oct-2006 | 33
EB2006_5941_SN10466.zip | SPOT | 70414 | 23:06:14 12-Oct-2006 | 23:06:14 12-Oct-2006 | 36
EB2006_5942_SN10473.zip | Mk10 | 70416 | 22:40:13 18-Dec-2006 | 22:40:13 18-Dec-2006 | 103
EB2006_5943_SN10474.zip | Mk10 | 70417 | 00:41:16 31-Dec-2006 | 00:41:16 31-Dec-2006 | 115
EB2006_5944_SN10472.zip | Mk10 | 70415 | 23:10:08 26-Oct-2006 | 23:10:08 26-Oct-2006 | 50
EB2006_5945_05L0097.zip | Splash | 58059 | 11:05:08 03-May-2007 | 11:05:08 03-May-2007 | 208
EB2006_5946_05L0098.zip | Splash | 58060 | 12:23:15 18-Jan-2007 | 12:23:15 18-Jan-2007 | 88
EB2006_5947_05L0258.zip | Splash | 65914 | 02:38:42 21-Dec-2006 | 02:38:42 21-Dec-2006 | 61
PL2005_5966_05L0002.zip | Splash | 57999 | 12:46:04 21-May-2006 | 12:46:04 21-May-2006 | 238
PL2005_5967_05L0026.zip | Splash | 58001 | 03:23:48 16-Dec-2005 | 03:23:48 16-Dec-2005 | 81
PL2005_5968_05L0005.zip | Splash | 58002 | 13:48:40 23-Dec-2005 | 13:48:40 23-Dec-2005 | 59
PL2005_5971_05L0017.zip | Splash | 58014 | 00:32:26 30-Mar-2006 | 00:32:26 30-Mar-2006 | 181