Skip to content

Commit

Permalink
fst usage instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
robitalec committed Mar 31, 2021
1 parent 9d5f638 commit 392ec82
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ always_allow_html: true

# 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)
Expand All @@ -19,6 +20,23 @@ 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

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.


## Resources

[`spatsoc` vignette: Using `spatsoc` in social network analysis](https://docs.ropensci.org/spatsoc/articles/using-in-sna.html)
Expand Down
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,34 @@

[![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/).

![](README_files/figure-gfm/unnamed-chunk-2-1.png)<!-- -->

## 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

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.

## Resources

[`spatsoc` vignette: Using `spatsoc` in social network
Expand Down

0 comments on commit 392ec82

Please sign in to comment.