Skip to content

Commit

Permalink
add authors to RBGV datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
ehwenk committed Feb 15, 2024
1 parent 082e982 commit 76b2a2a
Show file tree
Hide file tree
Showing 7 changed files with 90,727 additions and 83,262 deletions.
1 change: 0 additions & 1 deletion data/ABRS_2023/metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ dataset:
trait_value = ifelse(trait_name == "leaf_shape", stringr::str_replace(trait_value, "cylindrical", "terete"), trait_value),
trait_value = ifelse(trait_name == "leaf_margin_posture", stringr::str_replace(trait_value, "recurved", "revolute"), trait_value),
trait_value = ifelse(trait_name == "leaf_margin_posture", stringr::str_replace(trait_value, "incurved", "involute"), trait_value),
trait_value = ifelse(category =="rachis", NA, trait_value),
measurement_remarks = ifelse(is.na(category), joined, paste0(joined, "; Trait value refers to ", category)),
inferred = ifelse(stringr::str_detect(flora_value, "inferred"), flora_value, NA),
inferred = ifelse(stringr::str_detect(flora_value, "inferred_from_species"), "inferred_from_species", inferred),
Expand Down
13,930 changes: 6,965 additions & 6,965 deletions data/RBGV_2022/data.csv

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/RBGV_2022/metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ dataset:
'
collection_date: unknown/2022
taxon_name: taxon_name
source_id: created_by
description: Plant growth form data extracted from VicFlora, the Victorian online
flora.
basis_of_record: preserved_specimen
Expand Down
152,588 changes: 76,294 additions & 76,294 deletions data/RBGV_2023/data.csv

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions data/RBGV_2023/metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ dataset:
data %>%
filter(!is.na(taxon_name)) %>%
filter(str_detect(taxon_name, " ")) %>%
filter(!category %in% c("petiole")) %>%
filter(!category %in% c("petiole", "rachis")) %>%
mutate(
trait_value = ifelse(trait_name == "leaf_shape", stringr::str_replace(trait_value, "semi-orbicular", "orbicular"), trait_value),
trait_value = ifelse(trait_name == "seed_shape", stringr::str_replace(trait_value, "obovate", "ovoid"), trait_value),
Expand All @@ -57,7 +57,6 @@ dataset:
trait_value = ifelse(trait_name == "leaf_shape", stringr::str_replace(trait_value, "cylindrical", "terete"), trait_value),
trait_value = ifelse(trait_name == "leaf_margin_posture", stringr::str_replace(trait_value, "recurved", "revolute"), trait_value),
trait_value = ifelse(trait_name == "leaf_margin_posture", stringr::str_replace(trait_value, "incurved", "involute"), trait_value),
trait_value = ifelse(category =="rachis", NA, trait_value),
measurement_remarks = ifelse(is.na(category), NA, paste0("Trait value refers to ", category)),
inferred = ifelse(stringr::str_detect(flora_value, "inferred"), flora_value, NA),
inferred = ifelse(stringr::str_detect(flora_value, "inferred_from_species"), "inferred_from_species", inferred),
Expand Down Expand Up @@ -122,6 +121,7 @@ dataset:
trait_name: trait_name
value: trait_value
measurement_remarks: measurement_remarks
source_id: created_by
description: Plant morphology data extracted from VicFlora, the Victorian online
flora.
basis_of_record: literature
Expand Down
7,446 changes: 7,446 additions & 0 deletions data/RBGV_2023/raw/120224_downloaded.csv

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions data/RBGV_2023/raw/add authors to profiles.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# extract authors from current RBGV download

read_csv("data/RBGV_2023/raw/120224_downloaded.csv") %>%
select(taxon_name, created_by) %>%
group_by(taxon_name) %>%
mutate(created_by = paste0(created_by, collapse = "; ")) %>%
ungroup() %>%
distinct() -> authors

# add authors to 2 RBGV dataset

read_csv("data/RBGV_2023/data.csv") %>%
left_join(authors) %>%
write_csv("data/RBGV_2023/data.csv")

read_csv("data/RBGV_2022/data.csv") %>%
left_join(authors) %>%
write_csv("data/RBGV_2022/data.csv")

0 comments on commit 76b2a2a

Please sign in to comment.