def reports(cls, output_object): # Called by UI to create Viz """Describe how to present output to user Display this viz with these columns from this table display_elements is a list of display objects specifying viz and columns for that viz """ report = reports.Report('Sensor Suitcase (HVAC Diagnostics)') text_blurb = reports.TextBlurb( text="Sensor Suitcase analysis shows HVAC Diagnostics.") report.add_element(text_blurb) column_info = (('problem', 'Problem'), ('diagnostic', 'Diagnostic'), ('recommendation', 'Recommendations'), ('savings', 'Savings')) summary_table = reports.Table( 'SensorSuitcaseHVAC', column_info, title='Sensor Suitcase HVAC Diagnostics', description='A table showing diagnostics for your building.') report.add_element(summary_table) report_list = [report] return report_list
def reports(cls, output_object): #Called by UI to create Viz """Describe how to present output to user Display this viz with these columns from this table display elements is a list of display objects specifying viz and columns for that viz """ rep_desc = 'Data Interpolation Example' report = reports.Report(rep_desc) column_info = (('time', 'Timestamp'), ('load', 'Load')) keys = list(output_object['Time_Table'].keys()) keys.sort() column_info += tuple((key,key) for key in keys if key.startswith('oat')) text_blurb = reports.TextBlurb('') summary_table = reports.Table('Time_Table', column_info, title='Data Interpolation Results', description='A table showing data interpolation') report.add_element(summary_table) # list of report objects report_list = [report] return report_list
def reports(self): #Called by UI to create Viz """Describe how to present output to user Display this viz with these columns from this table display_elements is a list of display objects specifying viz and columns for that viz """ report = reports.Report('Cross Sectional Benchmarking, \ ENERGY STAR Portfolio Manager') text_blurb = reports.TextBlurb( text="Determine the performance of your \ building relative to a comparable \ peer group using Portfolio Manager ." ) report.add_element(text_blurb) column_info = (('Value', 'ENERGY STAR Score'), ) espmscore_table = reports.Table('CrossSectional_BM', column_info, title='Cross-Sectional Benchmarking') report.add_element(espmscore_table) text_guide = reports.TextBlurb( text="Scores of 75 or higher qualify for ENERGY STAR Label.\ Scores of 50 indicate average energy performance." ) report.add_element(text_guide) report_list = [report] return report_list
def reports(cls, output_object): # Called by UI to create Viz """Describe how to present output to user Display this viz with these columns from this table display_elements is a list of display objects specifying viz and columns for that viz """ '''Name of the overall report''' report = reports.Report('Energy Signature Report') ''' The table report takes in a list of tuples which tell the report how to order columns and what to call them. ((db_col_nameA, report_display_name1),(db_col_nameB, report_display_name2),) In this example, db_col_nameA is labeled with report_display_name1 and is the first column in the displayed report table In this application there is only one column in the report table "Sensitivity" and the values are drawn from the "value" column of the output data table that is used, WEATHER_SENSITIVITY_TABLE_NAME ''' column_info = (('value', 'Sensitivity'), ) ''' This text blurb will be displayed at the top of the report ''' text_blurb = reports.TextBlurb( "Analysis of the relationship of power intensity to outdoor temperature." ) '''Add the element to the report''' report.add_element(text_blurb) ''' The reports.Table takes an output table that was specified in the output_format method. This table name must match exactly the table name specified in output_needs. The displayed title of the report can be set with the keyword argument "title". This is used for display only. ''' summary_table = reports.Table( WEATHER_SENSITIVITY_TABLE_NAME, column_info, title='Weather Sensitivity', description='A description of the sensitivity') '''Add the summary table to the report''' report.add_element(summary_table) ''' The ScatterPlot visualization can take a list of xydatasets to display. XYDataSet takes a table name as specified in the output_format method of the application. This table must exactly match the name of a table specified in output_needs. A title for display can also be set. The ScatterPlot also takes labels for the x and y axes. ''' xy_dataset_list = [] ''' Send in the oat and load columns of the Load_Profile table.''' xy_dataset_list.append( reports.XYDataSet(LOAD_PROFILE_TABLE_NAME, 'oat', 'load')) '''Create a scatterplot which uses the datasets in the xy_dataset_list''' scatter_plot = reports.ScatterPlot(xy_dataset_list, title='Time Series Load Profile', x_label='Outside Air Temperature', y_label='Power') '''Add it to the report''' report.add_element(scatter_plot) # list of report objects report_list = [report] return report_list