Movatterモバイル変換


[0]ホーム

URL:


FlickrAPI

CRAN statusCRAN RStudio mirror downloadstotal downloadsLifecycle: stable

The goal of FlickrAPI is to provide an interface to theFlickr API and allow Rusers 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 localenvironment variable usingsetFlickrAPIKey(api_key = "YOUR_API_KEY_HERE", install = TRUE).The Flickr API is available for non-commercial use by outside developersand is only available for commercial use under prior arrangements.Reviewthe FlickrAPI documentation,APIOverview, orFlickr DeveloperGuide for more information.

Example

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

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

For more information about any individual image, you can usegetPhotoInfo() or thegetExif() function.

photo_info<-getPhotoInfo(photo_id = photos$id[1],output ="tags")knitr::kable(photo_info[c(1:2),])
50693818@N0850693818@N08
idauthorauthornamerawcontentmachine_tag
50601005-51924677769-83469Grand Canyon NPSDesert Viewdesertview0
50601005-51924677769-26960Grand 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,])
50281068@N08
idownersecretserverfarmtitleispublicisfriendisfamilyimg_urlimg_heightimg_widthimg_asp
51958193894ca8e35eb2b6553566Cats Of Mei Ling100https://live.staticflickr.com/65535/51958193894_ca8e35eb2b_s.jpg75751

See also


[8]ページ先頭

©2009-2025 Movatter.jp