Appendix C — chapter2.visualization

chapter2.visualization

Provides a function to plot the collected data.

Functions

Name Description
plot_execution Generates an interactive plot with the accelerometer and gyroscope data of the specified execution.
plot_orientation_stats Generates an interactive plot counting the different phone orientations in the executions.
plot_turn_direction_combined_stats Generates an interactive plot counting the turning direction of the first_turn and second_turn combined.
plot_turn_direction_stats Generates an interactive plot counting the turning direction (right or left) of the first_turn and second_turn

plot_execution

chapter2.visualization.plot_execution(data_collection, execution)

Generates an interactive plot with the accelerometer and gyroscope data of the specified execution.

Parameters

Name Type Description Default
data_collection dict Dict containing the collected dataset. See: utils.data_loading.load_data() required
execution str execution data to plot. Format: ‘sXX_YY_{sp|sw}’ required

Returns

Type Description
plotly.graph_objs.Figure Interactive plot

plot_orientation_stats

chapter2.visualization.plot_orientation_stats(executions_info)

Generates an interactive plot counting the different phone orientations in the executions.

Parameters

Name Type Description Default
executions_info pandas.DataFrame DataFrame with the information of the executions. See: data_loading.load_executions_info() required

Returns

Type Description
plotly.graph_objs.Figure Interactive plot

plot_turn_direction_combined_stats

chapter2.visualization.plot_turn_direction_combined_stats(executions_info)

Generates an interactive plot counting the turning direction of the first_turn and second_turn combined.

Parameters

Name Type Description Default
executions_info pandas.DataFrame DataFrame with the information of the executions. See: data_loading.load_executions_info() required

Returns

Type Description
plotly.graph_objs.Figure Interactive plot

plot_turn_direction_stats

chapter2.visualization.plot_turn_direction_stats(executions_info)

Generates an interactive plot counting the turning direction (right or left) of the first_turn and second_turn

Parameters

Name Type Description Default
executions_info pandas.DataFrame DataFrame with the information of the executions. See: data_loading.load_executions_info() required

Returns

Type Description
plotly.graph_objs.Figure Interactive plot