Skip to content

Clean up unit categories  #18

@andybeet

Description

@andybeet

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions