Gbif Api
Gbif Api
net/publication/308802095
CITATIONS READS
0 1,697
1 author:
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Dag Terje Filip Endresen on 04 October 2016.
Dag Endresen
GBIF Norway
UiO Natural History Museum in Oslo
University of Oslo
3
GBIF and GEO
Intergovernmental group on earth observations
GEO BON
Biodiversity observa2on network
649,054,525
species occurrence records
32,440
datasets
813
data-publishing institutions
+3,818,408
species occurrence records
+4,267
datasets
+4
data-publishing institutions
650
600
550
500
450
400
350
300
250
200
150
100
August 2016
data publishin
DATA—BY GBIF PARTICIPANT Status May 2016
Other
United States
So
ut
hA
fri
Cos ca
taR
ica
Austra
li a
Denmark Norway
Netherlands
Belgium
Germany
Spain
Norway
Norway
Number of new records published—Top 10 participant Countries Total number of records published—Top 10 Participant Countries
(1 to 31 May 2016) (as of 31 May 2016)
1. United States 3,348,499 6. Belgium 1,620423 1. United States 271,901,500 6. Netherlands 24,241,092
5. Spain 2,238,363 10. South Africa 436,236 5. Australia 37,489,401 10. Spain 13,630,866
NOTE: Datasets are assigned to countries according to the location of the publishing institution,
including aggregated datasets with contributors from many other countries. http://www.gbif.org | 09 JUN 2016
use of gbif.or
DATA DOWNLOAD REQUESTS, BY COUNTRY
1 January – 31 May 2016
Total of
37,552 requests
From 5,131 users in
127 countries, islands
and territories
9 JUN 2016
research us
USE CITATIONS, BY COUNTRY OF AUTHORS
May 2016
1. United States 15 7. Australia 4
2. Germany 9 7. Brazil 4
3. China 5 9. Canada 3
3. France 5 9. Netherlands 3
3. Spain 5 9. South Africa 3
3. United Kingdom 5
Total 2016
1. United States 49 5. Brazil 14
2. Germany 22 5. United Kingdom 14
3. France 18 8. Australia 11
4. China 17 8. Spain 11
5. Mexico 14 10. Canada 10
10 JUN 2016
research us
RESEARCH EXAMPLES (FOR NORWAY)
• Araújo R, Assis J, Aguillar R, Airoldi L, Bárbara I, Bartsch I, Bekkby T et al. (2016)
Status, trends and drivers of kelp forests in Europe: an expert assessment.
Biodiversity and Conservation 25(7) 1319-1348.
• Jb N (2016)
Some interesting lichenized fungi from old Fraxinus excelsior and Ulmus glabra in
Norway, including four new country records. Graphis Scripta 28(1-2) 17-21.
hGp://www.gbif.org/country/NO/publica2ons
A complete archive of research citing use of GBIF can be accessed at http://www.mendeley.com/groups/1068301/gbif-public-library
10 JUN 2016
GBIF portal:
hGp://www.gbif.org/country/NO
Danmark Finland
Norway Sweden
• Registry
informa2on about the datasets, organiza2ons (e.g. data
publishers), networks and the means to access them (technical
endpoints)
• Species
informa2on about species and higher taxa, and u2lity services for
interpre2ng names and looking up the iden2fiers (access to all
published checklists in the GBIF checklist bank)
• Occurrence
occurrence informa2on crawled and indexed by GBIF and search
services to do real 2me paged search and asynchronous
download services to do large batch downloads
• Maps
simple services to show the maps of GBIF mobilized content
API EXAMPLE : DATASET
http://www.gbif.org/developer/registry
API EXAMPLE : SPECIES
List all name usages (across all checklists):
http://api.gbif.org/v1/species?name=Beta%20vulgaris
http://www.gbif.org/developer/species
API EXAMPLE : OCCURRENCE
http://www.gbif.org/developer/occurrence
API EXAMPLE : DOWNLOAD DATA
Lookup speciesKey (1) and download occurrences (2):
http://api.gbif.org/v1/species/match?
verbose=false&kingdom=Plantae&name=Beta+vulgaris
=> usageKey/speciesKey = 5383920
http://api.gbif.org/v1/occurrence/search?
taxonKey=5383920 [&limit=1000&offset=0]
=> notice: count = 25 513
=> then: page through results…
(using offset & limit)
http://api.gbif.org/v1/occurrence/download/request
[POST] => downloadKey (see next slide)
API EXAMPLE : ASYNCHRONOUS (1)
Request asynchronous download:
function gbifapi {
curl -i –user yourGbifUserName:yourGbifPassword -H "Content-Type:
application/json" -H "Accept: application/json" -X POST -d "{\"creator\":
\”yourGbifUserName\", \"notification_address\": [\”[email protected]\"],
\"predicate\": {\"type\":\"and\", \"predicates\": [{\"type\":\"equals\",\"key\":
\"HAS_COORDINATE\",\"value\":\"true\"}, {\"type\":\"equals\", \"key\":
\"TAXON_KEY\", \"value\":\"$1\"}] }}" http://api.gbif.org/v1/occurrence/
download/request >> log.txt
echo -e "\r\n$1 $2\r\n\r\n----------------\r\n\r\n" >> log.txt
}
function gbifwget {
echo -e "\n\n----------------\n$1 $2 $3\n" >> log_wget.txt
wget http://api.gbif.org/v1/occurrence/download/request/$1.zip 2>&1 | tee /
dev/tty >> log_wget.txt
mv $1.zip ./dwca/$2.zip 2>&1 | tee /dev/tty >> log_wget.txt
}
(work in progress…)
Slide by Daniel Amariles, 2013
This service is intended for use with commonly used map clients such
as the Google Maps API, Leaflet JS library or Modest maps JS library.
hGp://leafletjs.com/
hGp://modestmaps.com/
These libraries allow the GBIF layers to be visualized with other
content, such as those coming from Web Map Service (WMS)
providers. It should be noted that the mapping API is not a WMS
service, nor does it support WFS capabili2es.
USEFUL TOOLS (JSON & REST)
REST client …
JSON client/parser …
JSONView (Firefox, Chrome, …)
http://jsonview.com/
Display formatted JSON in browser
R CRAN : jsonlite
http://cran.r-project.org/web/packages/jsonlite/
E.g. read json into a dataframe [link]
OpenRefine
http://openrefine.org/
ROPENSCI : RGBIF
library(rgbif)
key <- name_backbone(name='Hepatica nobilis', kingdom=‘Plantae')$speciesKey
sp <- occ_search(taxonKey=key, return='data', hasCoordinate=TRUE, limit=1000)
gbifmap(sp)
R CRAN
https://github.com/ropensci
http://ropensci.org/packages/
http://ropensci.org/tutorials/rgbif_tutorial.html
http://ropensci.org/tutorials/taxize_tutorial.html
RASTER : WORLDCLIM, BIOCLIM LAYERS
# using GBIF data (bv) from the previous slide…
library(raster)
xy <- cbind('lon'=bv$decimalLongitude, 'lat'=bv$decimalLatitude);
env <- getData('worldclim', var='bio', res=10) # bioclim (pkg raster)
plot(env, 1) # plot the first bioclim layer
points(xy[,'lon'], xy[,'lat'], col='red') # plot points
bio <- extract(env, xy); # extract environment to points (pkg raster)
bv_bio <- cbind(bv, bio); # column-bind GBIF-data and bioclim
ROPENSCI : RWBCLIMATE
library(rWBclimate, ggplot2)
country_dat <- get_historical_temp(c("NOR", "SWE", "DNK", "FIN"), "year")
ggplot(country_dat, aes(x = year, y = data, group = locator)) +
theme_bw(base_size=18) + geom_point() + geom_path() +
labs(y="Average annual temperature of Nordic countries", x="Year") +
stat_smooth(se = F, colour = "black") +
facet_wrap(~locator, scale = "free")
RESOLVE TAXONOMIC NAMES
library(taxize) # rOpenSci Taxize
gnr <- gnr_resolve(names = "Beta vuulgariss") # Misspelled name
gnr$results # display suggested names
submitted_name matched_name data_source_title score
1 Beta vuulgariss Beta vulgaris L. Catalogue of Life 0.75
2 Beta vuulgariss Beta vulgaris L. ITIS 0.75
3 Beta vuulgariss Beta vulgaris NCBI 0.75
4 Beta vuulgariss Beta vulgaris var.-gr. crassa Alef. GRIN Taxonomy for Plants 0.75
db = ’i2s'
db = ’col'
library(EML, rfigshare)