Plot of cluster groups.
Takes the 'ak_object' from the
'akclustr'
as input and produce either the 'line' plot
or 'stacked' histogram.
plot_akstats( ak_object, k = 3, reference = 1, n_quant = 4, type = "lines", y_scaling = "fixed" )
ak_object |
An output of |
k |
[integer] |
reference |
[numeric] Specifying the reference line from
which the direction of each group is measured. Options are:
|
n_quant |
[numeric] Number of equal intervals (quantiles)
to create between the reference line |
type |
[character] plot type. Available options are:
|
y_scaling |
[character] works only if |
Generates the plots of cluster groups - same plots
generated by the 'show_plots'
argument of print_akstats
.
The function draw from the functionalities of the
ggplot2
library.
For a more customized visualisation, we recommend that users
deploy ggplot2
directly (Wickham H. (2016)
).
A plot showing group membership or sizes (proportion) and statistics.
1
. Adepeju, M. et al. (2021). Anchored k-medoids:
A novel adaptation of k-medoids further refined to measure
inequality in the exposure to crime across micro places,
doi: 10.1007/s42001-021-00103-1.
2
. Wickham H. (2016). Elegant graphics for
Data Analysis. Spring-Verlag New York (2016).
data(traj) trajectry <- data_imputation(traj, id_field = TRUE, method = 1, replace_with = 1, fill_zeros = FALSE) print(trajectry$CompleteData) trajectry <- props(trajectry$CompleteData, id_field = TRUE) aksolution <- akclustr(trajectry, id_field = TRUE, method = "linear", k = c(3,5), crit='Calinski_Harabasz') plot_akstats(aksolution, k = 4, type="lines", y_scaling="fixed") plot_akstats(aksolution, k = 4, reference = 1, n_quant = 4, type="stacked")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.