This commit is contained in:
Martin Chan 2020-11-25 10:23:46 +00:00
Родитель b18b4fd950
Коммит 32eb1a1f6b
2 изменённых файлов: 61 добавлений и 3 удалений

41
.github/analyst_guide_distribution.md поставляемый
Просмотреть файл

@ -1,3 +1,42 @@
# Distribution
_Coming soon..._
**Distribution** functions allow you to go beyond aggregated averages, and diagnose whether metrics are skewed, evenly distributed, or contain outliers.
You can use the `fizz` and `dist` family of functions for this. For email hours, you can run the following:
```R
sq_data %>% email_dist() # 100% horizontal stacked bar
```
<img src="https://raw.githubusercontent.com/microsoft/wpa/main/.github/gallery/email_dist.png" align ="center" width=80%>
You can also return a jittered scatter plot ('fizzy drink plot').
```R
sq_data %>% email_fizz() # Fizzy drink plot
```
## Functions
Other examples of distribution functions include:
### Dist
- `collaboration_dist()`
- `meeting_dist()`
- `one2one_dist()`
- `afterhours_dist()`
- `workloads_dist()`
### Fizz
- `collaboration_fizz()`
- `meeting_fizz()`
- `one2one_fizz()`
- `afterhours_fizz()`
- `workloads_fizz()`
### Flexible functions
- `create_dist()`
- `create_fizz()`
- `create_boxplot()`

23
.github/analyst_guide_summary.md поставляемый
Просмотреть файл

@ -8,12 +8,30 @@ An instance of a summary function in action would be:
sq_data %>% collaboration_summary()
```
<img src="https://raw.githubusercontent.com/microsoft/wpa/main/.github/gallery/collab_sum.png" align ="center" width=80%>
This returns a plot that you can either as a SVG (vector) or PNG (scalar) image by passing the output to `export()`. Since the plot output is a ggplot object, you can also make further customizations to it by appending ggplot layers, for instance:
```R
sq_data %>%
collaboration_summary() +
ggtitle("This is a custom title")
```
You can use return a summary table rather than a plot:
```R
sq_data %>% collaboration_summary(return = "table")
```
To export the results to a clipboard, you can pass the outputs to `export()` again:
```R
sq_data %>%
collaboration_summary(return = "table") %>%
export()
```
There is also an option to change the threshold for excluding group size:
```
@ -23,8 +41,6 @@ sq_data %>%
return = "table")
```
Other similar functions include:
- `email_summary()`
@ -32,3 +48,6 @@ Other similar functions include:
- `one2one_summary()`
- `workloads_summary()`
- `afterhours_summary()`
See `create_bar()` for creating summary functions with other Workplace Analytics metrics.