An open API service indexing awesome lists of open source software.

https://github.com/robitalec/targets-spatsoc-networks

:hammer_and_wrench: Example repository for generating networks using spatsoc, with a targets workflow
https://github.com/robitalec/targets-spatsoc-networks

network-analysis r social-network-analysis spatsoc targets workflow

Last synced: over 1 year ago
JSON representation

:hammer_and_wrench: Example repository for generating networks using spatsoc, with a targets workflow

Awesome Lists containing this project

README

          

---
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/)