custom: Custom map profile

Description Usage Arguments Details Examples

Description

Function to create a custom map profile based on some event log attribute.

Usage

1
2
custom(FUN = mean, attribute, units = "", color_scale = "PuBu",
  color_edges = "dodgerblue4")

Arguments

FUN

A summary function to be called on the provided event attribute, e.g. mean, median, min, max. na.rm = T by default.

attribute

The name of the case attribute to visualize (should be numeric)

units

Character to be placed after values (e.g. EUR for monitary euro values)

color_scale

Name of color scale to be used for nodes. Defaults to PuBu. See 'Rcolorbrewer::brewer.pal.info()' for all options.

color_edges

The color used for edges. Defaults to dodgerblue4.

Details

If used for edges, it will show the attribute values which related to the out-going node of the edge.#'

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
library(eventdataR)
library(processmapR)
data(traffic_fines)
# make sure the amount attribute is propagated forward in each trace
# using zoo::na.locf instead of tidyr::fill since it is much faster
# still the whole pre-processing is still very slow
library(zoo)

traffic_fines_prepared <- traffic_fines %>%
filter_trace_frequency(percentage = 0.8) %>%
group_by_case() %>%
mutate(amount = na.locf(amount, na.rm = F)) %>%
ungroup_eventlog()

process_map(traffic_fines_prepared, type_nodes = custom(attribute = "amount", units = "EUR"))

## End(Not run)

gertjanssenswillen/processmapR documentation built on June 15, 2019, 2:46 p.m.