Global Biodiversity Data Cube at EQDGC Level 1
收藏资源简介:
Global Biodiversity Data Cube using an EQDGC level 1 detail. The countries are an additional dimension in the GeoParquet file, allowing country level analyses. The data cube was generated through the GBIF SQL API, using the following SQL statement:SELECT kingdom, kingdomkey, phylum, phylumkey, class, classkey, "order", orderkey, family, familykey, genus, genuskey, species, specieskey, countrycode, PRINTF('%04d-%02d', "year", "month") yearmonth, GBIF_EQDGCODE(1, decimallatitude, decimallongitude, 0.0) eqdcellcode, IF(ISNULL(kingdomkey), NULL, SUM(COUNT(*)) OVER ( PARTITION BY kingdomkey, GBIF_EQDGCODE(1, decimallatitude, decimallongitude, 0.0), PRINTF('%04d-%02d', "year", "month"))) kingdomcount, IF(ISNULL(familykey), NULL, SUM(COUNT(*)) OVER ( PARTITION BY familykey, GBIF_EQDGCODE(1, decimallatitude, decimallongitude, 0.0), PRINTF('%04d-%02d', "year", "month"))) familycount, IF(ISNULL(genuskey), NULL, SUM(COUNT(*)) OVER ( PARTITION BY genuskey, GBIF_EQDGCODE(1, decimallatitude, decimallongitude, 0.0), PRINTF('%04d-%02d', "year", "month"))) genuscount, COUNT(DISTINCT recordedby) distinctobservers, COUNT(*) occurrences FROM occurrence WHERE occurrence.occurrencestatus = 'PRESENT' AND NOT occurrence.basisofrecord IN ('FOSSIL_SPECIMEN', 'LIVING_SPECIMEN') AND (occurrence.specieskey 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.countrycode, PRINTF('%04d-%02d', occurrence."year", occurrence."month"), GBIF_EQDGCODE(1, occurrence.decimallatitude, occurrence.decimallongitude, 0.0)



