print '''You can now get trace information per house. You can also see the trace of a particular appliance. However this is the point where you are informed that "seeing" is actually a step that comes after pickling. Do you want to pickle a house? If not you will be asked shortly to pickle a type? Enter yes or no''' boo = raw_input() if str(boo) == 'yes': #house = raw_input('Enter a home id\n') #appliance = raw_input('Enter an appliance name (this is not actually necessary at\this point):') #query = 'select * from {0}.{1} where dataid={2}'.format(schema_names[schema], month,house) #df = p.get_dataframe(query).fillna(0) # temp = p.clean_dataframe(df,schema,[]) # test = p.get_month_traces_per_dataid(schema,month,house) print 'you now have a bunch of appliance traces, one trace for each appliance in a house' print 'here is some information about the first trace ' elif str(boo) == 'no': print 'ok what appliance do you want?' app = str(raw_input()) print 'this step takes quite a while' pecan.set_url(db_url) dataids = pecan.get_dataids_with_real_values(schema, month, app) type = pecan.generate_traces_for_appliance_by_dataids( schema, month, app, dataids) utils.pickle_object(type, '{}_{}'.format(app, month)) else: print 'what was that?'
#house = raw_input('Enter a home id\n') #appliance = raw_input('Enter an appliance name (this is not actually necessary at\this point):') #query = 'select * from {0}.{1} where dataid={2}'.format(schema_names[schema], month,house) #df = p.get_dataframe(query).fillna(0) # temp = p.clean_dataframe(df,schema,[]) # test = p.get_month_traces_per_dataid(schema,month,house) print 'you now have a bunch of appliance traces, one trace for each appliance in a house' print 'here is some information about the first trace ' elif str(boo)=='no': print 'ok what appliance do you want?' app = str(raw_input()) print 'this step takes quite a while' pecan.set_url(db_url) dataids = pecan.get_dataids_with_real_values(schema,month,app) type = pecan.generate_traces_for_appliance_by_dataids(schema, month,app,dataids) utils.pickle_object(type, '{}_{}'.format(app,month)) else: print 'what was that?'