diff --git a/R/process.R b/R/process.R index 52722cafd..897f77973 100644 --- a/R/process.R +++ b/R/process.R @@ -292,11 +292,11 @@ process_create_observation_id <- function(data) { data <- data %>% dplyr::mutate( pop_id_segment = ifelse( - (!is.na(.data$location_name)|!is.na(.data$treatment_id)|!is.na(.data$plot_id)) & .data$entity_type %in% c("individual", "population"), + (!is.na(.data$location_name)|!is.na(.data$treatment_id)|!is.na(.data$plot_id)) & .data$entity_type %in% c("individual", "population", "metapopulation"), process_generate_id(.data$population_id, "", sort = TRUE), NA), pop_id_segment = ifelse(is.na(.data$pop_id_segment) & - .data$entity_type %in% c("individual", "population"), + .data$entity_type %in% c("individual", "population", "metapopulation"), "pop_unk", .data$pop_id_segment), population_id = .data$pop_id_segment ) @@ -373,7 +373,7 @@ process_create_observation_id <- function(data) { dplyr::group_by(.data$dataset_id) %>% dplyr::mutate( observation_id = - paste(.data$taxon_name, .data$population_id, .data$individual_id, .data$temporal_id, .data$entity_type, sep="-") %>% + paste(.data$taxon_name, .data$population_id, .data$individual_id, .data$temporal_id, .data$entity_type, .data$life_stage, sep="-") %>% process_generate_id("", sort = TRUE) ) %>% dplyr::ungroup() @@ -514,8 +514,8 @@ process_create_context_ids <- function(data, contexts) { tidyr::unite("combined", remove = FALSE) %>% dplyr::mutate( combined = ifelse(.data$combined == NAs, NA, .data$combined), - id = .data$combined %>% - as.factor() %>% as.integer() %>% make_id() + id = ifelse(!is.na(.data$combined), .data$combined %>% + as.factor() %>% as.integer() %>% make_id(), NA) ) %>% dplyr::select(-dplyr::all_of(c("combined"))) diff --git a/data/Witkowski_1991/data.csv b/data/Witkowski_1991/data.csv index 05a2d0345..45e0afd83 100644 --- a/data/Witkowski_1991/data.csv +++ b/data/Witkowski_1991/data.csv @@ -1,7 +1,7 @@ Species,plant_age,replicates_seeds_fruit,reproductive_maturity,seed_viability_%,seed_germination_%,seed_dry_mass_mg,fire_to_flowering,fire_to_fruiting,seedset_%,fruit_set_%,post_fire_recruitment,seedling_establishment_conditions,resprouting_capacity,serotiny -Banksia baxteri,10,15,3,98.6,41,43.4,3,5,0.9,1.2,post_fire_recruitment,establish_post_fire,fire_killed, serotiny_high -Banksia baxteri,21,5,,99.3,31,,,,0.8,1,,,, -Banksia speciosa,10,15,3,99.1,47,128.6,3,3,0.5,0.7,post_fire_recruitment,establish_post_fire,fire_killed, serotiny_high -Banksia speciosa,21,5,,99.7,35,,,,0.4,0.5,,,, -Banksia coccinea,10,15,3,99.3,21,12.8,3,3,4,8.6,post_fire_recruitment,establish_post_fire establish_anytime,fire_killed, serotiny_moderate -Banksia coccinea,21,5,,99.2,18,,,,3.4,7.3,,,, +Banksia baxteri,ten,15,3,98.6,41,43.4,3,5,0.9,1.2,post_fire_recruitment,establish_post_fire,fire_killed, serotiny_high +Banksia baxteri,twentyone,5,,99.3,31,,,,0.8,1,,,, +Banksia speciosa,ten,15,3,99.1,47,128.6,3,3,0.5,0.7,post_fire_recruitment,establish_post_fire,fire_killed, serotiny_high +Banksia speciosa,twentyone,5,,99.7,35,,,,0.4,0.5,,,, +Banksia coccinea,ten,15,3,99.3,21,12.8,3,3,4,8.6,post_fire_recruitment,establish_post_fire establish_anytime,fire_killed, serotiny_moderate +Banksia coccinea,twentyone,5,,99.2,18,,,,3.4,7.3,,,, diff --git a/data/Witkowski_1991/metadata.yml b/data/Witkowski_1991/metadata.yml index 964868520..725484f3d 100644 --- a/data/Witkowski_1991/metadata.yml +++ b/data/Witkowski_1991/metadata.yml @@ -70,8 +70,8 @@ contexts: category: entity_context var_in: plant_age values: - - value: 10 - - value: 21 + - value: ten + - value: twentyone traits: - var_in: reproductive_maturity unit_in: a diff --git a/data/Yang_2023/metadata.yml b/data/Yang_2023/metadata.yml index 85f28e889..a39e0f525 100644 --- a/data/Yang_2023/metadata.yml +++ b/data/Yang_2023/metadata.yml @@ -88,11 +88,13 @@ dataset: entity_type = "species", entity_type = ifelse(!is.na(fire_severity), "population", entity_type), entity_type = ifelse(!is.na(fire_intensity), "population", entity_type), - entity_type = ifelse(!is.na(habitat_conditions), "population", entity_type) + entity_type = ifelse(!is.na(habitat_conditions), "population", entity_type), + entity_type = ifelse(taxon_name %in% c("Banksia ashbyi", "Grevillea pteridifolia", "Hakea marginata", "Paraprasophyllum constrictum"), "population", entity_type) ) ' collection_date: unknown/2022 taxon_name: taxon_name + location_name: site source_id: source_id description: Plant fire response and other related trait data scored from Australia's online state and national floras and the taxonomic literature. @@ -113,7 +115,37 @@ dataset: original_file: .na notes: References for additional source_id's available in a column in the data.csv file, 'references' -locations: .na +locations: + South of Shark Bay: + longitude (deg): .na.character + latitude (deg): .na.character + North of Carnarvon: + longitude (deg): .na.character + latitude (deg): .na.character + QLD, NT: + longitude (deg): .na.character + latitude (deg): .na.character + Northern NT, WA: + longitude (deg): .na.character + latitude (deg): .na.character + Southern population: + longitude (deg): .na.character + latitude (deg): .na.character + Northern population: + longitude (deg): .na.character + latitude (deg): .na.character + Adelaide Hills: + longitude (deg): .na.character + latitude (deg): .na.character + Locations other than Adelaide Hills: + longitude (deg): .na.character + latitude (deg): .na.character + Providence Ponds: + longitude (deg): .na.character + latitude (deg): .na.character + NT: + longitude (deg): .na.character + latitude (deg): .na.character contexts: - context_property: fire severity category: plot @@ -174,7 +206,7 @@ contexts: description: Time from fire to flowering measured on resprouting shoots. - find: fire_killed value: from seed - description: Time from fire to flowering measured on plants that germinated post-fire. + description: Time from fire to flowering measured on plants that germinated post-fire. traits: - var_in: fire_response unit_in: .na