Skip to contents

Writes a Camera Trap Data Package and its related Data Resources to disk as a datapackage.json and CSV files.

Usage

write_camtrapdp(x, directory, ...)

Arguments

x

Camera Trap Data Package object, as returned by read_camtrapdp().

directory

Path to local directory to write files to.

...

Further arguments, passed to frictionless::write_package() (e.g. compress = TRUE).

Value

datapackage.json and CSV files written to disk.

Examples

x <- example_dataset()

# Filter (and therefore change) the dataset
x <- filter_deployments(x, deploymentID == "00a2c20d")

# Write the Camera Trap Data Package to disk
write_camtrapdp(x, directory = "my_directory")

# Check files
list.files("my_directory")
#> [1] "datapackage.json" "deployments.csv"  "media.csv"        "observations.csv"

# Clean up (don't do this if you want to keep your files)
unlink("my_directory", recursive = TRUE)