-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.Rmd
96 lines (69 loc) · 2.36 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
---
output: github_document
editor_options:
chunk_output_type: console
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
# animal-tracks
The goal of animal-tracks is to provide some animal tracks data sets in ready to use data frame form.
Create ellie and walrus from existing R packages.
```{r,eval=FALSE}
## bsam package
## two (id) elephant seals in data frame (id, date, lc, lon, lat)
ellie <- bsam::ellie
## trip package
## several (Deployment) walrus tracks (X_AED170_70 Y_AED170_70, DataDT)
trip::walrus818
library(trip)
walrus <- tibble::as_tibble(as.data.frame(walrus818))
saveRDS(ellie, "ellie.rds")
saveRDS(walrus, "walrus.rds")
```
The ellie_IMOS data set was obtained from IMOS, see ref.
```{r,eval=FALSE}
## IMOS elephant seal data, used in Jonsen et al. 2018 doi:https://doi.org/10.1101/314690
## 24 (id) seals in data frame (id, date, lc, lon, lat, trip)
## `trip` denotes an ice-bound or pelagic foraging trip, all originating from Isles Kerguelen
ellie_IMOS <- tibble::as_tibble(readRDS("ellie_IMOS.RDS"))
```
## KML
The `ellie_IMOS` data set is in KML form in this subfolder "/kml/".
## SST
There is a reduced resolution OISST data set matching the ellie_IMOS tracks
in sst/. This is 5-day sampled from 1-day, and reduced to 0.5 degree resolution from 0.25.
```{r, eval = FALSE}
library(raster)
sst <- readRDS("sst/ellie-sst.rds")
## beware, 100Mb of expanded raster here
## turn into data.frame with lon, lat, and date (dimindex)
library(tabularaster)
library(dplyr)
tabularaster::as_tibble(sst, cell = FALSE, xy = TRUE) %>%
dplyr::filter(!is.na(cellvalue)) %>%
dplyr::rename(sst = cellvalue, date = dimindex)
# A tibble: 3,315,200 x 4
# sst date x y
# <dbl> <dttm> <dbl> <dbl>
# 1 11.8 2013-02-14 19:43:56 -1.5 -42.8
# 2 11.8 2013-02-14 19:43:56 -1 -42.8
# 3 11.9 2013-02-14 19:43:56 -0.5 -42.8
# 4 12.1 2013-02-14 19:43:56 0 -42.8
# 5 12.2 2013-02-14 19:43:56 0.5 -42.8
# ...
```
## ICE
NSIDC 25km ice concentration reduced to ~100km contours of the 15% concentration daily for the ellie_IMOS data.
```{r,eval=TRUE}
library(sf)
ice_cont <- readRDS("ice/ellie-ice-contour15pc.rds")
plot(ice_cont$geometry, col = rgb(0, 0, 0, 0.05))
axis(1)
axis(2)
range(ice_cont$date)
```