image_info: Fetch information about an image, given its image ID

Description Usage Arguments Value See Also Examples

Description

Note that there is currently no web service that provides image information, and so we are scraping results from pages of the form https://images.nbnatlas.org/image/details?imageId=id. This web scraping may be fragile, and will be replaced by a web-service-based function when one becomes available.

Usage

1
image_info(id, image_number, verbose = nbn_config()$verbose)

Arguments

id

character: IDs of images (e.g. as returned by occurrences in the imageUrl column). Each ID will be of a format something like "84654e14-dc35-4486-9e7c-40eb2f8d3faa"

image_number

character or numeric: ID numbers of images (e.g. as returned by NBN's image search at https://images.nbnatlas.org/. Each image_number will be of a format something like 122218480

verbose

logical: show additional progress information? [default is set by nbn_config()]

Value

A data.frame with one row per id, and at least the columns imageIdentifier and imageURL

See Also

nbn_config occurrences

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
## Using IDs returned from occurrences() function

image_info(id = c("eeadbb65-5509-4e55-9b3d-bd9bfb99f76c",
  "2f61274d-c397-4d24-ac9a-43fac921e43f"))
  
## Using image numbers found on images.nbnatlas.org

image_info(c(image_number=5881156))

## End(Not run)

fozy81/NBN4R documentation built on May 19, 2019, 8:22 a.m.