Skip to content

Commit

Permalink
updated renv. added 2024/24 data. updated samplingProtocol to manuscr…
Browse files Browse the repository at this point in the history
…ipt doi
  • Loading branch information
smwoodman committed Aug 19, 2024
1 parent ca56b45 commit e7c2e8d
Show file tree
Hide file tree
Showing 7 changed files with 1,528 additions and 529 deletions.
5 changes: 1 addition & 4 deletions R/data_to_dwca.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ event <- bind_rows(event1, event2) %>%
continent = "Antarctica",
countryCode = "AQ",
geodeticDatum = "EPSG:4326",
samplingProtocol = paste(
"The count of a given species, age class, and sex",
"made at the given locality by a trained observer ",
"using binoculars during the specified sampling event.")
samplingProtocol = "https://doi.org/10.1038/s41597-024-03744-9"
) %>%
arrange(eventDate, eventID) %>%
# fields that cannot be mapped to Darwin Core
Expand Down
16 changes: 8 additions & 8 deletions R/manuscript_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,27 @@ cs.header.orig <- tbl(con, "vCensus_Phocid_Header") %>%
mutate(season_idx = seq_along(census_date_start),
header_id = census_phocid_header_id) %>%
ungroup() %>%
# # TODO: temporary to avoid including 2023/24 data for manuscript
# filter(census_date_start < as.Date("2023-07-01"))
select(header_id, census_phocid_header_id, season_name,
census_date_start, census_date_end, census_days,
surveyed_pst, research_program) %>%
# TODO: temporary to avoid including 2023/24 data for manuscript
filter(census_date_start < as.Date("2023-07-01"))
surveyed_pst, research_program)

cs.header <- cs.header.orig %>% select(-census_phocid_header_id)

stopifnot(
nrow(cs.header) ==
nrow(collect(tbl(con, "census_phocid_header")) %>%
# TODO: temporary to avoid including 2023/24 data for manuscript
filter(census_date_start < as.Date("2023-07-01")))
nrow(collect(tbl(con, "census_phocid_header")))
# # TODO: temporary to avoid including 2023/24 data for manuscript
# filter(census_date_start < as.Date("2023-07-01")))
)


cs.wide <- tbl(con, "vCensus_Phocid") %>%
arrange(census_date, species, location_group) %>%
rename(header_id = census_phocid_header_id) %>%
# TODO: temporary to avoid including 2023/24 data
filter(census_date < as.Date("2023-07-01")) %>%
# # TODO: temporary to avoid including 2023/24 data
# filter(census_date < as.Date("2023-07-01")) %>%
collect() %>%
select(header_id, observer, census_date, location_group, species,
ends_with("_count")) %>%
Expand Down
944 changes: 483 additions & 461 deletions data/dwca/event.txt

Large diffs are not rendered by default.

880 changes: 880 additions & 0 deletions data/dwca/occurrence.txt

Large diffs are not rendered by default.

