download_species_pdfs: Download all PDF documents from NMFS for a species

Description Usage Arguments Details Value Examples

Description

Download all PDF documents from NMFS for a species

Usage

1

Arguments

url

The URL to query for PDF links

subd

The directory (subdirectory) to which the PDFs are downloaded

Details

Uses get_species_pdf_urls to fetch a vector of PDF URLs for species documents maintained by the National Marine Fisheries Service (NMFS). Filenames are the basename of the URL with spaces replaced by "_". Uses pdfdown, which returns a data.frame of results, to do the scraping.

Value

An augmented data.frame from pdfdown with:

url

Document URL

dest

Path to document

success

One of Success, Failed, Pre-exist

pdfCheck

TRUE if a real PDF, else FALSE

taxon

The taxon represented, from the URL

Examples

1
2
3
4
5
## Not run: 
  url <- "http://www.nmfs.noaa.gov/pr/species/turtles/green.html"
  dl_res <- get_species_pdfs(url, "~/Downloads/NMFS_rec")

## End(Not run)

jacob-ogre/nmfsscraper documentation built on May 18, 2019, 8:01 a.m.