-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
58 lines (49 loc) · 2.79 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
title: "genestdwp [![Travis-CI Build Status](https://travis-ci.org/PauloEduardoCardoso/genestdwp.svg?branch=master)](https://https://travis-ci.org/PauloEduardoCardoso/genestdwp)[![Codecov](https://codecov.io/gh/PauloEduardoCardoso/genestdwp/branch/master/graph/badge.svg)](https://codecov.io/gh/PauloEduardoCardoso/genestdwp?branch=master)[![DOI](https://zenodo.org/badge/237538088.svg)](https://zenodo.org/badge/latestdoi/237538088)"
output: github_document
urlcolor: magenta
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "75%"
)
```
> GenestDwp helps to obtain the dwp (density weighted proportion) file required to run GenEst. It will work with the shapefiles for visibility map around each turbine and the carcass locations. Both layers will tipically be obtained from GIS. Visit the [package website](https://pecard.github.io/genestdwp/index.html)
## Disclaimer
This software is preliminary or provisional. No warranty, expressed or implied, is made by the mantainer. Software releases constitute no warranty. The software is provided as is on the condition that the mantainer shall not be held liable or responsible for any damages resulting from the authorized or unauthorized use of the software.
## What is GenEst?
GenEst is a generalized, unbiased, fatality estimator developed by [USGS](https://www.usgs.gov/software/genest-a-generalized-estimator-mortality). Additional information and details available from the [software User Guide](https://doi.org/10.3133/tm7C19), the [package repository ](https://doi.org/10.5066/P9O9BATL), and the [technical report](https://doi.org/10.3133/tm7A2). The material from a USGS "Into to GenEst" workshop is also available [here](https://www.usgs.gov/media/files/intro-genest-workshop-nwcc-26nov2018).
## Installation
You can install the released version of genestdwp from [Github](https:://github.com/pecard/genestdwp) with:
``` r
library(devtools)
install_github("pecard/genestdwp")
```
## Contribute
You are welcome to contribute to the package development and improvment by [filling an issue](https://github.com/pecard/genestdwp/issues) at the package webpage.
## Usage
Run a basic example with the provided data:
```{r example, message=FALSE, warning=FALSE}
library(genestdwp)
library(sf)
library(tidyverse)
# Vector of distances
dist = c(10, 20, 30, 40, 50) # assumming meters
# Spatial join among visibility map and rings
rings <- viring(x=visib, d = dist)
# Carcasses
pto_carcass
# Get DWP
dfdwp <- dwp(vr = rings, pt = pto_carcass)
dfdwp
# Plot some data together
ggplot() +
geom_sf(aes(fill = factor(dist)), colour = 'grey80',
size = .1, data = filter(rings, ag == 1)) +
geom_sf(data = filter(pto_carcass, ag == 1), size = 4) +
scale_fill_brewer('Dist (m)') +
theme_void()
```