knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-", message = FALSE) library(nestboxphotos)
This package contains functions for repeatedly downloading SD card images (from trail cameras inside American kestrel nest boxes), determining which photos are actually new to the research drive, copying new photos into the drive, and renaming them by nest box ID and datetime for the Full Cycle Phenology Project.
The nestboxphotos package requires you to have R and RStudio installed. After that, it's simple to install and load the nestboxphotos package.
# If devtools package is not installed install.packages("devtools", dependencies = TRUE) # Now install and load nestboxphotos devtools::install_github("jaymwin/nestboxphotos") library(nestboxphotos)
Copy the 'DCIM' folder from each SD card into its respective nest box folder in the 'photos_to_upload' folder. Directories must be organized this way or the code will stop (for Spypoint and Reconyx cameras):
photos_to_upload/AK/AK01/DCIM/100DSCIM/PICT0001.JPG
photos_to_upload/NM/NM18/DCIM/100RECNX/IMG_0001.JPG
# if using a Mac this is the research drive path macbook <- '/Volumes/Research/HeathLab/American Kestrel projects/Full_Cycle_Phenology/' # for windows, this is the path windows <- 'Z:/HeathLab/American Kestrel projects/Full_Cycle_Phenology/' year_for_photos <- 2019 # year of nest box monitoring directory_to_drive <- macbook # this is the folder that contains upload/raw/renamed folders ggplot_location <- '/Users/Jay/Desktop' # path where you want to export the timeline plot # this will create file paths to photo folders setup_directories(year_for_photos)
# this will break if folder hierarchy is not correct update_photos( directory_to_drive, year_for_photos, photos_to_upload, raw_photo_location, renamed_photo_location )
plot_photo_timeline(directory_to_drive, renamed_photo_location, ggplot_location)
delete_redundant_photos(directory_to_drive, photos_to_upload)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.