Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up unit categories #18

Open
andybeet opened this issue Jan 8, 2023 · 0 comments
Open

Clean up unit categories #18

andybeet opened this issue Jan 8, 2023 · 0 comments
Assignees

Comments

@andybeet
Copy link
Member

andybeet commented Jan 8, 2023

Describe the data issue

There are many units used in all of the metrics (Catch, Abundance, Recruitment, Fmort). Many units mean the same thing but are worded/labelled differently. This makes it hard to aggregate/filter

For example. List of Units for Catch metric

library(magrittr); stocksmart::stockAssessmentData %>% dplyr::filter(Metric == "Catch") %>% dplyr::distinct(Units)
#> # A tibble: 43 × 1
#>    Units                  
#>    <chr>                  
#>  1 Metric Tons            
#>  2 Thousand Metric Tons   
#>  3 Thousand Pounds        
#>  4 Pounds                 
#>  5 mt                     
#>  6 1000 mt                
#>  7 Number of Sharks       
#>  8 Metric Tons Meat Weight
#>  9 Unit                   
#> 10 Number                 
#> # … with 33 more rows

Created on 2023-01-07 by the reprex package (v2.0.1)

Would be nice to resolve this as much as possible, especially when units change over time within a single stock eg.

library(magrittr);stocksmart::stockAssessmentData %>% dplyr::filter(ITIS == 172421,Metric =="Catch") %>% dplyr::distinct(Units)
#> # A tibble: 2 × 1
#>   Units               
#>   <chr>               
#> 1 Thousand Metric Tons
#> 2 Metric Tons

Created on 2023-01-07 by the reprex package (v2.0.1)

Species, ITIS, Region

eg. ITIS = 172421, Bluefin Tuna - Western Atlantic

Sources for correcting the problem
none

@andybeet andybeet self-assigned this Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant