Filtering occurrence records

William K. Morris

When getting records from FinBIF there are many options for filtering the data before it is downloaded, saving bandwidth and local post-processing time. For the full list of filtering options see ?filters.


Records can be filtered by the name of a location or by a set of coordinates.

filter1 <- c(country = "Finland")
filter2 <- list(coordinates = list(c(60, 68), c(20, 30), "wgs84"))
par(mfcol = 1:2)
plot(finbif_occurrence(filter = filter1, n = 1000), main = "Name")
plot(finbif_occurrence(filter = filter2, n = 1000), main = "Coordinates")

See ?filters section “Location” for more details


The event or import date of records can be used to filter occurrence data from FinBIF. The date filters can be a single year, month or date,

finbif_occurrence(filter = list(date_range_ym = c("2019-12")))

Click to show/hide output.

, or for record events, a range as a character vector or an Interval object.

  filter = list(date_range_ymd = c("2019-06-01", "2019-12-31"))

Click to show/hide output.

Records for a specific season or time-span across all years can also be requested.

  filter = list(
    date_range_md = c(begin = "12-21", end = "12-31"),
    date_range_md = c(begin = "01-01", end = "02-20")

Click to show/hide output.

Data Quality

You can filter occurrence records by indicators of data quality. See ?filters section “Quality” for details.

strict <- c(
  collection_reliability = 5, coordinates_uncertainty_max = 1,
  taxon_reliability = "reliable"
permissive <- list(
  collection_reliability = 1:5, coordinates_uncertainty_max = 10000,
  quality_issues = "both"
  strict     = finbif_occurrence(filter = strict,     count_only = TRUE),
  permissive = finbif_occurrence(filter = permissive, count_only = TRUE)
#> Error: 2 errors occurred:
#>   - Invalid name in filter names: collection_reliability
#>   - Invalid name in filter names: taxon_reliability


The FinBIF database consists of a number of constituent collections. You can filter by collection with either the collection or not_collection filters. Use finbif_collections() to see metadata on the FinBIF collections.

  filter = c(collection = "iNaturalist"), count_only = TRUE
#> [1] 20463
  filter = c(collection = "Notebook, general observations"), count_only = TRUE
#> [1] 730369

Informal taxonomic groups

You can filter occurrence records based on informal taxonomic groups such as Birds or Mammals.

finbif_occurrence(filter = list(informal_group = c("Birds", "Mammals")))

Click to show/hide output.

See finbif_informal_groups() for the full list of groups you can filter by. You can use the same function to see the subgroups that make up a higher level informal group:

#>  ¦--Macrofungi                                                
#>  ¦   ¦--Agaricoid fungi                                       
#>  ¦   ¦--Aphyllophoroid fungi                                  
#>  ¦   ¦   ¦--Cantharelloid fungi                               
#>  ¦   ¦   ¦--Clavarioid fungi                                  
#>  ¦   ¦   ¦--Corticioid fungi                                  
#>  ¦   ¦   ¦--Hydnoid fungi                                     
#>  ¦   ¦   ¦--Jelly fungi, tremelloid fungi                     
#>  ¦   ¦   ¦--Polypores                                         
#>  ¦   ¦   °--Ramarioid fungi                                   
#>  ¦   ¦--Boletoid fungi                                        
#>  ¦   ¦--Cyphelloid fungi                                      
#>  ¦   °--Gastroid fungi, puffballs

Administrative status

Many records in the FinBIF database include taxa that have one or another administrative statuses. See finbif_metadata("admin_status") for a list of administrative statuses and short-codes.

# Search for birds on the EU invasive species list
  filter = list(informal_group = "Birds", administrative_status = "EU_INVSV")

Click to show/hide output.

IUCN red list

Filtering can be done by IUCN red list category. See finbif_metadata("red_list") for the IUCN red list categories and their short-codes.

# Search for near threatened mammals
  filter = list(informal_group = "Mammals", red_list_status = "NT")

Click to show/hide output.

Habitat type

Many taxa are associated with one or more primary or secondary habitat types (e.g., forest) or subtypes (e.g., herb-rich alpine birch forests). Use finbif_metadata("habitat_types") to see the habitat types in FinBIF. You can filter occurrence records based on primary (or primary/secondary) habitat type or subtype codes. Note that filtering based on habitat is on taxa not on the location (i.e., filtering records with primary_habitat = "M" will only return records of taxa considered to primarily inhabit forests, yet the locations of those records may encompass habitats other than forests).

#>   habitat_name                              habitat_code
#> 1 Forests                                   M           
#> 2 Heath forests                             MK          
#> 3 Sub-xeric, xeric and barren heath forests MKK         
#> 4 Mesic and herb-rich heath forests         MKT         
#> 5 Herb-rich forests (also spruce-dominated) ML          
#> 6 Dry and mesic herb-rich forests           MLT
# Search records of taxa for which forests are their primary or secondary
# habitat type
finbif_occurrence(filter = c(primary_secondary_habitat = "M"))

Click to show/hide output.

You may further refine habitat based searching using a specific habitat type qualifier such as “sun-exposed” or “shady”. Use finbif_metadata("habitat_qualifiers") to see the qualifiers available. To specify qualifiers use a named list of character vectors where the names are habitat types or subtypes and the elements of the character vectors are the qualifier codes.

finbif_metadata("habitat_qualifiers")[4:6, ]
#>   qualifier_name                      qualifier_code
#> 4 Broadleaved deciduous trees present J             
#> 5 Sun-exposed                         PA            
#> 6 Shady                               VA
# Search records of taxa for which forests with sun-exposure and broadleaved
# deciduous trees are their primary habitat type
finbif_occurrence(filter = list(primary_habitat = list(M = c("PA", "J"))))

Click to show/hide output.

Status of taxa in Finland

You can restrict the occurrence records by the status of the taxa in Finland. For example you can request records for only rare species.

finbif_occurrence(filter = c(finnish_occurrence_status = "rare"))

Click to show/hide output.

Or, by using the negation of occurrence status, you can request records of birds excluding those considered vagrants.

  filter = list(
    informal_group                = "birds",
    finnish_occurrence_status_neg = sprintf("vagrant_%sregular", c("", "ir"))

Click to show/hide output.

See finbif_metadata("finnish_occurrence_status") for a full list of statuses and their descriptions.