A targets workflow for processing animal relocation data for the WEEL.

library(targets)
library(printr)
library(data.table)

Input

Note: this workflow only processes files if it finds them at the specified path in metadata. This means you can add a row describing your own input data to metadata() and use the workflow, without needing all other datasets present on your computer.

tar_read(meta)

Output

All outputs can be directly read with data.table::fread and the datetime column will be automatically converted to POSIXct in UTC timezone.

Files

tar_read(exports)

Column names

| Column name | Description | | ----------- | ----------- | | id | unique animal identifier | | datetime | date time in UTC | | doy | day of year, integer. see data.table::yday() | | mnth | month, integer. see data.table::month() | | yr | year, integer. see data.table::year() | | x_long | longitude, EPSG code provided in metadata(). see R/metadata.R | | y_lat | latitude, EPSG code provided in metadata(). see R/metadata.R | | x_proj | projected x coordinate, output EPSG code in metadata(). see R/metadata.R |
| y_proj | projected y coordinate, output EPSG code in metadata(). see R/metadata.R |
| epsg_proj | output EPSG of 'x_proj' and 'y_proj' as set in metadata(). | | [extracols] | Extras specified in metadata(). Eg. HERD. On output, column names are transformed to snake_case (eg. from 'HERD' to 'herd' or 'COLLAR ID' to 'collar_id')

In target "checkflags", the column named "flag" is a semi-colon separated list of flags indicating why locs are dropped and set to NaN. After target "filters", locs with NaN are dropped.

Flag counts

tar_read(checkflags)[order(name, -N)]

TODO

Etc

Screening GPS fixes:



robitalec/prepare-locs documentation built on Jan. 30, 2024, 9:45 a.m.