Skip to content

Commit

Permalink
SVG3
Browse files Browse the repository at this point in the history
  • Loading branch information
vicjulrin committed Jul 2, 2024
1 parent 502c32f commit 67c6e9d
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 46 deletions.
6 changes: 3 additions & 3 deletions workflows_docs/pipelines/Camtrap_occ_model/README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ author:
affiliation: "Instituto de Investigación de Recursos Biológicos Alexander von Humboldt - IAvH"
output:
#md_document:
md_document:
github_document:
md_extension: +gfm_auto_identifiers
preserve_yaml: true
toc: true
Expand All @@ -30,11 +30,11 @@ If you already have a consolidated file that includes site and detection variabl

This workflow loads and adjusts spatial covariates of site/landscape to the study area. For this, it loads raster files from your local computer and from STAC repositories. If you want to load files as covariates only from the local machine, use pipeline X, and if you want to load only covariates from the STAC, consult pipeline Y.





<div style="width: 100%; overflow-x: auto;">

<div style="width: 50%; overflow-x: auto;">
<img src="README_figures/full_workflow.svg" alt="Descripción de la imagen" style="max-width: none;">
</div>
Para faciltiar la visualizacion del pipeline descarga la version svg aca
Expand Down
94 changes: 51 additions & 43 deletions workflows_docs/pipelines/Camtrap_occ_model/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,24 @@ author:
affiliation: "Instituto de Investigación de Recursos Biológicos Alexander von Humboldt - IAvH"
output:
#md_document:
md_document:
github_document:
md_extension: +gfm_auto_identifiers
preserve_yaml: true
toc: true
toc_depth: 6
---

