The aim of this package is to download species presences (occurrences) data from public repositories. For now it is implemented for Bioatles, which has data from the Balearic Islands (http://bioatles.caib.es), and for GBIF.
Bioatles data is projected in European Datum 1950 (31N). The function bioatles(), which downloads the occurrences, also transform the data set in Lat/Long Geographic Coordinates System WGS84. It is based on several functions included in the packages "rvest" (Wickham, 2016) and "xml2" (Wickham et al., 2017). Finally, it saves the data in a csv file.
Equally, GetBIF() is used to download species occurrences from GBIF. It is based on several functions included in the package "rgbif" (Chamberlain, 2017). It uses the so-called "/occurrence/download route" (see vignettes of the "rgbif" package) which is more appropriate for big data sets. GetBIF() retrieve your GBIF credentials (user, password and email) and automatically makes checks using a loop until the request of the data set made to GBIF is ready. In that moment it starts the download. Finally, it saves the data in a csv file. The data is in Lat/Long Geographic Coordinates System WGS84.
This vignette is just an example of how to use the package.
library("PreSPickR")
You can pass the list of species names to be downloaded in a .csv
file (without header) or as a vector. Make sure that the spelling is correct!
bioatles(sp_list = "species_bioatles.csv")
bioatles(sp_list = c("Chamaerops humilis", "Asphodelus aestivus"))
You can also pass the arguments sp_dir
to specify the directory of the file and out_name
for the the output name of the downloaded file.
GetBIF(credentials = "~/gbif_credentials.RData", sp_list = "species_gbif.csv", out_name = "sp_records_gbif")
Your GBIF credentials can be stored in a .RData
or passed to the function using the arguments gbif_usr
, gbif_pwrd
and email
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.