occurrence-cube

User defined functions (UDF) to aggregate species occurrence data with SQL

https://github.com/gbif/occurrence-cube

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 5 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.3%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

User defined functions (UDF) to aggregate species occurrence data with SQL

Basic Info
Statistics
  • Stars: 6
  • Watchers: 12
  • Forks: 2
  • Open Issues: 26
  • Releases: 3
Created about 3 years ago · Last pushed 12 months ago
Metadata Files
Readme License Citation

README.md

Occurrence Cube

DOI

Occurrence Cube provides user defined functions (UDF) to aggregate species occurrence data with Structured Query Language (SQL). They avoid users having to write complex aggregation queries themselves. The functions are especially relevant when creating species occurrence cubes and can be used in the GBIF SQL download API.

Found a bug or have a suggestion? Submit it as an issue.

Example

The following query counts the number of species occurrences from Belgium for each cell in the EEA reference grid. The user defined function GBIF_EEARGCode() simplifies this query.

SQL SELECT GBIF_EEARGCode( 1000, -- Size of the grid cell (1 km) decimalLatitude, -- Latitude of the occurrence decimalLongitude, -- Longitude of the occurrence 0.0 -- Spatial uncertainty (0 m) ) AS eeaCellCode, count(*) AS occurrences FROM occurrence WHERE countryCode = 'BE' GROUP BY eeaCellCode

Resources

Licence

Occurrence Cube is licensed under the Apache License, Version 2.0 or the MIT license, at your option.

Acknowledgements

B3 logoFunded by the European Union

The GBIF development of species occurrence cubes is part of (Biodiversity Building Blocks for policy) Work Package 2, led by the Research Institute for Nature and Forest (INBO) and funded by the European Union’s Horizon Europe Research and Innovation Programme (ID No 101059592).

Owner

  • Name: Global Biodiversity Information Facility
  • Login: gbif
  • Kind: organization
  • Location: Copenhagen, Denmark

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: Occurrence Cube
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Matthew
    family-names: Blissett
    affiliation: Global Biodiversity Information Facility (GBIF)
    orcid: 'https://orcid.org/0000-0003-0623-6682'
  - given-names: Tim
    family-names: Robertson
    affiliation: Global Biodiversity Information Facility (GBIF)
    orcid: 'https://orcid.org/0000-0001-6215-3617'
  - given-names: Peter
    family-names: Desmet
    affiliation: Research Institute for Nature and Forest (INBO)
    orcid: 'https://orcid.org/0000-0002-8442-8025'
identifiers:
  - type: doi
    value: 10.5281/zenodo.10607133
    description: Versionless DOI for this work.
  - type: doi
    value: 10.3030/101059592
    description: DOI for related project.
repository-code: 'https://github.com/gbif/occurrence-cube'
url: >-
  https://techdocs.gbif.org/en/data-use/api-sql-download-functions
abstract: >-
  Occurrence Cube provides user defined functions (UDF) to
  aggregate species occurrence data with Structured Query
  Language (SQL). They avoid users having to write complex
  aggregation queries themselves. The functions are
  especially relevant when creating species occurrence cubes
  and can be used in the GBIF SQL download API.
keywords:
  - UDF
  - SQL
  - GBIF
  - species occurrences
  - data cubes
license:
  - Apache-2.0
  - MIT

GitHub Events

Total
  • Create event: 2
  • Release event: 1
  • Issues event: 38
  • Watch event: 2
  • Delete event: 1
  • Issue comment event: 55
  • Push event: 9
  • Pull request event: 3
  • Fork event: 2
Last Year
  • Create event: 2
  • Release event: 1
  • Issues event: 38
  • Watch event: 2
  • Delete event: 1
  • Issue comment event: 55
  • Push event: 9
  • Pull request event: 3
  • Fork event: 2

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 25
  • Total pull requests: 2
  • Average time to close issues: 6 months
  • Average time to close pull requests: about 11 hours
  • Total issue authors: 12
  • Total pull request authors: 2
  • Average comments per issue: 2.08
  • Average comments per pull request: 0.5
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 18
  • Pull requests: 2
  • Average time to close issues: 15 days
  • Average time to close pull requests: about 11 hours
  • Issue authors: 11
  • Pull request authors: 2
  • Average comments per issue: 1.72
  • Average comments per pull request: 0.5
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • MattBlissett (17)
  • peterdesmet (7)
  • MortenHofft (3)
  • jhnwllr (2)
  • timrobertson100 (2)
  • andrewrodrigues (2)
  • shawndove (2)
  • qgroom (1)
  • wlangera (1)
  • EmmaCartuyvels1 (1)
  • mdoering (1)
  • dnoesgaard (1)
  • linamaes (1)
  • damianooldoni (1)
Pull Request Authors
  • peterdesmet (2)
  • frafra (1)
Top Labels
Issue Labels
enhancement (5) SHOULD (5) MUST (4) bug (1) MAY (1)
Pull Request Labels

Dependencies

pom.xml maven
  • org.apache.spark:spark-core_2.11 2.3.0 provided
  • org.apache.spark:spark-hive_2.11 2.3.0 provided
  • org.apache.spark:spark-sql_2.11 2.3.0 provided
  • org.geotools:gt-epsg-hsql 20.5
  • org.geotools:gt-referencing 20.5
  • junit:junit 4.13.2 test
cube-functions/pom.xml maven
  • mil.nga:mgrs
  • org.geotools:gt-epsg-hsql
  • org.geotools:gt-referencing
  • junit:junit test
cube-hive/pom.xml maven
  • org.apache.hive:hive-exec 1.1.0-cdh5.16.2 provided
  • org.apache.hadoop:hadoop-common 2.6.0-cdh5.16.2
  • org.gbif.occurrence:cube-functions
  • org.geotools:gt-epsg-hsql
  • org.geotools:gt-referencing
  • junit:junit test
cube-spark/pom.xml maven
  • org.apache.spark:spark-core_${scala.tools.version} provided
  • org.apache.spark:spark-hive_${scala.tools.version} provided
  • org.apache.spark:spark-sql_${scala.tools.version} provided
  • org.gbif.occurrence:cube-functions
  • org.geotools:gt-epsg-hsql
  • org.geotools:gt-referencing
  • junit:junit test
grid-generator/pom.xml maven
  • org.gbif.occurrence:cube-functions
  • org.geotools:gt-epsg-hsql 31.2
  • org.geotools:gt-geopkg 31.2
  • org.geotools:gt-referencing 31.2