Skip to content

Commit

Permalink
Merge pull request #117 from weecology/colony-updates
Browse files Browse the repository at this point in the history
Redefine Hidden colony [minor]
Rename colonies in counts and nests
Also correct Paurotis Pond
Update shapefiles
  • Loading branch information
gmyenni authored Mar 1, 2024
2 parents a7761b9 + 5fa0626 commit 1ff510c
Show file tree
Hide file tree
Showing 14 changed files with 5,074 additions and 5,064 deletions.
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

0 comments on commit 1ff510c

Please sign in to comment.