-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
48 lines (30 loc) · 1.59 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
---
output: github_document
always_allow_html: true
---
[![DOI](https://zenodo.org/badge/353198467.svg)](https://zenodo.org/badge/latestdoi/353198467)
# targets-spatsoc-networks
Example [`targets`](https://github.com/ropensci/targets) workflow for generating networks using [`spatsoc`](https://github.com/ropensci/spatsoc/).
```{r include=FALSE}
a <- targets::tar_visnetwork(targets_only = TRUE)
```
```{r, echo = FALSE}
a
```
## Usage
1. Clone/fork/download/etc make your own copy somewhere!
2. Add your data to the input folder (and remove the example data)
3. Open `_targets.R`
4. Change the global variables in the Variables section
5. Set your output (see below)
6. Run `targets::tar_make()`
As for output, right now it's set up with four different options after the Targets section
1. One data set, simply set the path
2. Multiple data sets, provide the list or wildcard of paths
3. Multiple data sets, and matching thresholds or other variables. Eg. one data set with 50m spatial threshold and another with 100m.
4. Multiple data sets, crossed with multiple thresholds (or other variables). This could be used for a sensitivity analysis.
To select your output format, comment out or delete the other options. Targets looks for the last declared target in the `_targets.R` file.
Note: randomizations in progress, see the [branch](https://github.com/robitalec/targets-spatsoc-networks/tree/randomizations).
## Resources
[`spatsoc` vignette: Using `spatsoc` in social network analysis](https://docs.ropensci.org/spatsoc/articles/using-in-sna.html)
[`targets` manual](https://books.ropensci.org/targets/)