-
Notifications
You must be signed in to change notification settings - Fork 30
/
index.Rmd
141 lines (113 loc) · 6 KB
/
index.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
---
title: "Handbook of Graphs and Networks in People Analytics"
subtitle: "With Examples in R and Python"
author: "Keith McNulty"
site: bookdown::bookdown_site
always_allow_html: true
documentclass: krantz
bibliography: r/book.bib
csl: r/apa.csl
params:
colorblind: no
fig-caption: yes
link-citations: yes
github-repo: keithmcnulty/ona_book
pagetitle: "Handbook of Graphs and Networks in People Analytics"
description: "A technical manual of graphs, networks and their applications in the people and social sciences"
url: "https://ona-book.org"
cover-image: "https://ona-book.org/www/cover/cover-ona.png"
twitter-handle: "dr_keithmcnulty"
---
```{r, echo = FALSE, warning = FALSE, message = FALSE}
library(reticulate)
library(igraph)
knitr::opts_chunk$set(warning = FALSE, message = FALSE)
if (knitr::is_latex_output()) {
options(width = 100)
}
if (params$colorblind) {
scale_colour_discrete <- function(...) {
scale_colour_manual(..., values = colorBlindness::Blue2DarkRed12Steps)
}
}
# set this next variable to false to avoid evaluating computationally heavy chunks
eval_heavy_chunks <- TRUE
knitr::opts_chunk$set(out.width = "90%")
# knitr::opts_chunk$set(dpi=300)
# bookdown::render_book("index.Rmd", output_format = "bookdown::bs4_book", config_file = "_bookdown_bs4.yml")
# bookdown::render_book("index.Rmd", output_format = "bookdown::pdf_book", config_file = "_bookdown_pdf.yml")
# bookdown::render_book("index.Rmd", output_format = "bookdown::gitbook", config_file = "_bookdown_gitbook.yml")
```
```{r, echo = FALSE}
# google scholar metadata
library(metathis)
if (knitr::is_html_output()) {
meta() |>
meta_google_scholar(
title = "Handbook of Graphs and Networks in People Analytics: With Examples in R and Python",
author = "Keith McNulty",
publication_date = "2022",
isbn = "9781032204970"
)
}
```
<!--
<div class="banner">
<div class="banner__content">
<div class="banner__text">
<strong>Note for print/ebook owners:</strong> Please see details regarding print errors in Figures 2.3 and 2.10 <a href="https://github.com/keithmcnulty/ona_book/issues/12">here</a>
<button class="banner__close" type="button">
<span class="material-icons">
close
</span>
</button>
</div>
</div>
</div>
<script>
document.querySelector(".banner__close").addEventListener("click", function() {
this.closest(".banner").style.display = "none";
});
</script>
-->
`r if (knitr::is_latex_output()) '<!--'`
# Welcome {-}
Welcome to the website of the book *Handbook of Graphs and Networks in People Analytics* by [Keith McNulty](https://www.linkedin.com/in/keith-mcnulty/). This is the second volume in a series of technical textbooks for professionals working in analytics. To view or order a print copy of the first volume, please go to its website: [Handbook of Regression Modeling in People Analytics](https://peopleanalytics-regression-book.org).
```{asis}
<p style="text-align: center;"><a href="https://www.routledge.com/Handbook-of-Graphs-and-Networks-in-People-Analytics-With-Examples-in-R/McNulty/p/book/9781032204970?utm_source=author&utm_medium=shared_link&utm_campaign=B027787_jm1_5ll_7pp_d643_handbookofgraphsandnetworksinpeopleanalytics"><img src="www/cover/bookcover.jpg" alt="Handbook of Regression Modeling Cover" width="300"/></a></p>
::: {.infobox .ukraine}
**Note**: This book is published by Chapman & Hall/CRC and can be purchased [directly from their website at a 20% discount with discount code HBG20](https://www.routledge.com/Handbook-of-Graphs-and-Networks-in-People-Analytics-With-Examples-in-R/McNulty/p/book/9781032204970?utm_source=author&utm_medium=shared_link&utm_campaign=B027787_jm1_5ll_7pp_d643_handbookofgraphsandnetworksinpeopleanalytics), as well as from Amazon and other book retailers. *Please consider buying this book if you find it useful* - all the author's royalties are donated to the [Red Cross Ukraine Appeal](https://donate.redcross.org.uk/appeal/ukraine-crisis-appeal). The online version of this book is free to read here (thanks to Chapman & Hall/CRC), and licensed under the [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-nc-sa/4.0/). If you have any feedback, please feel free to [file an issue on GitHub](https://github.com/keithmcnulty/ona_book/issues). Thank you!
:::
```
The book is available in [bootstrap format](https://ona-book.org) or in a more plain [gitbook format](https://ona-book.org/gitbook).
`r if (knitr::is_latex_output()) '--> \\newpage\\thispagestyle{empty}\\null'`
## Notes on data used in this book {-}
For R and Python users, each of the data sets used in this book can be downloaded individually by following the code in each chapter. Alternatively, if you intend to work through all the chapters, all data sets can be downloaded in advance by installing the `onadata` package.
For R users, this can be installed as follows:
```{r, eval = FALSE}
# install onadata package
install.packages("onadata")
library(onadata)
# see a list of data sets
data(package = "onadata")
# find out more about a specific data set ('karate' example)
help(karate)
```
For Python users, use `pip install onadata` to install the package into your environment. Then, to use the package:
```{python, eval = FALSE}
# import onadata package
import onadata as ona
import pandas as pd
# see a list of data sets
ona.list_sets()
# load data into a dataframe
df = ona.karate()
# find out more about a specific data set ('karate' example)
ona.karate().info()
```
## Technical note for R users {-}
This book uses the new native pipe operator `|>` which was introduced in R version 4.1.0. Users using an older version of R, or who wish to use the alternative pipe operator `%>%` can simply replace this in all code. However, an appropriate library containing `%>%` will need to be loaded, such as `magrittr`, `dplyr` or `tidyverse`.
`r if (knitr::is_latex_output()) '<!--'`
Many thanks!
*Last updated: `r format(Sys.Date(), "%d %B %Y")`*
`r if (knitr::is_latex_output()) '-->'`