88 changes: 88 additions & 0 deletions data/manuscript/cs-phoc-counts.csv
Original file line number Diff line number Diff line change
Expand Up @@ -1843,3 +1843,91 @@ count_id,event_id,location,species,species_common,total_count,ad_female_count,ad
284-1-231413,284,Core census locations,Mirounga leonina,Southern elephant seal,263,32,0,,43,17,,8,,,163
284-1-231417,284,Core census locations,Hydrurga leptonyx,Leopard seal,7,7,0,0,0,0,0,,,,
284-1-195932,284,Core census locations,Leptonychotes weddellii,Weddell seal,26,0,5,0,5,1,3,12,,,
285-1-344008,285,Core census locations,Lobodon carcinophaga,Crabeater seal,0,0,0,0,0,0,0,0,0,0,0
285-1-231413,285,Core census locations,Mirounga leonina,Southern elephant seal,319,3,0,0,29,99,146,33,0,0,9
285-1-231417,285,Core census locations,Hydrurga leptonyx,Leopard seal,2,2,0,0,0,0,0,0,0,0,0
285-1-195932,285,Core census locations,Leptonychotes weddellii,Weddell seal,16,1,4,1,5,5,0,0,0,0,0
285-2-344008,285,Punta San Telmo,Lobodon carcinophaga,Crabeater seal,0,0,0,0,0,0,0,0,0,0,0
285-2-231413,285,Punta San Telmo,Mirounga leonina,Southern elephant seal,122,0,0,0,11,42,53,2,0,0,14
285-2-231417,285,Punta San Telmo,Hydrurga leptonyx,Leopard seal,0,0,0,0,0,0,0,0,0,0,0
285-2-195932,285,Punta San Telmo,Leptonychotes weddellii,Weddell seal,1,0,0,0,0,1,0,0,0,0,0
287-1-344008,287,Core census locations,Lobodon carcinophaga,Crabeater seal,0,0,0,0,0,0,0,0,0,0,0
287-1-231413,287,Core census locations,Mirounga leonina,Southern elephant seal,394,3,0,0,39,147,146,25,0,0,34
287-1-231417,287,Core census locations,Hydrurga leptonyx,Leopard seal,1,1,0,0,0,0,0,0,0,0,0
287-1-195932,287,Core census locations,Leptonychotes weddellii,Weddell seal,7,1,2,0,2,0,2,0,0,0,0
287-2-344008,287,Punta San Telmo,Lobodon carcinophaga,Crabeater seal,0,0,0,0,0,0,0,0,0,0,0
287-2-231413,287,Punta San Telmo,Mirounga leonina,Southern elephant seal,109,2,0,0,13,54,27,1,0,0,12
287-2-231417,287,Punta San Telmo,Hydrurga leptonyx,Leopard seal,0,0,0,0,0,0,0,0,0,0,0
287-2-195932,287,Punta San Telmo,Leptonychotes weddellii,Weddell seal,5,1,0,0,1,3,0,0,0,0,0
288-1-344008,288,Core census locations,Lobodon carcinophaga,Crabeater seal,0,0,0,0,0,0,0,0,0,0,0
288-1-231413,288,Core census locations,Mirounga leonina,Southern elephant seal,404,10,0,0,37,112,236,7,0,0,2
288-1-231417,288,Core census locations,Hydrurga leptonyx,Leopard seal,3,3,0,0,0,0,0,0,0,0,0
288-1-195932,288,Core census locations,Leptonychotes weddellii,Weddell seal,10,2,1,0,1,2,1,1,0,0,2
288-2-344008,288,Punta San Telmo,Lobodon carcinophaga,Crabeater seal,0,0,0,0,0,0,0,0,0,0,0
288-2-231413,288,Punta San Telmo,Mirounga leonina,Southern elephant seal,91,0,0,0,4,52,35,0,0,0,0
288-2-231417,288,Punta San Telmo,Hydrurga leptonyx,Leopard seal,0,0,0,0,0,0,0,0,0,0,0
288-2-195932,288,Punta San Telmo,Leptonychotes weddellii,Weddell seal,8,2,1,2,2,0,1,0,0,0,0
1288-1-344008,1288,Core census locations,Lobodon carcinophaga,Crabeater seal,0,0,0,0,0,0,0,0,0,0,0
1288-1-231413,1288,Core census locations,Mirounga leonina,Southern elephant seal,424,25,1,0,54,133,183,1,0,0,27
1288-1-231417,1288,Core census locations,Hydrurga leptonyx,Leopard seal,2,2,0,0,0,0,0,0,0,0,0
1288-1-195932,1288,Core census locations,Leptonychotes weddellii,Weddell seal,6,0,1,0,1,3,1,0,0,0,0
1288-2-344008,1288,Punta San Telmo,Lobodon carcinophaga,Crabeater seal,0,0,0,0,0,0,0,0,0,0,0
1288-2-231413,1288,Punta San Telmo,Mirounga leonina,Southern elephant seal,103,0,0,0,19,30,50,0,0,0,4
1288-2-231417,1288,Punta San Telmo,Hydrurga leptonyx,Leopard seal,0,0,0,0,0,0,0,0,0,0,0
1288-2-195932,1288,Punta San Telmo,Leptonychotes weddellii,Weddell seal,7,2,1,0,2,1,1,0,0,0,0
1289-1-344008,1289,Core census locations,Lobodon carcinophaga,Crabeater seal,0,0,0,0,0,0,0,0,0,0,0
1289-1-231413,1289,Core census locations,Mirounga leonina,Southern elephant seal,425,135,0,0,28,67,144,1,0,0,50
1289-1-231417,1289,Core census locations,Hydrurga leptonyx,Leopard seal,2,2,0,0,0,0,0,0,0,0,0
1289-1-195932,1289,Core census locations,Leptonychotes weddellii,Weddell seal,12,1,2,0,4,4,1,0,0,0,0
1289-2-344008,1289,Punta San Telmo,Lobodon carcinophaga,Crabeater seal,0,0,0,0,0,0,0,0,0,0,0
1289-2-231413,1289,Punta San Telmo,Mirounga leonina,Southern elephant seal,81,7,0,0,2,38,22,0,0,0,12
1289-2-231417,1289,Punta San Telmo,Hydrurga leptonyx,Leopard seal,1,1,0,0,0,0,0,0,0,0,0
1289-2-195932,1289,Punta San Telmo,Leptonychotes weddellii,Weddell seal,5,1,2,0,0,2,0,0,0,0,0
1290-1-344008,1290,Core census locations,Lobodon carcinophaga,Crabeater seal,0,0,0,0,0,0,0,0,0,0,0
1290-1-231413,1290,Core census locations,Mirounga leonina,Southern elephant seal,457,227,0,0,45,68,89,0,0,0,28
1290-1-231417,1290,Core census locations,Hydrurga leptonyx,Leopard seal,5,4,0,1,0,0,0,0,0,0,0
1290-1-195932,1290,Core census locations,Leptonychotes weddellii,Weddell seal,16,1,5,0,7,3,0,0,0,0,0
1290-2-344008,1290,Punta San Telmo,Lobodon carcinophaga,Crabeater seal,2,0,0,0,2,0,0,0,0,0,0
1290-2-231413,1290,Punta San Telmo,Mirounga leonina,Southern elephant seal,76,7,0,0,7,36,26,0,0,0,0
1290-2-231417,1290,Punta San Telmo,Hydrurga leptonyx,Leopard seal,1,1,0,0,0,0,0,0,0,0,0
1290-2-195932,1290,Punta San Telmo,Leptonychotes weddellii,Weddell seal,6,2,2,0,1,1,0,0,0,0,0
1291-1-344008,1291,Core census locations,Lobodon carcinophaga,Crabeater seal,0,0,0,0,0,0,0,0,0,0,0
1291-1-231413,1291,Core census locations,Mirounga leonina,Southern elephant seal,438,134,0,0,14,55,122,0,0,0,113
1291-1-231417,1291,Core census locations,Hydrurga leptonyx,Leopard seal,4,4,0,0,0,0,0,0,0,0,0
1291-1-195932,1291,Core census locations,Leptonychotes weddellii,Weddell seal,14,3,2,0,5,4,0,0,0,0,0
1291-2-344008,1291,Punta San Telmo,Lobodon carcinophaga,Crabeater seal,0,0,0,0,0,0,0,0,0,0,0
1291-2-231413,1291,Punta San Telmo,Mirounga leonina,Southern elephant seal,51,0,0,0,12,12,10,0,0,0,17
1291-2-231417,1291,Punta San Telmo,Hydrurga leptonyx,Leopard seal,1,1,0,0,0,0,0,0,0,0,0
1291-2-195932,1291,Punta San Telmo,Leptonychotes weddellii,Weddell seal,4,2,0,0,1,0,1,0,0,0,0
1292-1-344008,1292,Core census locations,Lobodon carcinophaga,Crabeater seal,1,0,0,0,0,0,1,0,0,0,0
1292-1-231413,1292,Core census locations,Mirounga leonina,Southern elephant seal,428,171,0,0,46,25,111,0,0,0,75
1292-1-231417,1292,Core census locations,Hydrurga leptonyx,Leopard seal,3,3,0,0,0,0,0,0,0,0,0
1292-1-195932,1292,Core census locations,Leptonychotes weddellii,Weddell seal,14,1,1,1,6,5,0,0,0,0,0
1292-2-344008,1292,Punta San Telmo,Lobodon carcinophaga,Crabeater seal,0,0,0,0,0,0,0,0,0,0,0
1292-2-231413,1292,Punta San Telmo,Mirounga leonina,Southern elephant seal,50,20,0,0,9,9,12,0,0,0,0
1292-2-231417,1292,Punta San Telmo,Hydrurga leptonyx,Leopard seal,1,1,0,0,0,0,0,0,0,0,0
1292-2-195932,1292,Punta San Telmo,Leptonychotes weddellii,Weddell seal,8,0,1,1,2,3,1,0,0,0,0
1293-1-344008,1293,Core census locations,Lobodon carcinophaga,Crabeater seal,0,0,0,0,0,0,0,0,0,0,0
1293-1-231413,1293,Core census locations,Mirounga leonina,Southern elephant seal,358,136,0,0,46,29,125,0,0,0,22
1293-1-231417,1293,Core census locations,Hydrurga leptonyx,Leopard seal,3,3,0,0,0,0,0,0,0,0,0
1293-1-195932,1293,Core census locations,Leptonychotes weddellii,Weddell seal,9,1,1,0,2,5,0,0,0,0,0
1293-2-344008,1293,Punta San Telmo,Lobodon carcinophaga,Crabeater seal,0,0,0,0,0,0,0,0,0,0,0
1293-2-231413,1293,Punta San Telmo,Mirounga leonina,Southern elephant seal,32,10,0,0,2,6,13,0,0,0,1
1293-2-231417,1293,Punta San Telmo,Hydrurga leptonyx,Leopard seal,1,1,0,0,0,0,0,0,0,0,0
1293-2-195932,1293,Punta San Telmo,Leptonychotes weddellii,Weddell seal,2,1,0,0,1,0,0,0,0,0,0
1294-1-344008,1294,Core census locations,Lobodon carcinophaga,Crabeater seal,0,0,0,0,0,0,0,0,0,0,0
1294-1-231413,1294,Core census locations,Mirounga leonina,Southern elephant seal,336,107,0,0,57,23,82,0,0,0,67
1294-1-231417,1294,Core census locations,Hydrurga leptonyx,Leopard seal,1,1,0,0,0,0,0,0,0,0,0
1294-1-195932,1294,Core census locations,Leptonychotes weddellii,Weddell seal,11,0,3,1,6,0,0,0,0,0,1
1294-2-344008,1294,Punta San Telmo,Lobodon carcinophaga,Crabeater seal,0,0,0,0,0,0,0,0,0,0,0
1294-2-231413,1294,Punta San Telmo,Mirounga leonina,Southern elephant seal,33,0,0,0,1,16,8,0,0,0,8
1294-2-231417,1294,Punta San Telmo,Hydrurga leptonyx,Leopard seal,0,0,0,0,0,0,0,0,0,0,0
1294-2-195932,1294,Punta San Telmo,Leptonychotes weddellii,Weddell seal,1,1,0,0,0,0,0,0,0,0,0
1295-1-344008,1295,Core census locations,Lobodon carcinophaga,Crabeater seal,0,0,0,0,0,0,0,0,0,0,0
1295-1-231413,1295,Core census locations,Mirounga leonina,Southern elephant seal,248,71,0,0,39,27,59,0,0,0,52
1295-1-231417,1295,Core census locations,Hydrurga leptonyx,Leopard seal,5,4,0,0,1,0,0,0,0,0,0
1295-1-195932,1295,Core census locations,Leptonychotes weddellii,Weddell seal,15,3,1,3,2,4,2,0,0,0,0
1295-2-344008,1295,Punta San Telmo,Lobodon carcinophaga,Crabeater seal,0,0,0,0,0,0,0,0,0,0,0
1295-2-231413,1295,Punta San Telmo,Mirounga leonina,Southern elephant seal,35,7,0,0,7,8,10,0,0,0,3
1295-2-231417,1295,Punta San Telmo,Hydrurga leptonyx,Leopard seal,0,0,0,0,0,0,0,0,0,0,0
1295-2-195932,1295,Punta San Telmo,Leptonychotes weddellii,Weddell seal,4,0,2,0,1,0,1,0,0,0,0
11 changes: 11 additions & 0 deletions data/manuscript/cs-phoc-events.csv
Original file line number Diff line number Diff line change
Expand Up @@ -283,3 +283,14 @@ event_id,season_name,census_date_start,census_date_end,census_days,surveyed_pst,
182,2022/23,2023-01-27,2023-01-27,1,TRUE,USAMLR
183,2022/23,2023-02-03,2023-02-03,1,TRUE,USAMLR
184,2022/23,2023-02-10,2023-02-10,1,TRUE,USAMLR
285,2023/24,2023-12-10,2023-12-11,2,TRUE,USAMLR
287,2023/24,2023-12-15,2023-12-15,1,TRUE,USAMLR
288,2023/24,2023-12-22,2023-12-22,1,TRUE,USAMLR
1288,2023/24,2023-12-30,2023-12-30,1,TRUE,USAMLR
1289,2023/24,2024-01-05,2024-01-05,1,TRUE,USAMLR
1290,2023/24,2024-01-12,2024-01-12,1,TRUE,USAMLR
1291,2023/24,2024-01-19,2024-01-19,1,TRUE,USAMLR
1292,2023/24,2024-01-27,2024-01-27,1,TRUE,USAMLR
1293,2023/24,2024-02-02,2024-02-03,2,TRUE,USAMLR
1294,2023/24,2024-02-09,2024-02-09,1,TRUE,USAMLR
1295,2023/24,2024-02-16,2024-02-16,1,TRUE,USAMLR
Loading

1 comment on commit e7c2e8d

@smwoodman
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • typo in commit message: ...added 2023/24 data..."

Please sign in to comment.