fishvice / tidydatras

tidy ices stuff
https://heima.hafro.is/~einarhj/pkg/tidydatras
1 stars 1 forks source link

species table #4

Open einarhjorleifsson opened 1 year ago

einarhjorleifsson commented 1 year ago

currently have two species tables, asfis and aphia_latin. would be preferable to have just one. may possibly think if adding some variables from worms to that.

martinpastoors commented 1 year ago

Good idea. May be also from Fishbase.

einarhjorleifsson commented 1 year ago

because we use latin names to do a left_join on asfis we generate duplicates in some (rare) cases:


tidyices::afsis |> 
  group_by(latin) |> 
  mutate(n = n()) |> 
  ungroup() |> 
  filter(n > 1) |> 
  arrange(latin) |> 
  as.data.frame()
species          latin                   english_name       family                 order n
1      DIA Actinopterygii          Diadromous fishes nei         <NA>    PISCES MISCELLANEA 6
2      FIN Actinopterygii                  Finfishes nei         <NA>    PISCES MISCELLANEA 6
3      FRF Actinopterygii          Freshwater fishes nei         <NA>    PISCES MISCELLANEA 6
4      GRO Actinopterygii               Groundfishes nei         <NA>    PISCES MISCELLANEA 6
5      MZZ Actinopterygii              Marine fishes nei         <NA>    PISCES MISCELLANEA 6
6      PEL Actinopterygii             Pelagic fishes nei         <NA>    PISCES MISCELLANEA 6
7      CLU     Clupeoidei                  Clupeoids nei         <NA>          CLUPEIFORMES 2
8      DCX     Clupeoidei       Diadromous clupeoids nei         <NA>          CLUPEIFORMES 2
9      CRU      Crustacea         Marine crustaceans nei         <NA> CRUSTACEA MISCELLANEA 2
10     FCX      Crustacea     Freshwater crustaceans nei         <NA> CRUSTACEA MISCELLANEA 2
11     DWS Elasmobranchii          Deep-water sharks nei         <NA>    PISCES MISCELLANEA 2
12     SKX Elasmobranchii Sharks, rays, skates, etc. nei         <NA>    PISCES MISCELLANEA 2
13     FGX       Gobiidae          Freshwater gobies nei     GOBIIDAE             GOBIOIDEI 2
14     GPA       Gobiidae                     Gobies nei     GOBIIDAE             GOBIOIDEI 2
15     MOF       Mollusca        Freshwater molluscs nei         <NA>  MOLLUSCA MISCELLANEA 2
16     MOL       Mollusca            Marine molluscs nei         <NA>  MOLLUSCA MISCELLANEA 2
17     PAL   Palaemonidae         Palaemonid shrimps nei PALAEMONIDAE              NATANTIA 2
18     PPZ   Palaemonidae Freshwater prawns, shrimps nei PALAEMONIDAE              NATANTIA 2
19     DPX    Perciformes       Demersal percomorphs nei         <NA>    PISCES MISCELLANEA 2
20     PPX    Perciformes        Pelagic percomorphs nei         <NA>    PISCES MISCELLANEA 2
21     TTX    Testudinata             Marine turtles nei         <NA>            TESTUDINES 2
22     TUL    Testudinata     River and lake turtles nei         <NA>            TESTUDINES 2
martinpastoors commented 1 year ago

Should I clean up up the asfis to contain only the marine versions of the duplicates?

einarhjorleifsson commented 1 year ago

i think so. and also merge it with apia_latin??