One problem you often run in to is that there can be various names for the same taxon in any one source. For example:

library(spocc)
df <- occ(query = 'Pinus contorta', from = c('gbif', 'ecoengine'), limit = 50)
unique(df$gbif$data$Pinus_contorta$name)
#> [1] "Pinus contorta Douglas ex Loudon"             
#> [2] "Pinus contorta var. contorta"                 
#> [3] "Pinus contorta var. murrayana (Balf.) Engelm."
unique(df$ecoengine$data$Pinus_contorta$name)
#> [1] "Pinus contorta murrayana"        "Pinus contorta"                 
#> [3] "Pinus contorta var. murrayana"   "Pinus contorta subsp. murrayana"
#> [5] "Pinus contorta subsp. bolanderi" "Pinus contorta subsp. contorta" 
#> [7] "Pinus contorta var. contorta"

This is fine, but when trying to make a map in which points are colored for each taxon, you can have many colors for a single taxon, where instead one color per taxon is more appropriate. There is a function in scrubr called fix_names(), which has a few options in which you can take the shortest names (usually just the plain binomials like Homo sapiens), or the original name queried, or a vector of names supplied by the user.

library(scrubr)
df$gbif$data$Pinus_contorta <- fix_names(df$gbif$data$Pinus_contorta, how = 'shortest')
df$ecoengine$data$Pinus_contorta <- fix_names(df$ecoengine$data$Pinus_contorta, how = 'shortest')
unique(df$gbif$data$Pinus_contorta$name)
#> [1] "Pinus contorta var. contorta"
unique(df$ecoengine$data$Pinus_contorta$name)
#> [1] "Pinus contorta"
df_comb <- occ2df(df)
head(df_comb); tail(df_comb)
#> # A tibble: 6 x 6
#>   name                         longitude latitude prov  date       key       
#>   <chr>                            <dbl>    <dbl> <chr> <date>     <chr>     
#> 1 Pinus contorta var. contorta    -115.      50.9 gbif  2020-01-01 2543085192
#> 2 Pinus contorta var. contorta      17.6     59.8 gbif  2020-01-01 2548826490
#> 3 Pinus contorta var. contorta      19.2     64.0 gbif  2020-01-06 2549045731
#> 4 Pinus contorta var. contorta      19.3     64.0 gbif  2020-01-06 2549053727
#> 5 Pinus contorta var. contorta    -123.      49.3 gbif  2020-01-04 2550016817
#> 6 Pinus contorta var. contorta    -106.      39.8 gbif  2020-01-07 2557738499
#> # A tibble: 6 x 6
#>   name           longitude latitude prov      date       key              
#>   <chr>              <dbl>    <dbl> <chr>     <date>     <chr>            
#> 1 Pinus contorta     -119.     38.1 ecoengine 1935-09-12 vtm:plot:71E15:7 
#> 2 Pinus contorta     -119.     37.8 ecoengine 1935-09-22 vtm:plot:76B115:3
#> 3 Pinus contorta     -119.     37.8 ecoengine 1935-09-15 vtm:plot:76C24:3 
#> 4 Pinus contorta     -119.     37.7 ecoengine 1935-09-07 vtm:plot:76D27:4 
#> 5 Pinus contorta     -124.     39.4 ecoengine 1930-10-31 POM213040        
#> 6 Pinus contorta     -121.     40.4 ecoengine 1960-07-18 CAS:DS:40775

Now with one taxon name for each taxon we can more easily make a plot.