Skip to contents

Get data for cpod projects, with options to filter results.

Usage

get_cpod_projects(connection = con, cpod_project_code = NULL)

Arguments

connection

A connection to the ETN database. Defaults to con.

cpod_project_code

Character (vector). One or more cpod project codes. Case-insensitive.

Value

A tibble with animal project data, sorted by project_code. See also field definitions.

Examples

# Set default connection variable
con <- connect_to_etn()

# Get all animal projects
get_cpod_projects(con)
#> # A tibble: 8 × 11
#>   projec…¹ proje…² proje…³ telem…⁴ proje…⁵ start_date end_date   latit…⁶ longi…⁷
#>      <int> <chr>   <chr>   <chr>   <chr>   <date>     <date>       <dbl>   <dbl>
#> 1      880 Apelaf… cpod    NA      Apelaf… 2021-01-01 2023-12-31    NA     NA   
#> 2      973 Apelaf… cpod    NA      Acoust… 2021-01-01 2023-12-31    NA     NA   
#> 3      948 PhD_Pa… cpod    NA      PhD_Pa… 2021-03-09 NA            NA     NA   
#> 4      902 SMGMIT  cpod    Acoust… SeaMon… 2019-04-10 2022-12-31    54.5   -9.46
#> 5      838 VLIZ-M… cpod    NA      VLIZ-M… NA         NA            NA     NA   
#> 6      839 VLIZ-M… cpod    NA      VLIZ-M… NA         NA            NA     NA   
#> 7      638 cpod-l… cpod    NA      Lifewa… 2015-06-01 NA            NA     NA   
#> 8      639 cpod-o… cpod    NA      WinMon… 2010-01-01 NA            NA     NA   
#> # … with 2 more variables: moratorium <chr>, imis_dataset_id <int>, and
#> #   abbreviated variable names ¹​project_id, ²​project_code, ³​project_type,
#> #   ⁴​telemetry_type, ⁵​project_name, ⁶​latitude, ⁷​longitude

# Get a specific animal project
get_cpod_projects(con, cpod_project_code = "cpod-lifewatch")
#> # A tibble: 1 × 11
#>   projec…¹ proje…² proje…³ telem…⁴ proje…⁵ start_date end_date latitude longit…⁶
#>      <int> <chr>   <chr>   <chr>   <chr>   <date>     <date>      <dbl>    <dbl>
#> 1      638 cpod-l… cpod    NA      Lifewa… 2015-06-01 NA             NA       NA
#> # … with 2 more variables: moratorium <chr>, imis_dataset_id <int>, and
#> #   abbreviated variable names ¹​project_id, ²​project_code, ³​project_type,
#> #   ⁴​telemetry_type, ⁵​project_name, ⁶​longitude