Example-scripts that use the camtraptor R-package to check a dataset stored in camtrap-dp format
- Setup a login for posit.cloud -- free option here: https://posit.cloud/plans/free
- Make your own cloud-copy of this repo by clicking here: https://posit.cloud/content/7957756
- See user guide for RStudio (similar/same interface as "posit Cloud") for general help
- See below for how to run scripts from this repo
- Install R & RStudio
- Clone this repo -- Or download it by clicking the green Code button, choosing Download ZIP at the end of the drop-down menu, and unzipping the CamtrapCheck-main.zip file.
- Open the R-project in RStudio. (Go to File --> Open project... --> select the "CamtrapCheck.Rproj" file from the unzipped CamtrapCheck-main folder.)
- Install required packages by entering this in the RStudio Console (lower-left panel):
install.packages(c("ggplot2", "hrbrthemes", "plotly", "readr"))
The camtraptor
package is not currently available on CRAN, but it can be installed with devtools::install()
as shown below:
install.packages("devtools")
devtools::install_github("inbo/camtraptor")
- input: camtrap-dp dataset datapackage.json file -- e.g. here
- output: summaries & visual-things
Run the camtrapSandbox.R
script by entering this in the RStudio console: source("camtrapSandbox.R", verbose = TRUE)
![camtrap-dp map](https://private-user-images.githubusercontent.com/8563362/320303444-ee82c730-b9bd-421e-8699-8f22ea272bb4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ4NzU5MDMsIm5iZiI6MTcyNDg3NTYwMywicGF0aCI6Ii84NTYzMzYyLzMyMDMwMzQ0NC1lZTgyYzczMC1iOWJkLTQyMWUtODY5OS04ZjIyZWEyNzJiYjQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjhUMjAwNjQzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZGI4ODk5MmY1MjVmZDhhYjFjNmMxYWE5ZGZiNGY1NTk1NzY5YzU1ZWIwMzlkNTFkM2VjZjU3ZTg3NWZkOGRhOCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.pjgNIebZdRKSBBRCjIJjDedJfXKn7Z9SNk6y5zAEHHA)
- input: 3 CSVs in input_data/tables
- output:
- map/chart of plants in Wild Mile modules (interactive and screenshot)
- plants_in_modules.csv -- consolidated table of which plants are/were where in the Wild Mile modules
Run the gridSandbox.R
script by entering this in the RStudio console: source("gridSandbox.R", verbose = TRUE)
![grid of plants on Wild Mile modules](https://private-user-images.githubusercontent.com/8563362/320303475-49410a9f-1e30-4da5-84cb-a59dbeed5ca7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ4NzU5MDMsIm5iZiI6MTcyNDg3NTYwMywicGF0aCI6Ii84NTYzMzYyLzMyMDMwMzQ3NS00OTQxMGE5Zi0xZTMwLTRkYTUtODRjYi1hNTlkYmVlZDVjYTcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjhUMjAwNjQzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MzRmOWNiYzJhMGJmMTZjMGM5NzNkYTM5OGFjOTdjYzZlMTAzOTA4ODE5MDMwZGU2YTczODA5Mzg1NGRlYzFmMSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.3VXx_SbiGMGLY6t3QN2M-Pa88d7OzaumSt4EYvuQ8Sw)
See a demo of the gridSandbox map here
- Which Camera Trap or other Wild Mile data would it help to tie together?
- How / Where / For whom?
In sdUploader / camtrapPackager.py:
- Need to add camtrap-dp 'sources' to datapackage.json
- Post-observations re-form camtrap-dp to parse out taxa
- address sequenceID? (is that column empty)