- [Section 1: Loading and organizing camera trap
data](#section-1-loading-and-organizing-camera-trap-data)
- [Section 2: Generation of the detection matrix and unmarked
format](#section-2-generation-of-the-detection-matrix-and-unmarked-format)
- [Section 3: Loading and organizing spatial inputs as site
covariates](#section-3-loading-and-organizing-spatial-inputs-as-site-covariates)
Camtrap_occ_model pipeline - Estimating Occupancy Models from Camera
Trap Data Pipeline
================
truetruetrue

- [Section 1: Loading and organizing camera trap
data](#section-1-loading-and-organizing-camera-trap-data)
- [Section 2: Generation of the detection matrix and unmarked
format](#section-2-generation-of-the-detection-matrix-and-unmarked-format)
- [Section 3: Loading and organizing spatial inputs as site
covariates](#section-3-loading-and-organizing-spatial-inputs-as-site-covariates)

This pipeline is designed to estimate occupancy models from camera trap
data. The main inputs required to run it are record files (1.1) and
Expand Down Expand Up @@ -51,27 +56,31 @@ and from STAC repositories. If you want to load files as covariates only
from the local machine, use pipeline X, and if you want to load only
covariates from the STAC, consult pipeline Y.

<div style="width: 50%; overflow-x: auto;">

<img src="README_figures/full_workflow.svg" alt="Descripción de la imagen" style="max-width: none;">

</div>

Para faciltiar la visualizacion del pipeline descarga la version svg aca

Sections 1 and 2 mostly refer to column names of input files to execute
the analysis.

### Section 1: Loading and organizing camera trap data

- 1.1: Path to the CSV file with record data (default:
/inputs/camtrap\_records.csv).
- 1.2: Path to the file with sampling data (default:
/inputs/camtrap\_sp\_covs.csv).
- 1.3: Name of the column referring to the scientific name of species
(default: scientificName).
- 1.4: Name of the column referring to the camera site (default:
Cam\_Site).
- 1.5: Name of the common column with the camera trap ID (default:
Cam\_Site).
- 1.6: Name of the column with longitude (default: Long\_Y).
- 1.7: Name of the column with latitude (default: Lat\_X).
- 1.1: Path to the CSV file with record data (default:
/inputs/camtrap_records.csv).
- 1.2: Path to the file with sampling data (default:
/inputs/camtrap_sp_covs.csv).
- 1.3: Name of the column referring to the scientific name of species
(default: scientificName).
- 1.4: Name of the column referring to the camera site (default:
Cam_Site).
- 1.5: Name of the common column with the camera trap ID (default:
Cam_Site).
- 1.6: Name of the column with longitude (default: Long_Y).
- 1.7: Name of the column with latitude (default: Lat_X).

The main input for section 1 is the paths to the CSV files of records
(1.1) and sampling data (1.2) associated with camera trap surveys. The
Expand All @@ -82,15 +91,15 @@ and time (2.2) of records.

Inputs 1.3 and 1.4 are used in FilterData to obtain only the records of
the species of interest, while 2.1 and 2.2 will be necessary in
CamTrap\_format as metadata for date and time to organize events in the
CamTrap_format as metadata for date and time to organize events in the
detection matrix.

Both the record file (1.1) and the sampling data file (1.2) must have a
common column (1.5) specifying a unique ID for each camera trap that
will be used to merge these files into one compiled through
Join\_datasets. This common column (1.5) will also be used as a unique
Join_datasets. This common column (1.5) will also be used as a unique
identification of camera traps for the detection matrix in
CamTrap\_format.
CamTrap_format.

The sampling data file (1.2) must contain columns referring to the
longitude (1.6) and latitude (1.7) coordinates of the camera trap
Expand All @@ -100,28 +109,28 @@ coordinate format specified in input 3.3 and will allow the data table
to be spatialized to add spatial covariates to the records. The columns
for installation date (2.3) and removal (2.4) are also necessary to
organize the sequence of events in the detection matrix in
CamTrap\_format.
CamTrap_format.

## Section 2: Generation of the detection matrix and unmarked format

2.1: Name of the column with the event date (default: eventDate). 2.2:
Name of the column with the event time (default: eventTime). 2.3: Name
of the column with the installation date (default: Instal.Date). 2.4:
Name of the column with the last event date (default: Last.eventDate).
2.5: Name of the observation variables (default: eventTime|1|hour). If
2.5: Name of the observation variables (default: eventTime\|1\|hour). If
NULL, it is ignored. Several can be specified separated by commas
(default: eventTime|1|hour, effort|1, moonPhase). If only the name is
(default: eventTime\|1\|hour, effort\|1, moonPhase). If only the name is
specified, the variable collapses according to unique values. If the
specified variable column is numeric, it rounds using
name|rounding\_value, and if it is temporal with
name|rounding\_value|time\_unit. Factors are not rounded. Temporal units
name\|rounding_value, and if it is temporal with
name\|rounding_value\|time_unit. Factors are not rounded. Temporal units
can be specified according to all formats detailed in
lubridate::round\_date. Specification errors will result in them being
lubridate::round_date. Specification errors will result in them being
ignored. 2.6: Time interval in days in which detections are grouped or
collapsed as sampling events (default: 6). 2.7: Minimum number of events
per site to include in the detection matrix (default: 7). Input 2.5
refers to observation covariates (e.g., time, moon phase, weather) that
will be used in CamTrap\_format and occ\_model\_results to organize the
will be used in CamTrap_format and occ_model_results to organize the
detection matrix and estimate the occupancy model. These must correspond
to column names in the record files (1.1) or sampling data (1.2),
otherwise, they will be omitted. When specifying, the column name must
Expand All @@ -130,13 +139,13 @@ for the same site, they must be grouped/collapsed for the correct
organization of the unmarked object, which receives unique entries per
site. When only the name is given, it will collapse in unmarked by the
number of unique values of that column, or if it is numeric, it can be
rounded specifying it as name|rounding value (e.g., eventTime|1). When
rounded specifying it as name\|rounding value (e.g., eventTime\|1). When
they are factors, they are not rounded. Numeric variables are specified
with the variable name and the rounding factor in the form eventTime|1,
with the variable name and the rounding factor in the form eventTime\|1,
where 1 is the rounding value. Temporal variables are accepted and
rounded by adding a third temporal unit factor in the form
eventTime|1|hour, where hour is the rounding unit. Temporal units from
lubridate::round\_date are accepted.
eventTime\|1\|hour, where hour is the rounding unit. Temporal units from
lubridate::round_date are accepted.

Inputs 2.6 and 2.7 are numerical arguments for the CamTrapFormat box
that organize the detection matrix and the unmarked object. Input 2.6
Expand All @@ -150,11 +159,11 @@ excluded from the matrix and the unmarked object.

3.1: Path to the vector file of the study area (default:
/inputs/Putumayo.gpkg). 3.2: Name to be given to the base raster of the
study area (default: ID\_grid). 3.3: EPSG numerical coordinate system to
study area (default: ID_grid). 3.3: EPSG numerical coordinate system to
which the base raster will be adjusted (default: 4326). 3.4: Numerical
resolution value in meters to which the base raster will be adjusted
(default: 1000). 3.5: Path to the folder where the raster files of the
landscape covariates are located (default: /inputs/Putumayo\_layers). If
landscape covariates are located (default: /inputs/Putumayo_layers). If
set to NULL, no layers are loaded from the local machine. 3.6: Path to
the STAC repository where the landscape covariates of interest are
located (default: <https://io.biodiv/>). If set to NULL, no layers are
Expand All @@ -163,7 +172,7 @@ of the specified STAC repository of the landscape covariates of
interest. Ignored if 3.6 is NULL. The inputs in section 3 correspond to
cartographic parameters of the study area. The main input required is
the path to a vector file of the study area (3.1). This file is used as
a base mask in studyarea\_to\_grid to generate the base raster grid that
a base mask in studyarea_to_grid to generate the base raster grid that
will support the analysis and will have parameters such as a name given
in 3.2, numerical EPSG cartographic projection defined in 3.3, and
spatial resolution in meters defined in 3.4.
Expand All @@ -175,16 +184,15 @@ repositories.

To load covariates from a local repository, the folder path must be
specified in 3.5 where the raster files are stored. The
AlignRasters\_ToGrid box will load those files and align them to the
base grid.
AlignRasters_ToGrid box will load those files and align them to the base
grid.

To load covariates from the STAC repository, the STAC URL must be
defined in 3.6 and in 3.7 the name of the collection and the required
layer, separated by | in the form collection|layer. Multiple layers can
be specified, separated by commas. The Stac\_From\_Grid box will load
layer, separated by \| in the form collection\|layer. Multiple layers
can be specified, separated by commas. The Stac_From_Grid box will load
those layers online and align them to the base raster.

The information of the covariates is incorporated into the spatial
dataset obtained from poins\_data\_to\_spatial through the add\_covs
box, which adds the values of the loaded raster covariates as new
columns
dataset obtained from poins_data_to_spatial through the add_covs box,
which adds the values of the loaded raster covariates as new columns

0 comments on commit 67c6e9d

Please sign in to comment.