flickr.photos.search: Search flickr for photos

Description Usage Arguments Value Examples

View source: R/flickrphotossearch.R

Description

An R implementation of flickr.photos.search from the Flickr API. Searches for photos based on user-defined criteria. Some parameters (bbox and extras) allow passing of R objects that are converted to the text input needed by the API.

Usage

1
2
3
flickr.photos.search(api_key, bbox = NULL, extras = c("geo", "tags",
  "date_taken", "url_m"), output = "metadata", .allpages = FALSE,
  .usecache = TRUE, ...)

Arguments

api_key

your personal API key from flickr

bbox

the spatial bounding box from spatial data; output from prettymapr::searchbbox(), sp::bbox() (e.g. bbox=bbox(shp)) or a character string (e.g. bbox='-65,44.5,-64.5,45')

extras

character vector of potential extra fields returned. By default ('geo,tags') returns the geotag information (latitude, longitude, etc) and the photo's tags (keywords). Currently supported fields are: description, license, date_upload, date_taken, owner_name, icon_server, original_format, last_update, geo, tags, machine_tags, o_dims, views, media, path_alias, url_sq, url_t, url_s, url_q, url_m, url_n, url_z, url_c, url_l, url_o

output

character string indicating output type. Either "metadata" (default) for geotagged images, or "total" indicating the total number of records

.allpages

Pass TRUE to return all pages of results (by default only 100 ish results are returned).

.usecache

Pass FALSE to not use cached results.

...

Key/value pairs as defined in the API documentation. text="my search query" is particularly useful.

Value

A data.frame of photo information.

Examples

1
2
3
4
5
library(prettymapr)
bb <- searchbbox("halifax, NS")
photos <- flickr.photos.search(bbox=bb, text="water", min_taken_date="2016-01-01")
photos2 <- flickr.photos.search(bbox=bb, text="water", .allpages=TRUE)
photos3 <- flickr.photos.search(bbox=searchbbox("wolfville, NS"), min_taken_date = "2016-01-01")

remi-daigle/flickRgeotag documentation built on July 14, 2020, 8:37 a.m.