-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathspreadsheet_to_movebank.Rmd
More file actions
55 lines (40 loc) 路 1.2 KB
/
Copy pathspreadsheet_to_movebank.Rmd
File metadata and controls
55 lines (40 loc) 路 1.2 KB
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
---
title: "Prepare reference data for Movebank upload"
author: "Sanne Govaert"
date: "`r Sys.Date()`"
output:
html_document
---
This script prepares reference data maintained in a **Google Spreadsheet** for upload to [Movebank](https://www.movebank.org/). It supports the manufacturers:
- [Ornitela](https://www.ornitela.com/)
- [Interrex](http://interrex-tracking.com/)
- [Druid](https://druid.tech/)
- [Global Messenger](https://www.gm-tracking.com/)
The GPS data are expected to be automatically synced with Movebank.
```{r setup, include = FALSE}
knitr::opts_chunk$set(echo = TRUE, warning = FALSE, message = FALSE)
```
Load libraries:
```{r}
library(tidyverse)
library(here)
library(readr)
library(purrr)
```
Set user-defined values:
```{r}
project_id <- "BOP_RODENT"
```
Load custom functions to read and map the spreadsheet to Movebank reference data:
```{r}
source(here::here("src", "functions", "get_reference_data.R"))
```
## Get reference data
Get reference data and map to Movebank format:
```{r}
movebank_ref_data <- get_reference_data(project_id)
```
Save to CSV:
```{r}
readr::write_csv(movebank_ref_data, file = here::here("data", "processed", project_id, "movebank_ref_data.csv"), na = "")
```