Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redefine Hidden colony [minor] #117

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7,642 changes: 3,821 additions & 3,821 deletions Counts/maxcounts.csv

Large diffs are not rendered by default.

13 changes: 10 additions & 3 deletions DataCleaningScripts/clean_nest_checks.R
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,16 @@ for(i in 1:length(tab_names)) {
"missed pulled","couldn’t check","too high","can't see","miss","n/a",
"c(\"n/a\", \"n/a\")","flagging gone","missed, no record","flag not found","missing",
"c(na, \"empty\")","couldn't find","flag on ground"), NA)) %>%
dplyr::mutate(date = as.Date(date),
eggs = as.character(eggs),
chicks = as.character(chicks)) %>%
dplyr::mutate(dplyr::across(everything(),~ purrr:map_chr(.x, ~ gsub("\"", "", .x)))) %>%
dplyr::mutate(year = as.integer(year),
colony = as.character(colony),
nest = as.character(nest),
species = as.character(species),
date = lubridate::ymd(date),
eggs = as.integer(eggs),
chicks = as.integer(chicks),
stage = as.character(stage),
notes = as.character(notes)) %>%
dplyr::select(year, colony, nest, species, date, eggs, chicks, stage, notes)

if(!all(new_data$colony %in% colonies$colony)|
Expand Down
8 changes: 4 additions & 4 deletions DataCleaningScripts/get_counts.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ species <- read.csv("SiteandMethods/species_list.csv")
counts <- read.csv("Counts/maxcounts.csv")
under40 <- read.csv("Counts/maxcounts_under40.csv")




colonies$aka[which(colonies$colony=="hidden")] = "Hidden North, L-28, Hidden, L-28 Hidden, 58, 163"
counts$group_id[which(counts$colony=="58")] = 57
counts$colony[which(counts$colony=="58")] = "hidden"

colonies <- colonies %>% dplyr::arrange(colony)
write.table(colonies, "SiteandMethods/colonies.csv", row.names = FALSE, col.names = TRUE,
na = "", sep = ",", quote = c(7,8))

counts <- counts %>% dplyr::arrange()
counts <- counts %>% dplyr::arrange(colony,year)
write.table(counts, "Counts/maxcounts.csv", row.names = FALSE, na = "", sep = ",", quote = 9)

under40 <- under40 %>% dplyr::arrange()
Expand Down
11 changes: 8 additions & 3 deletions DataCleaningScripts/old_nest_checks.R
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,15 @@ nests <- dplyr::bind_rows(old_data,nests) %>%
dplyr::filter_at(.vars = dplyr::vars(eggs, chicks, stage, notes),
.vars_predicate = dplyr::any_vars(!is.na(.)))

write.csv(nests, "Nesting/nest_checks.csv", row.names = FALSE, na = "", quote = 9)
nests <- nests %>%
dplyr::mutate(dplyr::across(c(colony,nest,species,stage,notes),as.character),
dplyr::across(c(year,eggs,chicks),as.integer),
date = lubridate::ymd(date))
write.table(nests, "Nesting/nest_checks.csv", row.names = FALSE, na = "", sep = ",", quote = 9)

species <- species %>% dplyr::arrange(species)
write.csv(species, "SiteandMethods/species_list.csv", row.names = FALSE, na = "", quote = 5:25)
write.table(species, "SiteandMethods/species_list.csv", row.names = FALSE, na = "", sep = ",", quote = 5:25)

colonies <- colonies %>% dplyr::arrange(colony)
write.csv(colonies, "SiteandMethods/colonies.csv", row.names = FALSE, na = "", quote = FALSE)
write.table(colonies, "SiteandMethods/colonies.csv", row.names = FALSE, col.names = TRUE,
na = "", sep = ",", quote = c(7,8))
Loading