Skip to content

Commit

Permalink
Update metric documentation for area_proportion
Browse files Browse the repository at this point in the history
  • Loading branch information
KellyMWhitehead committed Apr 8, 2024
1 parent 9a053d1 commit aeed195
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
15 changes: 12 additions & 3 deletions docs/content/page/technical-reference/managing_metrics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ New and edited metrics can be imported into a QRiS Project:

### Metadata

Metadata is additional information about the metric. Some metadata fields are used to set constraints on manually entered metric values, such as min_value, max_value, and precision.

| Field Name | Description |
|------------|-----------------------------------------------------------------------------------------------|
| min_value | (Optional) Minimum value for manually entered metric values |
Expand All @@ -85,28 +87,35 @@ New and edited metrics can be imported into a QRiS Project:

### Layer

Layers refer to DCE layers that are used in the metric calculation. Each layer must have a `layer_name` and can have additional parameters such as `usage`, `count_field`, and `attribute_filter`.

| Field Name | Description |
|------------------|-----------------------------------------------------------------------------------------------|
| layer_name | Name of the DCE layer |
| usage | (Optional, Required for some calculations) The usage of the layer in the calculation. (e.g. "denominator for area_proportion)|
| count_field | (Optional) For count calculations, the field to count |
| [attribute_filter](#attribute-filter)| (Optional) Filter to apply to the layer |

### Attribute Filter

Attribute filters can be applied to a layer to filter by a specific field and list of values.

| Field Name | Description |
|------------|-----------------------------------------------------------------------------------------------|
| field_name | (Required if attribute_filter is used) Field to filter on |
| values | (Required if attribute_filter is used) List of values to filter on |
| field_name | (Required) Field to filter on |
| values | (Required) List of values to filter on |

### Surfaces

Surfaces are raster datasets that can be used in the metric calculation. Each surface must have a `surface_name` which refers to the name of the [analysis parameter](#analysis-parameters) of the surface. The user will specify the actual raster to use for the analysis parameter when creating the analysis.

| Field Name | Description |
|------------|-----------------------------------------------------------------------------------------------|
| surface_name | Name of the [analysis parameter](#analysis-parameters) of the surface. Currently only dem is supprted for use with the gradient calculation. |

### Analysis Parameters

Analysis parameters are non-dce layers and rasters that can be used in the metric calculation. The user must specify the layer or surface to use for each analysis parameter when creating the analyis.
Analysis parameters are non-dce layers and rasters that can be used in the metric calculation. The user will specify the layer or surface to use for each analysis parameter when creating the analyis.

| Analysis Parameter | Description |
|--------------------|-----------------------------------------------------------------------------------------------|
Expand Down
14 changes: 14 additions & 0 deletions docs/content/page/technical-reference/metric_calculations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,19 @@ metric params:
- `layers`: A list of one DCE [layer](../managing_metrics#layers) to calculate gradient from.
- `surfaces`: a list of one `dem` [surface](../managing_metrics#surfaces) to use for elevation data.

## Area Proportion
The area proportion calculation calculates the proportion of the area of a polygon feature that falls within the sample frame or other specified layers.

calculation_name: `area_proportion`

metric params:
- `layers`: A list of DCE [layers](../managing_metrics#layers) to calculate area proportions from.

Each layer can have the following parameters:
- `usage`: An optional field which represents that the layer should be used as a `nominator` or `denominator` in the calculation.
- If not provided for a layer, then the layer will be used as a `nominator`.
- If no `denominator` is provided, the sample frame area will be used as the denominator.
- `attribute_filter`: An optional [attribute filter](../managing_metrics#attribute-filters) to apply to the DCE layers.


*additional calculations will be added as needed*
8 changes: 8 additions & 0 deletions docs/gatsby-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ module.exports = {
{
title: 'Database',
url: '/technical-reference/database',
},
{
title: 'Managing Metrics',
url: '/technical-reference/managing_metrics',
},
{
title: 'Metric Calculations',
url: '/technical-reference/metric_calculations',
}
],
}
Expand Down

0 comments on commit aeed195

Please sign in to comment.