forked from bupaverse/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdotted_chart.Rmd
More file actions
42 lines (34 loc) · 1.29 KB
/
Copy pathdotted_chart.Rmd
File metadata and controls
42 lines (34 loc) · 1.29 KB
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
---
title: "Dotted charts"
output:
html_document:
toc: true
toc_float:
collapsed: false
print: false
---
```{r include = F}
library(tidyverse)
library(bupaR)
library(pander)
library(lubridate)
```
```{r echo = F}
htmltools::includeHTML("tracking_google_analytics.html")
```
Dotted charts can be made with the `dotted_chart` function. A dotted chart is a graph in which each activity instance is displayed with a point. The x-axis referce to the time aspect, while the y-axis refers to cases. The dotted chart function has 3 arguments
* x: Either absolute (absolute time on x-axis) or relative (time difference since start case on x-axis)
* y: The ordering of the cases along the y-axis: by start, end, or duration.
* color: The attribute used to color the activity instances. Default to the activity type.
## Static dotted charts
Below, you can see some examples for dotted charts with various configurations
```{r}
patients %>%
dotted_chart(x = "absolute", y = "start")
patients %>%
dotted_chart(x = "absolute", y = "start", color = "employee")
patients %>%
dotted_chart(x = "relative", y = "duration", color = "employee")
```
## Interactive dotted charts
The function `idotted_chart` opens a shiny app which can be used to modify the arguments of the dotted chart interactively.