"""
Chronograms and sequence frequency plots
========================================

Two summaries from TraMineR (Gabadinho et al., 2011): the *state distribution
plot* stacks the events found at each position (with the cross-sectional
entropy as a line), the *sequence frequency plot* shows the most frequent
complete sequences with bar heights proportional to their frequency.
"""

import matplotlib.pyplot as plt

import spmviz as sv
from spmviz.viz import plot_sequence_frequency, plot_state_distribution

days = sv.datasets.make_daily_routines(300, random_state=0)
shop = sv.datasets.make_customer_journeys(1000, random_state=0)
plot_state_distribution(days, max_steps=15)
plot_sequence_frequency(shop, top=10)
plt.show()
