MyNixOS website logo
Description

Access to Flickr API.

Provides an interface to the Flickr API <https://www.flickr.com/services/api/> and allows R users to download data on Flickr.

FlickrAPI

CRANstatus CRAN RStudio mirrordownloads totaldownloads Lifecycle:stable

The goal of FlickrAPI is to provide an interface to the Flickr API and allow R users to download data on public photos uploaded to Flickr.

Installation

install.packages("FlickrAPI")
# remotes::install_github("koki25ando/FlickrAPI")

After installing, set up a Flickr API key and save it as a local environment variable using setFlickrAPIKey(api_key = "YOUR_API_KEY_HERE", install = TRUE). The Flickr API is available for non-commercial use by outside developers and is only available for commercial use under prior arrangements. Review the Flickr API documentation, API Overview, or Flickr Developer Guide for more information.

Example

You can get photos from any individual user using the getPhotos() function.

library(FlickrAPI)

photos <- getPhotos(user_id = "grand_canyon_nps")
knitr::kable(photos[1,])
idownersecretserverfarmtitleispublicisfriendisfamily
51924677769<50693818@N08>a48d45c811655356603/03/22 Desert View Amphitheater Reconstruction 40389100

For more information about any individual image, you can use getPhotoInfo() or the getExif() function.

photo_info <- getPhotoInfo(photo_id = photos$id[1], output = "tags")
knitr::kable(photo_info[c(1:2),])
idauthorauthornamerawcontentmachine_tag
50601005-51924677769-83469<50693818@N08>Grand Canyon NPSDesert Viewdesertview0
50601005-51924677769-26960<50693818@N08>Grand Canyon NPSAmphitheateramphitheater0
photo_exif <- getExif(photo_id = photos$id[10])
knitr::kable(photo_exif[1,])
tagspacetagspaceidtaglabelrawclean
JFIF0JFIFVersionJFIFVersion1.02NA

You can also search photos by tag and license.

photo_search <- getPhotoSearch(
  sort = "date-taken-desc",
  tags = c("cats", "dogs"),
  per_page = 50)

knitr::kable(photo_search[1,])
idownersecretserverfarmtitleispublicisfriendisfamilyimg_urlimg_heightimg_widthimg_asp
51958193894<50281068@N08>ca8e35eb2b6553566Cats Of Mei Ling100https://live.staticflickr.com/65535/51958193894_ca8e35eb2b_s.jpg75751

See also

Metadata

Version

0.1.0.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows