forked from bupaverse/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetting_info.Rmd
More file actions
63 lines (46 loc) · 1.68 KB
/
Copy pathgetting_info.Rmd
File metadata and controls
63 lines (46 loc) · 1.68 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
title: "Getting information from event logs"
output:
html_document:
toc: true
toc_float:
collapsed: false
print: false
---
After preparing the data and creating an eventlog object, we can use `bupaR` functions to get basic information from the log, as well as metadata. In this example, we will use the `patients` provided by `eventdataR`.
```{r echo = F}
htmltools::includeHTML("tracking_google_analytics.html")
```
```{r message = F, warning = F}
library(bupaR)
eventdataR::patients
```
## Getting metadata
The mapping function can be used to retrieve all the meta data from an event log object, i.e. the relation between event log identifiers and data fields.
```{r}
patients %>% mapping
```
In this case, we see that the handling field is the activity identifier in the event log, while the patient field is used as case identifier. We can also obtain each of these identifiers individually.
```{r results='hold'}
patients %>% activity_id
patients %>% case_id
patients %>% resource_id
```
## Getting basic information
We can look at a general summary of the event log by calling the `summary` function.
```{r}
patients %>% summary
```
The basic counts which show up in the summary can also be retrieved indivdual as a numeric vector of length one.
```{r results='hold'}
patients %>% n_activities
patients %>% n_activity_instances
patients %>% n_cases
patients %>% n_events
patients %>% n_traces
patients %>% n_resources
```
More detailed information about `activities` , `cases`, `resources` and `traces` can be obtained using the functions named accordingly. For example, consider the overview of the cases of the patients event log below.
```{r}
patients %>% cases
```