This demo shows you how to search and pull data from Wildbook framework with RWildbook package. In this demo, all datasets below are searching for the same set of data which is all the encounter of individual "A-001" in "whaleshark.org".
The searchWB function provides the main interface to the Wilbook framework and can be used in one of three ways.
data1 <- searchWB(username="username", password="password", baseURL ="whaleshark.org", object="Encounter", individualID=c("A-001"))
data2<- searchWB(username="username", password="password", baseURL ="whaleshark.org", jdoql="SELECT FROM org.ecocean.Encounter WHERE individualID == 'A-001'")
If you are using Windows then you can enter the username and password directly in the search URL like this:
data3 <- searchWB(searchURL = "https://username:password@whaleshark.org/rest/jdoql?SELECT FROM org.ecocean.Encounter WHERE individualID == 'A-001'")
Otherwise, on MacOS or Linux you will need to supply your username and password as separate arguements:
data3 <- searchWB(username = "username", password = "password", searchURL = "https://www.whaleshark.org/rest/jdoql?SELECT FROM org.ecocean.Encounter WHERE individualID == 'A-001'")
All of these return a data frame like the following (note that the data has been altered for anonymity):
data("vignette_1_data",package="RWildbook") head(vignette_1_data)[,c("location","year","month","day")]
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.