-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.Rmd
196 lines (141 loc) · 5.92 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures",
out.width = "100%"
)
```
# otndo
<!-- badges: start -->
[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/otndo)
[![R-CMD-check](https://github.com/mhpob/otndo/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/mhpob/otndo/actions/workflows/R-CMD-check.yaml)
[![otndo status badge](https://mhpob.r-universe.dev/badges/otndo)](https://mhpob.r-universe.dev/otndo)
[![codecov](https://codecov.io/gh/mhpob/otndo/graph/badge.svg?token=A4JRJT7CFA)](https://codecov.io/gh/mhpob/otndo)
<!-- badges: end -->
*entiendo* /ˌenˈtjendo/ [ˌẽn̪ˈt̪jẽn̪.̪o]\
Spanish, 1st person indicative; "*I understand*"
***otndo*** /ˌoʊˈtjendo/ [ˌoʊ̪ˈt̪jẽn̪.d̪o]\
English, bad pun; "*I understand (OTN data)*"
The purpose of `otndo` is to provide a high-level summary of your acoustic telemetry transmitter matches from the Ocean Tracking Network, all while putting the "network" back in "tracking network" by noting the related projects and investigators.
## Installation
You can install the most-up-to-date version from [R-universe](https://mhpob.r-universe.dev/otndo) or [GitHub](https://github.com/mhpob/otndo).
R-universe:
```{r eval=FALSE}
install.packages(
"otndo",
repos = c(
"https://mhpob.r-universe.dev",
"https://cloud.r-project.org"
)
)
```
GitHub:
```{r eval=FALSE}
# install.packages("remotes")
remotes::install_github("mhpob/otndo")
```
## Tag push summary example
This is a basic example of how you might use `otndo` to summarize your transmitter data:
```{r tag_push, eval=FALSE}
# Download some example data
td <- file.path(tempdir(), "otndo_test_files")
dir.create(td)
download.file(
paste0(
"https://members.oceantrack.org/data/repository/pbsm/detection-extracts/",
"pbsm_matched_detections_2018.zip/@@download/file"
),
destfile = file.path(td, "pbsm_matched_detections_2018.zip"),
mode = "wb"
)
unzip(file.path(td, "pbsm_matched_detections_2018.zip"),
exdir = td
)
# Make a tag push summary
library(otndo)
make_tag_push_summary(
matched = file.path(td, "pbsm_matched_detections_2018.csv")
)
```
You will get a report in your working directory with a few goodies!
A summary of the number of matched individuals and detections by researcher and project:
![](man/figures/readme-tag_t1_detection_table.png)
The overall extent of the projects to which your tags have been matched:
![](man/figures/README-tag_f1_geographic_extent.png)
When your fish were heard in each project:
![](man/figures/README-tag_f2_time.png)
The ever-ubiquitous "abacus plot", showing when each tag was heard, colored by project:
![](man/figures/README-tag_f3_abacus.png)
An interactive map showing detections by receiver:
![](man/figures/README-tag_f4_leaflet.png)
A general estimate of the number of transmitters that were active at a given date:
![](man/figures/README-tag_f5_transmitter_loss.png)
## Receiver push summary example
This is a basic example of how you might use `otndo` to summarize your receiver data:
```{r rec_push, eval=FALSE}
# Download some example data
## Deployment metadata
download.file(
paste0(
"https://members.oceantrack.org/data/repository/pbsm/data-and-metadata/",
"archived-records/2018/pbsm-instrument-deployment-short-form-2018.xls/@@download/file"
),
destfile = file.path(td, "pbsm-instrument-deployment-short-form-2018.xls"),
mode = "wb"
)
## Qualified detections
download.file(
paste0(
"https://members.oceantrack.org/data/repository/pbsm/detection-extracts/",
"pbsm_qualified_detections_2018.zip/@@download/file"
),
destfile = file.path(td, "pbsm_qualified_detections_2018.zip")
)
unzip(file.path(td, "pbsm_qualified_detections_2018.zip"),
exdir = td
)
## Unqualified detections
download.file(
paste0(
"https://members.oceantrack.org/data/repository/pbsm/detection-extracts/",
"pbsm_unqualified_detections_2018.zip/@@download/file"
),
destfile = file.path(td, "pbsm_unqualified_detections_2018.zip")
)
unzip(file.path(td, "pbsm_unqualified_detections_2018.zip"),
exdir = td
)
# Make a receiver push summary
make_receiver_push_summary(
qualified = file.path(td, "pbsm_qualified_detections_2018.csv"),
unqualified = file.path(td, "pbsm_unqualified_detections_2018.csv"),
deployment = file.path(td, "pbsm-instrument-deployment-short-form-2018.xls")
)
```
A summary of the number of matched individuals and detections by researcher and project:
![](man/figures/README-rec_t1.png)
The overall extent of the projects associated with the tags your receivers have heard:
![](man/figures/README-rec_f1.png)
When your receivers heard each project's fish:
![](man/figures/README-rec_f2.png)
A Gantt chart of your receivers' deployments:
![](man/figures/README-rec_f3.png)
The number of detections and individuals per receiver:
![](man/figures/README-rec_t2.png)
An interactive map showing detections by receiver:
![](man/figures/README-rec_f4.png)
A summary of your unmatched detections, including those that are likely false...
![](man/figures/README-rec_t3.png)
...and those that may be real!
![](man/figures/README-rec_t4.png)
A summary of when the unmatched detections occurred, by receiver:
![](man/figures/README-rec_f6.png)
## Getting in contact
If something doesn't work the way it should or if you just need a little help, feel free to [open an issue on GitHub](https://github.com/mhpob/otndo/issues) or [email me (Mike O'Brien: [email protected]) directly](mailto:[email protected]).