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 """ # topics = input_object.get_topics() # meta_topics = input_object.get_topics_meta() # load_units = meta_topics['load'][base_topic]['unit'] report = reports.Report('Longitudinal Benchmarking Report') text_blurb = reports.TextBlurb( text= "The plots show total building energy consumption compared over time." ) report.add_element(text_blurb) xy_dataset_list = [] xy_dataset_list.append( reports.XYDataSet('Longitudinal_BM', 'year', 'load')) elec_bar_chart = reports.BarChart( xy_dataset_list, title='Annual Building Consumption (Electricity)', x_label='Year', y_label='Electric Energy [kWh]') report.add_element(elec_bar_chart) xy_dataset_list = [] xy_dataset_list.append( reports.XYDataSet('Longitudinal_BM', 'year', 'natgas')) natgas_bar_chart = reports.BarChart( xy_dataset_list, title='Annual Building Consumption (Natural Gas)', x_label='Year', y_label='Natural Gas Energy [kBTU]') report.add_element(natgas_bar_chart) text_guide1 = reports.TextBlurb( text= "Compare energy use in the base year to that in the later years.") report.add_element(text_guide1) text_guide2 = reports.TextBlurb( text="A persistent or large increase in bar height\ reflects growing annual energy use and possible\ efficiency opportunities.") report.add_element(text_guide2) text_guide3 = reports.TextBlurb( text="A significant efficiency improvement would result\ in a downward trend of decreasing bar height." ) report.add_element(text_guide3) report_list = [report] return report_list
def reports1(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('Building Load Profile Report') text_blurb = reports.TextBlurb( text= "A plot showing building energy consumption over a time period.") report.add_element(text_blurb) xy_dataset_list = [] xy_dataset_list.append( reports.XYDataSet('Load_Profiling', 'timestamp', 'load')) scatter_plot = reports.DatetimeScatterPlot( xy_dataset_list, title='Time Series Load Profile', x_label='Timestamp', y_label='Energy [kWh]') report.add_element(scatter_plot) text_guide1 = reports.TextBlurb( text="Do loads decrease during lower occupancy periods\ (e.g. weekends or overnight)?") report.add_element(text_guide1) text_guide2 = reports.TextBlurb( text="Does the width of similar load profiles correspond\ to occupancy schedule?") report.add_element(text_guide2) text_guide3 = reports.TextBlurb( text="Minima should occur during unoccupied hours\ and be as close to zero as possible." ) report.add_element(text_guide3) text_guide4 = reports.TextBlurb( text="Does the weekly profile correspond to occupancy\ and use for each day for a typical week?" ) report.add_element(text_guide4) 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('Load Duration Report') text_blurb = reports.TextBlurb( text= "Analysis of the portion of time that building energy load is at or above a certain threshhold." ) report.add_element(text_blurb) xy_dataset_list = [] xy_dataset_list.append( reports.XYDataSet('Load_Duration', 'percent time', 'sorted load')) scatter_plot = reports.ScatterPlot(xy_dataset_list, title='Load Duration', x_label='Percent Time', y_label='Energy [kWh]') report.add_element(scatter_plot) text_guide1 = reports.TextBlurb( text= "The highest loads ideally should occur a small fraction of the time." ) report.add_element(text_guide1) text_guide2 = reports.TextBlurb(text= "If the building is near its peak load for a significant portion of the time, " \ "the HVAC equipment could be undersized, or there could be systems that run more than necessary." ) report.add_element(text_guide2) text_guide3 = reports.TextBlurb(text= "If the load is near peak for only a short duration of time, " \ "there may be an opportunity to reduce peak demand charges." ) report.add_element(text_guide3) 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 """ report = reports.Report('Whole-Building Energy Savings') text_blurb = reports.TextBlurb( text="Analysis shows the cumulative sum of the savings between the \ baseline model and the measured values for a single building." ) report.add_element(text_blurb) xy_dataset_list = [] xy_dataset_list.append( reports.XYDataSet('DayTimeTemperatureModel', 'datetimeValues', 'cumulativeSum')) cumsum_plot = reports.DatetimeScatterPlot( xy_dataset_list, title='Cumulative Whole Building Energy Savings', x_label='Timestamp', y_label='Energy [kWh]') report.add_element(cumsum_plot) text_guide1 = reports.TextBlurb( text= "A flat slope of the cumulative sum time series indicates that use has\ remained the same. A positive slope indicates energy savings, while a \ negative slope indicates that more energy is being used after the \ supposed \"improvement\" date") report.add_element(text_guide1) 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 """ reportName = 'Energy Signature and Weather Sensitivity Report' report = reports.Report(reportName) text_blurb = reports.TextBlurb( "Analysis of the relationship of power intensity to outdoor temperature." ) report.add_element(text_blurb) column_info = (('value', 'Sensitivity'), ) summary_table = reports.Table( WEATHER_SENSITIVITY_TABLE_NAME, column_info, title='Weather Sensitivity', description='A description of the sensitivity') report.add_element(summary_table) text_guide1 = reports.TextBlurb( text="If weather sensitivity > 0.7 the building energy use is \"highly\" sensitive " \ "to outside air temperature. There may be opportunities to improve building insulation and ventilation." ) report.add_element(text_guide1) xy_dataset_list = [] xy_dataset_list.append( reports.XYDataSet(LOAD_VS_OAT_TABLE_NAME, 'oat', 'load')) scatter_plot = reports.ScatterPlot( xy_dataset_list, title='Energy Signature', x_label='Outside Air Temperature [F]', y_label='Energy [kWh]') report.add_element(scatter_plot) text_guide2 = reports.TextBlurb( text= "The lack of any pattern may indicate your building is not sensitive to outdoor temperature." ) report.add_element(text_guide2) text_guide3 = reports.TextBlurb( text= "A steep slope indicates high sensitivity to outdoor temperature.") report.add_element(text_guide3) text_guide4 = reports.TextBlurb( text= "The balance point is the temperature at which the building does not require any heating or cooling." ) report.add_element(text_guide4) 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