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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI0MzU0NzQsIm5iZiI6MTcyMjQzNTE3NCwicGF0aCI6Ii84NTYzMzYyLzMyMDMwMzQ0NC1lZTgyYzczMC1iOWJkLTQyMWUtODY5OS04ZjIyZWEyNzJiYjQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDczMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MzFUMTQxMjU0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Nzk5MGIzYWQ1NjRkY2QyMmRiYWZkMDE2MDM5Y2FjMDhmNDkxNjdiM2QzNGUyYWU5ZmYwYjM3MDVlODViMTViYSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.ADw1fi9tGsOb3Z1z63Ucf-aC-94h4Ec_2YdQLqeVkw4)
- 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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI0MzU0NzQsIm5iZiI6MTcyMjQzNTE3NCwicGF0aCI6Ii84NTYzMzYyLzMyMDMwMzQ3NS00OTQxMGE5Zi0xZTMwLTRkYTUtODRjYi1hNTlkYmVlZDVjYTcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDczMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MzFUMTQxMjU0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OTUyMjcyODkwMjM5YTExZDRjZTg3OTZhMmE2ZDA2NGQzM2NhOTdjZjNjYzU4MmY4NGI0MzVhZjgwOTE4MzIwZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.ZaZ-2a2sCvOfT5OZBs0tpjabPDvBzjxQ7xpNy3TnlXs)
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)