-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
49 lines (31 loc) · 2.84 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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
# Introduction to the package
This project was created with the [`rrrpkg` package](https://github.com/ropensci/rrrpkg) and is intended to serve as a [Research Compendium](https://github.com/ropensci/rrrpkg). The easiest way to get your hands dirty and explore data and run the analysis is to clone the [HabMod github repository](https://github.com/slarge/HabMod) (instructions on how to clone and general github/Rstudio knowledge can be found at [happygitwithr.com](http://happygitwithr.com/rstudio-git-github.html#clone-the-new-github-repository-to-your-computer-via-rstudio) -- replace 'myrepo' with 'slarge/HabMod'). Once you have the project cloned, you will need to add a few functions necessary to load data. "Load all" using the keyboard shortcut ctrl+shift+L, which will load these functions into the current Global Environment.
Data is held in a private google drive folder. If you have access to the folder, open the analysis/data/raw_data/load_new_data.R script and follow the instructions to download the data. The intention, here, is to copy data from the google drive folder into the R package directory structure in a consistent way to facilitate batch processessing the data in subsequent analyses.
# Habitat modeling
Once data are loaded using the analysis/data/raw_data/load_new_data.R script, you can get started with the analysis. Load the analysis/procedure/xgboost_habitat.R script. This script loads the raw data and adds a presence/absence vector for each species and then models presence/absence habitat and biomass habitat. Fitting with the xgboost algorithm requires a few steps. First, a few hyperparameters need to be tuned, which is done using a Bayesian optimization procedure. Next, the model is tuned.
### Citation
Please cite this compendium as:
> Large, S and Friedland, K (`r format(Sys.Date(), "%Y")`). _NEUS Habitat Modeling_. Accessed `r format(Sys.Date(), "%d %b %Y")`. Online at <https://doi.org/xxx/xxx>
### Installation
You can install habitatmodel from github with:
```{r gh-installation, eval = FALSE}
# install.packages("devtools")
devtools::install_github("slarge/HabMod")
```
### Licenses
**Text and figures:** [CC-BY-4.0](http://creativecommons.org/licenses/by/4.0/)
**Code:** See the [DESCRIPTION](DESCRIPTION) file
$\textbf{Data:}$ [CC-0](http://creativecommons.org/publicdomain/zero/1.0/) attribution requested in reuse
### Contributions
We welcome contributions from everyone. Before you get started, please see our [contributor guidelines](CONTRIBUTING.md). Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms.