Library used

For exploratory sequence data analysis, we’ll use an R package called TraMineR(Trajectory miner: A toolbox for exploring and rendering sequences). This is an open-source package that comes with a lot of functionality to perform analysis on sequential data. Using this package, we can create a sequence using the seqdef function. The function takes the following inputs:

  • The data containing the sequence.

  • The format.

  • The alphabet represents the states or actions.

It then creates a sequence that we can use to perform some operations on. In this lesson, we’ll discuss these functions using Dota2 data to help us understand how to use this package and explore the sequences in our data. It should be noted that the lab goes into the functions in much more depth and shows how to apply them to the data.

Plotting sequences and frequent sequences

Most often, we would like to start by plotting the sequences in our data to see how they vary. Once a sequence has been created, the seqIplot function can be used to plot all of the sequences in the data. Further detail on how each function works and step-by-step instructions on how to use it to create and plot sequences can be seen in the lab. Once we have processed the Dota 2 data and split it into segments based on early, mid, and late game, we have 550 player sequences. Using this dataset, we plot the graph of all the sequences.

Get hands-on with 1200+ tech skills courses.