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
- Host: GitHub
- URL: https://github.com/robitalec/targets-spatsoc-networks
- Owner: robitalec
- License: gpl-3.0
- Created: 2021-03-31T02:17:38.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-28T12:17:16.000Z (almost 3 years ago)
- Last Synced: 2025-02-14T12:30:46.425Z (over 1 year ago)
- Topics: network-analysis, r, social-network-analysis, spatsoc, targets, workflow
- Language: R
- Homepage:
- Size: 445 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
always_allow_html: true
---
[](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/)