Skip to content

SrivastavaLab/bwgdata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Obtaining data from the BWG database

last updated Andrew, Diane, Sandra Feb 2024

A simple package to access our (currently private) API for the bromelaid working group database.

Installation

This package is not yet on CRAN. To install directly from github, use devtools:

library(devtools)
install_github("Srivastavalab/bwgdata")

If you don't have devtools, you can try the much more lightweight ghit

install.packages(ghit)
library(ghit)
install_github("Srivastavalab/bwgdata")

usage

Before accessing data from our database, you'll need a valid username and password.

Step 1: Authenticate

First, you need to tell R your username and password:

library(bwgdata)
bwg_auth()

You will be prompted for your username and your password. The latter will be "masked" to protect your privacy. After entering your password, one of two things will happen:

  • nothing. This means that you have access to the data!
  • Forbidden (HTTP 403) this means that you have either misspelt your password, or you don't have permission to use these data.

If some third thing happens, please tell me! This would be very unusual.

Step 2: access data

Right now there's only one data-obtaining function:

bwg_get("datasets")

bwg_get("visits")

bwg_get("bromeliads")

There are two ways of getting the species: with or without the Tachet traits:

# just the species pls
bwg_get("species")

# both species and traits
bwg_get("species", list(traits = "true"))

About

A simple package to access our (currently private) API for the bromelaid working group database

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages