Mercurial > hg > nsaunier > traffic-intelligence
comparison scripts/process.py @ 1086:8734742c08c0
major refactoring of curvilinear trajectory projections
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Tue, 16 Oct 2018 12:46:29 -0400 |
| parents | 1a7e0b2c858b |
| children | b968c33f8c2f |
comparison
equal
deleted
inserted
replaced
| 1085:7853106677b7 | 1086:8734742c08c0 |
|---|---|
| 340 #data = pd.read_csv('./speeds.csv', converters = {'time': lambda s: datetime.datetime.strptime(s, "%H:%M:%S").time()}, nrows = 5000) | 340 #data = pd.read_csv('./speeds.csv', converters = {'time': lambda s: datetime.datetime.strptime(s, "%H:%M:%S").time()}, nrows = 5000) |
| 341 # create time for end of each 15 min, then group by, using the agg method for each data column | 341 # create time for end of each 15 min, then group by, using the agg method for each data column |
| 342 headers = ['site', 'date', 'intervalend15', 'duration', 'count'] | 342 headers = ['site', 'date', 'intervalend15', 'duration', 'count'] |
| 343 aggFunctions, tmpheaders = utils.aggregationMethods(args.aggMethods, args.aggCentiles) | 343 aggFunctions, tmpheaders = utils.aggregationMethods(args.aggMethods, args.aggCentiles) |
| 344 dataColumns = list(data.columns[4:]) | 344 dataColumns = list(data.columns[4:]) |
| 345 print(dataColumns) | |
| 345 for h in dataColumns: | 346 for h in dataColumns: |
| 346 for h2 in tmpheaders: | 347 for h2 in tmpheaders: |
| 347 headers.append(h+'-'+h2) | 348 headers.append(h+'-'+h2) |
| 348 if args.eventThresholds is not None: | 349 if args.eventThresholds is not None: |
| 349 for h in dataColumns: | 350 for h in dataColumns: |
