-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSNA_with_R.Rmd
57 lines (45 loc) · 1.88 KB
/
SNA_with_R.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
50
51
52
53
54
55
56
57
---
title: "Quick introduction to SNA with R"
author:
name: "Raffaele Vacca"
email: "[raffaelevacca.com](https://www.raffaelevacca.com/)"
affiliation: "University of Milan"
date: '`r Sys.Date()`'
knit: (function(inputFile, encoding) {
rmarkdown::render(inputFile, encoding = encoding, output_file="./docs/index.html") })
output:
html_document:
toc: true
number_sections: true
toc_float: true
theme: flatly
---
Quick introduction to [`igraph`](https://igraph.org/r/) and [`ggraph`](https://ggraph.data-imaginist.com/) for SNA in R, materials for my PhD seminars at [Unimi](https://www.nasp.eu/training/phd-programmes/esls.html) and [Unimib](https://en.unimib.it/education/doctoral-research-phd-programmes/phd-programmes/urbeur-%E2%80%93-urban-studies). Download materials [here](https://github.com/raffaelevacca/Intro-SNA-with-R) (GitHub).
```{r include=FALSE}
# Set up root directory to project directory (not Rmd file directory)
# knitr::opts_knit$set(root.dir = '../')
```
```{r include=FALSE, cache=FALSE}
# Read script in
knitr::read_chunk("SNA_with_R.R")
```
# Importing and visualizing network data
* Import network data from external edge list.
* Import node attributes from external dataset.
* Plot networks with `igraph` and with `ggraph`.
* Plot with different network layouts.
```{r import, echo = TRUE, message = FALSE}
```
# Network objects and attributes
* Vertex and edge attributes.
* Use vertex and edge attributes to analyze network composition.
* Use vertex and edge attributes to analyze network structure.
* Visualize characteristics of network composition and structure.
```{r attr-indexing, echo = TRUE, message = TRUE}
```
# Example of network measures: centrality
* Import network data from external adjacency matrix.
* Calculate and analyze centrality measures.
* Visualize centrality in network plots.
```{r centrality, echo = TRUE, message = TRUE}
```