Skip to content

Instantly share code, notes, and snippets.

@sckott
Created September 25, 2012 19:52
Show Gist options
  • Save sckott/3784050 to your computer and use it in GitHub Desktop.
Save sckott/3784050 to your computer and use it in GitHub Desktop.
Example of getting a provider key and running occurrence list with the key.
install_github('rgbif', 'schamberlain') # my branch is the newest
library(rgbif)
providers(name="UK National Biodiversity Network") # get numeric key for the NBN
> occurrencelist(sciname="Ursus", dataproviderkey=172, latlongdf=T) # should give you a data.frame like below
taxonName country decimalLatitude decimalLongitude catalogNumber earliestDateCollected latestDateCollected
1 Abietinaria abietina GB 59.01977 -2.9031110 13389886 1995-06-20 1995-06-20
2 Abietinaria abietina GB 60.84050 -0.9006389 13389540 1988-06-02 1988-06-02
3 Abietinaria abietina GB 56.55398 -5.4213445 13389523 1989-06-18 1989-06-18
4 Abra alba GB 49.91424 -6.3364116 13392162 1988-09-19 1988-09-19
5 Abietinaria abietina GB 56.00279 -2.4305848 13389825 1992-06-19 1992-06-19
6 Abra alba GB 60.19654 -1.2830132 13392098 1989-06-13 1989-06-13
7 Abludomelita obtusata GB 51.50376 0.7487812 13390578 1996-06-01 1996-06-01
8 Abietinaria abietina GB 53.15443 -4.2652028 13389810 1982-06-05 1982-06-05
9 Abra alba GB 49.95960 -6.3265428 13392149 1983-07-14 1983-07-14
10 Abietinaria abietina GB 49.95699 -5.2188723 13389902 1994-07-29 1994-07-29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment