If you want to run downloads using
rgbif::occ_download(), you need…
- user : GBIF username
- pwd : GBIF password
- email : Your E-mail
Saving these inline in a script file is not usually the best option because you might forget your password is in some file and share it to a public repository like GitHub, Zenodo, or Dryad.
Not a great idea
user = "jwaller" pwd = "please_dont_steal_my_password_123" email = "firstname.lastname@example.org" rgbif::occ_download( pred("country", "US"), user=user,pwd=pwd,email=email )
The best way to allow rgbif access to your GBIF credentials is to save them in your
.Renviron file, since users typically don’t share this file with others.
The easiest way to edit this file is by running
Edit your .Renviron to look like this:
GBIF_USER="jwaller" GBIF_PWD="safe_fake_password123" GBIF_EMAIL="email@example.com"
Now you should be able to run
rgbif::occ_download() with no user, pwd, or email!!