Icon

20200203 ATP VIC code.knwf 1

Note for Knime Forum users -this section does not need to beused as we are only using onefile, imported below.This section makes a list of all the ATPfiles in the given folder. It then allows youto select which of those files to import,either by route or by operator. This section finds the cumulative dwelltime for each trip. This section puts the datainto a format which Hastuscan read This section outputs the databy route This section allows me tofind the running time of thescript Stops matching places listMatching stopsto placesConverting alltime columnsCalculating dwelltimeKeeping onlydwell times ofmore than 120secondsLagging trip IDfor next nodeRemoving dwelltime if first row ofnew tripCalculating cumulativedwell time in loopfor each trip IDRemoving cumulativedwell time from actualarrival timeRemoving cumulativedwell time from actualdeparture timeLaggingcumulativedwell timeMakingcummulative dwelltime 0 if first row ofnew tripFiltering outunwanted columnsadding negativeto dwell timeadding negativeto cummulativedwell timePutting time columnsinto format whichHastus can useCreating operating dateConverting - scheduled time- departure time - arrival timeinto 36 hour formatand creating hour column to check these formulasare workingfind and replace'day type'day type valuesto changeweekday valuesto changefind and replace' weekday' creating blank columnsneeded for OIR importremoving no longerneeded columns Rearrangingcolumns for final output- Dividing sequencenumber by 100- Creating uniquetrip ID- Changing point IDto stringRemoving nullplacesSorting datato make it easierto readList files in chosen directorySplit directory using / to get file nameSplitting filename by -to get operator and route nameRemoving columns whicharen't file nameRemoving columns which aren't operator and route nameRenaming columns to operator and route nameRemoving .csv from file nameRemoving "route"from route nameCreating listof operatorsSelecting operatorby row numberFinal list of ATP filesto importImporting eachfile in list,based on URLfrom List FilesnodeNode 67Summing calculationtime of each nodeFinding totalcalculation timein secondslooping over route name andoutputting a file for each namecreating filepathImporting a singledata file - USE THIS!Removing a null rowblank columnsNode 80Node 81Node 82Node 83 Excel Reader (XLS) Joiner String to Date&Time Date&TimeDifference Math Formula Lag Column Rule Engine Moving Aggregation Group Loop Start Loop End Date&Time Shift Date&Time Shift Lag Column Rule Engine Column Filter Math Formula Math Formula Date&Time to String Date&Time to String Column Expressions Cell Replacer Table Creator Table Creator Cell Replacer Column Expressions Column Filter Column Resorter Column Expressions Row Filter Sorter CSV Writer List Files Cell Splitter Cell Splitter Column Filter Column Filter Column Rename String Replacer String Replacer GroupBy Row Filter Joiner Table Row ToVariable Loop Start Loop End File Reader Timer Info GroupBy Math Formula Group Loop Start String Manipulation(Variable) Loop End File Reader Rule-basedRow Filter Table Creator Column Appender Math Formula String Manipulation Number To String Note for Knime Forum users -this section does not need to beused as we are only using onefile, imported below.This section makes a list of all the ATPfiles in the given folder. It then allows youto select which of those files to import,either by route or by operator. This section finds the cumulative dwelltime for each trip. This section puts the datainto a format which Hastuscan read This section outputs the databy route This section allows me tofind the running time of thescript Stops matching places listMatching stopsto placesConverting alltime columnsCalculating dwelltimeKeeping onlydwell times ofmore than 120secondsLagging trip IDfor next nodeRemoving dwelltime if first row ofnew tripCalculating cumulativedwell time in loopfor each trip IDRemoving cumulativedwell time from actualarrival timeRemoving cumulativedwell time from actualdeparture timeLaggingcumulativedwell timeMakingcummulative dwelltime 0 if first row ofnew tripFiltering outunwanted columnsadding negativeto dwell timeadding negativeto cummulativedwell timePutting time columnsinto format whichHastus can useCreating operating dateConverting - scheduled time- departure time - arrival timeinto 36 hour formatand creating hour column to check these formulasare workingfind and replace'day type'day type valuesto changeweekday valuesto changefind and replace' weekday' creating blank columnsneeded for OIR importremoving no longerneeded columns Rearrangingcolumns for final output- Dividing sequencenumber by 100- Creating uniquetrip ID- Changing point IDto stringRemoving nullplacesSorting datato make it easierto readList files in chosen directorySplit directory using / to get file nameSplitting filename by -to get operator and route nameRemoving columns whicharen't file nameRemoving columns which aren't operator and route nameRenaming columns to operator and route nameRemoving .csv from file nameRemoving "route"from route nameCreating listof operatorsSelecting operatorby row numberFinal list of ATP filesto importImporting eachfile in list,based on URLfrom List FilesnodeNode 67Summing calculationtime of each nodeFinding totalcalculation timein secondslooping over route name andoutputting a file for each namecreating filepathImporting a singledata file - USE THIS!Removing a null rowblank columnsNode 80Node 81Node 82Node 83 Excel Reader (XLS) Joiner String to Date&Time Date&TimeDifference Math Formula Lag Column Rule Engine Moving Aggregation Group Loop Start Loop End Date&Time Shift Date&Time Shift Lag Column Rule Engine Column Filter Math Formula Math Formula Date&Time to String Date&Time to String Column Expressions Cell Replacer Table Creator Table Creator Cell Replacer Column Expressions Column Filter Column Resorter Column Expressions Row Filter Sorter CSV Writer List Files Cell Splitter Cell Splitter Column Filter Column Filter Column Rename String Replacer String Replacer GroupBy Row Filter Joiner Table Row ToVariable Loop Start Loop End File Reader Timer Info GroupBy Math Formula Group Loop Start String Manipulation(Variable) Loop End File Reader Rule-basedRow Filter Table Creator Column Appender Math Formula String Manipulation Number To String

Nodes

Extensions

Links