egouldo / ManyEcoEvo

Software for analysing Many-Analysts' style data and generating the ManyEcoEvo project data
https://egouldo.github.io/ManyEcoEvo/
GNU General Public License v3.0
3 stars 0 forks source link

query analyses with NULL review_data #70

Open egouldo opened 1 year ago

egouldo commented 1 year ago

Some rows of analyst data in ManyEcoEvo (targets target) have NULL for review data. Need to check that this is OK / expected, and not the result of an error where the review data is lost / missing at some point.

egouldo commented 2 months ago

These are the id's with missing review data:

Local .Rprofile detected at /Users/elliotgould/Documents/GitHub/ManyEcoEvo/.Rprofile

library(tidyverse)
library(ManyEcoEvo)
#> Loading required package: rmarkdown
#> Loading required package: bookdown
#> Registered S3 method overwritten by 'parsnip':
#>   method          from 
#>   print.nullmodel vegan
#> Registered S3 method overwritten by 'lava':
#>   method         from    
#>   print.estimate EnvStats

targets::tar_read(ManyEcoEvo) %>%
  nest_join(targets::tar_read(ManyEcoEvo) %>% pull(data, name = dataset) %>% map(~ select(.x, review_data) %>% drop_na(review_data)) %>% map2(., names(.), ~ mutate(.x, dataset = .y)) %>% bind_rows(), name = "review_data") %>%
  rowwise() %>%
  mutate(missing_review_data = list(anti_join(data, review_data))) %>%
  hoist(missing_review_data, "id_col") %>%
  pull(id_col, name = dataset)
#> Joining with `by = join_by(dataset)`
#> Joining with `by = join_by(review_data)`
#> Joining with `by = join_by(review_data)`
#> $`blue tit`
#> [1] "Bulli-2-1-1"  "Bulli-1-2-2"  "Bulli-1-2-1"  "Anakie-2-1-1" "Batlow-1-1-1"
#> [6] "Batlow-1-1-2" "Batlow-1-1-3" "Casino-3-1-2" "Casino-3-1-1"
#> 
#> $eucalyptus
#> [1] "Boorowa-1-3-1"  "Boorowa-1-2-1"  "Bermagui-1-3-1" "Bermagui-1-3-2"
#> [5] "Bermagui-1-3-3" "Bermagui-1-2-1" "Bermagui-1-2-2" "Bermagui-1-2-3"
#> [9] "Bungonia-1-1-1"

Created on 2024-09-10 with reprex v2.1.0