DOI: 10.15468/dl.k4tbrk
title: Occurrence Download

description: A dataset containing 683210094 records in GBIF matching the query:
SELECT
 kingdom,
 kingdomkey,
 phylum,
 phylumkey,
 class,
 classkey,
 "order",
 orderkey,
 family,
 familykey,
 genus,
 genuskey,
 species,
 specieskey,
 acceptedtaxonkey,
 acceptedscientificname,
 PRINTF('%04d-%02d', "year", "month") yearmonth,
 GBIF_ISEA3HCODE(14, decimallatitude, decimallongitude, COALESCE(coordinateuncertaintyinmeters, 1000)) isea3hcellcode,
 IF(ISNULL(phylumkey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY phylumkey, GBIF_ISEA3HCODE(14, decimallatitude, decimallongitude, COALESCE(coordinateuncertaintyinmeters, 1000)), PRINTF('%04d-%02d', "year", "month"))) phylumcount,
 IF(ISNULL(classkey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY classkey, GBIF_ISEA3HCODE(14, decimallatitude, decimallongitude, COALESCE(coordinateuncertaintyinmeters, 1000)), PRINTF('%04d-%02d', "year", "month"))) classcount,
 IF(ISNULL(orderkey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY orderkey, GBIF_ISEA3HCODE(14, decimallatitude, decimallongitude, COALESCE(coordinateuncertaintyinmeters, 1000)), PRINTF('%04d-%02d', "year", "month"))) ordercount,
 IF(ISNULL(familykey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY familykey, GBIF_ISEA3HCODE(14, decimallatitude, decimallongitude, COALESCE(coordinateuncertaintyinmeters, 1000)), PRINTF('%04d-%02d', "year", "month"))) familycount,
 IF(ISNULL(genuskey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY genuskey, GBIF_ISEA3HCODE(14, decimallatitude, decimallongitude, COALESCE(coordinateuncertaintyinmeters, 1000)), PRINTF('%04d-%02d', "year", "month"))) genuscount,
 IF(ISNULL(kingdomkey), NULL, SUM(COUNT(*)) OVER (
 PARTITION BY kingdomkey, GBIF_ISEA3HCODE(14, decimallatitude, decimallongitude, COALESCE(coordinateuncertaintyinmeters, 1000)), PRINTF('%04d-%02d', "year", "month"))) kingdomcount,
 COUNT(*) occurrences,
 MIN(GBIF_TEMPORALUNCERTAINTY(eventdate, eventtime)) mintemporaluncertainty,
 MIN(COALESCE(coordinateuncertaintyinmeters, 1000)) mincoordinateuncertaintyinmeters
FROM
 occurrence
WHERE
 occurrence.basisofrecord IN ('HUMAN_OBSERVATION', 'OBSERVATION', 'MACHINE_OBSERVATION', 'OCCURRENCE')
 AND GBIF_WITHIN('POLYGON((-180 -90,180 -90,180 90,-180 90,-180 -90))', occurrence.decimallatitude, occurrence.decimallongitude) = TRUE
 AND occurrence.hascoordinate = TRUE
 AND occurrence.hasgeospatialissues = FALSE
 AND LOWER(occurrence.iucnredlistcategory) IN (LOWER('EW'), LOWER('CR'), LOWER('EN'), LOWER('VU'), LOWER('NT'), LOWER('LC'), LOWER('DD'))
 AND occurrence.occurrencestatus = 'PRESENT'
 AND (CAST(occurrence.taxonkey AS INTEGER) = 212 OR CAST(occurrence.acceptedtaxonkey AS INTEGER) = 212 OR CAST(occurrence.kingdomkey AS INTEGER) = 212 OR CAST(occurrence.phylumkey AS INTEGER) = 212 OR CAST(occurrence.classkey AS INTEGER) = 212 OR CAST(occurrence.orderkey AS INTEGER) = 212 OR CAST(occurrence.familykey AS INTEGER) = 212 OR CAST(occurrence.genuskey AS INTEGER) = 212 OR CAST(occurrence.specieskey AS INTEGER) = 212)
 AND (occurrence."year" &gt;= 2000 AND occurrence."year" &lt;= 2026)
 AND NOT GBIF_STRINGARRAYCONTAINS(occurrence.issue, 'TAXON_MATCH_FUZZY', TRUE)
 AND (occurrence.distancefromcentroidinmeters &gt;= 2000.0 OR occurrence.distancefromcentroidinmeters IS NULL)
 AND (occurrence.acceptedtaxonkey IS NOT NULL AND occurrence."year" IS NOT NULL AND occurrence."month" IS NOT NULL AND occurrence.hascoordinate = TRUE)
GROUP BY
 occurrence.kingdom,
 occurrence.kingdomkey,
 occurrence.phylum,
 occurrence.phylumkey,
 occurrence.class,
 occurrence.classkey,
 occurrence."order",
 occurrence.orderkey,
 occurrence.family,
 occurrence.familykey,
 occurrence.genus,
 occurrence.genuskey,
 occurrence.species,
 occurrence.specieskey,
 occurrence.acceptedtaxonkey,
 occurrence.acceptedscientificname,
 PRINTF('%04d-%02d', "year", "month"),
 GBIF_ISEA3HCODE(14, decimallatitude, decimallongitude, COALESCE(coordinateuncertaintyinmeters, 1000))

 The dataset's 683210094 records were derived from 12585 constituent datasets; see https://api.gbif.org/v1/occurrence/download/0010687-260108223611665/datasets/export for details.
 
Data from some individual datasets included in this download may be licensed under less restrictive terms.