Mercurial Hosting > traffic-intelligence
changeset 1063:3c37d8d20e97
minor addition to process.py
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Fri, 13 Jul 2018 09:59:01 -0400 |
parents | a2e20aba0740 |
children | cbc026dacf0b |
files | scripts/process.py |
diffstat | 1 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/process.py Thu Jul 12 00:22:16 2018 -0400 +++ b/scripts/process.py Fri Jul 13 09:59:01 2018 -0400 @@ -23,6 +23,7 @@ parser.add_argument('--delete', dest = 'delete', help = 'data to delete', choices = ['feature', 'object', 'classification', 'interaction']) parser.add_argument('--process', dest = 'process', help = 'data to process', choices = ['feature', 'object', 'classification', 'prototype', 'interaction']) parser.add_argument('--display', dest = 'display', help = 'data to display (replay over video)', choices = ['feature', 'object', 'classification', 'interaction']) +parser.add_argument('--progress', dest = 'progress', help = 'information about the progress of processing', action = 'store_true') parser.add_argument('--analyze', dest = 'analyze', help = 'data to analyze (results)', choices = ['feature', 'object', 'classification', 'interaction', 'event']) # common options @@ -101,6 +102,13 @@ ################################# # Delete ################################# +if args.progress: + print('Providing information on data progress') + print('TODO') + +################################# +# Delete +################################# if args.delete is not None: if args.delete == 'feature': response = input('Are you sure you want to delete the tracking results (SQLite files) of all these sites (y/n)?') @@ -243,7 +251,7 @@ plt.savefig(name.lower()+'-speeds.png', dpi=dpi) plt.close() elif args.output == 'event': - data.to_csv('speeds.csv', index = False) + data.to_csv(args.eventFilename, index = False) if args.analyze == 'interaction': # redo as for object, export in dataframe all interaction data indicatorIds = [2,5,7,10] @@ -302,4 +310,4 @@ else: row.append(aggregated) outputData.append(row) - pd.DataFrame(outputData, columns = headers).to_csv('aggregated-speeds.csv', index = False) + pd.DataFrame(outputData, columns = headers).to_csv(utils.removeExtension(args.eventFilename)+'-aggregated.csv', index = False)