+ format = request.args.get('format', 'default')
+ if format == 'c3':
+ c3result = dict()
+ for row in result:
+ if not row['sensor_id'] in c3result:
+ c3result[row['sensor_id']] = list()
+ c3result[row['sensor_id']].append(row['value'])
+ if not row['sensor_id'] + '_x' in c3result:
+ c3result[row['sensor_id'] + '_x'] = list()
+ dt = row['timestamp'].strftime('%Y-%m-%d %H:%M:%S')
+ c3result[row['sensor_id'] + '_x'].append(dt)
+ result = c3result