Crates.io | camtrap_dp |
lib.rs | camtrap_dp |
version | 0.1.0 |
source | src |
created_at | 2023-11-22 11:12:22.657408 |
updated_at | 2023-11-22 11:12:22.657408 |
description | CamTrap DP Interface |
homepage | https://github.com/bencevans/camtrap-dp-rs |
repository | https://github.com/bencevans/camtrap-dp-rs |
max_upload_size | |
id | 1045091 |
size | 196,866 |
camtrap_dp
is a Rust crate designed for handling Camera Trap Data Packages as specified by the Camera Trap Data Package standard. It provides a standardized format for describing camera trap deployments and the media files recorded, based on Data Package and Tabular Data Package specifications.
This library streamlines both reading and writing camera trap data, including deployments, media files, and observations derived from these files.
Add camtrap_dp
as a dependency in your Cargo.toml
:
[dependencies]
camtrap_dp = "0.1.0" # Replace with the latest version
Reading deployment and media data example:
use camtrap_dp::{Deployment, Medium, Observation};
// Reading deployment data from a CSV file
let deployments = Deployment::from_file("path/to/deployments.csv").unwrap();
// Reading media data from a URL
let media_data = Medium::from_url("http://example.com/media.csv").unwrap();
// Reading observations from a file
let observations = Observation::from_file("path/to/observations.csv").unwrap();
Writing deployment data to a CSV file example:
// Assuming deployments is a Vec<Deployment> populated with data
deployments.to_file("path/to/output/deployments.csv").unwrap();
Contributions are welcome! Feel free to report issues, suggest features, or submit pull requests on our GitHub repository.
camtrap_dp is licensed under the MIT License - see the LICENSE file for more information.
Thanks to all contributors and the teams behind the Camera Trap Data Package standards.