<!-- This is a template for how to document the indicator analyses. 

Make a copy of this file and store it in the root folder (same as where this template is stored) folder. 
Name te file DRAFT_myIndicatorName.Rmd. 

Because this is a stand-alone Rmd file inside a bookdown project, in order to knit the file for preview purposes,
you need to type rmarkdown::render("template.Rmd") in the console, 
as the the usual Ctrl + Alt + k will not work. 

Make sure also to not change the order, or modify the headers, unless you really need to. This is because it
easier to read the web page as a whole of the indicators are presented using the same layout. 

When the analyses is complete, Anders Kolstad, or someone else, will perform a rapid code review, making sure 
the analysis is repeatable by someone else. Be therefore very careful to annotate 
and comment on every step in the analysis. When completed, Anders will make a copy
of the working file and put it in the same project root folder, but removing the 'DRAFT_' part of the name. 
After modifying it slightly (mainly removing the top YAML header and updating the rmd_files argument in '_bookdown.yml') 
the output will become available on the website (https://ninanor.github.io/ecosystemCondition/). -->


<!-- Examples: 

For an example, see 'indicators/breareal-workingFile.Rmd' 
and the subsequent 'breareal.Rmd' 
which again, when rendered, produces this:
https://ninanor.github.io/ecosystemCondition/areal-av-isbreer.html

Notice the degree of annotation.

-->


<!-- Replace 'indicator name' with yor own indicator name  -->
# Indicator name

<br />

_Author and date:_
<!-- Write your name, month and year -->


<br />

<!-- Load all you dependencies here -->
```{r setup, include=FALSE}
library(knitr)
knitr::opts_chunk$set(echo = TRUE)
```


<!-- Fill in which ecosystem the indicator belongs to, as well as the ecosystem characteristic it should be linked to. It's OK to use some Norwegian here -->
```{r, echo=F}
Ecosystem <- "" # e.g. "Skog og fjell"
Egenskap  <- "" # e.g. "Primærproduksjon"
ECT       <- "" # e.g. "Structural state characteristic"
Contact   <- "" # e.g. "Anders Kolstad"
```

```{r, echo=F}
metaData <- data.frame(Ecosystem,
                       "Økologisk egenskap" = Egenskap,
                       "ECT class" = ECT)
knitr::kable(metaData)
```

<!-- Don't remove these three html lines -->
<br />
<br />
<hr />



<!-- Document you work below. Try not to change  the headers too much. Data can be stored on NINA server. Since the book is rendered on the R Server this works fine, but note that directory paths are different on the server compared to you local machine. If it is not too big you may store under /data/ on this repository -->

## Introduction
<!-- Text here -->

## About the underlying data
<!-- Text here -->


### Representativity in time and space
<!-- Text here -->

### Original units
<!-- Text here -->


### Temporal coverage
<!-- Text here -->


### Aditional comments about the dataset
<!-- Text here -->


## Ecosystem characteristic
### Norwegain standard
<!-- Text here -->

### SEEA EA (UN standard)
<!-- Text here. Note that there are two parallell systems for defining ecosystem properties - one Norwegian and one international (SEEA EA). See man/SEEA EA examples.pdf for help -->

## Collinearities with other indicators
<!-- Text here -->

## Reference condition and values
### Reference condition
<!-- Text here. Note that the reference condition is defined in Fagsystemet for økologisk tilstand and it is the same for all indicators and ecosystems. So you can give a short and generic answer here. -->


### Reference values, thresholds for defining _good ecological condition_, minimum and/or maximum values
<!-- Text here -->


## Uncertainties
<!-- Text here -->

## References
<!-- Text here -->


## Analyses
### Data sets
<!-- Text here -->


#### Data set A
<!-- Text here -->


#### Data set B
<!-- Text here -->

#### Regions
<!-- In case you need to map the indicator value to regions, you can do that here. Remove this chapter if not relevant. -->
Importing a shape file with the regional delineation. 
```{r}
#reg <- sf::st_read("data/regions.shp")
#st_crs(reg)
```

### Scaled indicator values
<!-- Text and analyses here -->

### Uncertainty
<!-- Text here -->


## Prepare export
<!-- Text here -->


### Eksport file (final product)
<!-- Export final file. Ideally a georeferenced shape or raster wit indicators values (raw and normalised), reference values and errors. -->




