@@ -22,19 +22,18 @@ export const loadAndSortData = (csvData: string): CSVRow[] => {
2222 const parsedData = Papa . parse < CSVRow > ( csvData , {
2323 header : true ,
2424 skipEmptyLines : true ,
25- delimiter : " " ,
2625 } ) . data ;
2726
2827 const transformedData = parsedData . map ( row => ( {
2928 'Session Id' : row [ 'Session Id' ] ,
3029 'Time' : row [ 'Time' ] ,
31- 'Step Name' : row [ 'Step Name' ] || 'DoneButton' ,
30+ 'Step Name' : row [ 'Step Name' ] , // || 'DoneButton',
3231 'Outcome' : row [ 'Outcome' ] ,
3332 'CF (Workspace Progress Status)' : row [ 'CF (Workspace Progress Status)' ] ,
3433 'Problem Name' : row [ 'Problem Name' ] ,
3534 'Anon Student Id' : row [ 'Anon Student Id' ]
3635 } ) ) ;
37-
36+ console . log ( transformedData )
3837 return transformedData . sort ( ( a , b ) => {
3938 if ( a [ 'Session Id' ] === b [ 'Session Id' ] ) {
4039 return new Date ( a [ 'Time' ] ) . getTime ( ) - new Date ( b [ 'Time' ] ) . getTime ( ) ;
@@ -56,7 +55,6 @@ export const createStepSequences = (sortedData: CSVRow[], selfLoops: boolean): {
5655 if ( ! acc [ sessionId ] ) acc [ sessionId ] = [ ] ;
5756
5857 const stepName = row [ 'Step Name' ] ;
59-
6058 if ( selfLoops || acc [ sessionId ] . length === 0 || acc [ sessionId ] [ acc [ sessionId ] . length - 1 ] !== stepName ) {
6159 acc [ sessionId ] . push ( stepName ) ;
6260 }
@@ -289,6 +287,7 @@ function calculateEdgeColors(outcomes: { [outcome: string]: number }): string {
289287 * @param min_visits - Minimum number of visits an edge must have to be included in the graph.
290288 * @param selectedSequence - The selected sequence of steps used to color the nodes.
291289 *
290+ * @param justTopSequence
292291 * @returns A string in Graphviz DOT format that represents the graph.
293292 */ export function generateDotString (
294293 normalizedThicknesses : { [ key : string ] : number } ,
0 commit comments