Skip to content

Commit

Permalink
r: update narwc export
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwalkernoaa committed Sep 25, 2024
1 parent 8495b19 commit 1dbd905
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
31 changes: 31 additions & 0 deletions r/notes/20240925-export-narwc.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
source("_targets.R")

tar_load(pacm_themes)

themes <- pacm_themes %>%
filter(
theme %in% c("narw")
)

deployments <- themes %>%
select(theme, deployments) %>%
unnest(deployments) %>%
# filter(deployment_type == "stationary") %>%
select(-geometry) %>%
ungroup() %>%
select(-theme)
detections <- themes %>%
select(theme, detections) %>%
unnest(detections) %>%
ungroup() %>%
select(id, date, presence) %>%
semi_join(deployments, by = "id")

detections %>%
tabyl(presence)

deployments %>%
write_csv("~/Dropbox/Work/pacm/transfers/20240925 - narw for narwc/deployments.csv", na = "")

detections %>%
write_csv("~/Dropbox/Work/pacm/transfers/20240925 - narw for narwc/detections.csv", na = "")

0 comments on commit 1dbd905

Please sign in to comment.