-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPY_EnPI_Facility_Spyder.py
59 lines (39 loc) · 1.69 KB
/
PY_EnPI_Facility_Spyder.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 11 23:02:20 2020
@author: 7rp
"""
from matplotlib import pyplot as plt
from IPython import get_ipython
get_ipython().magic('reset -sf')
plt.close('all')
from PY_EnPI_Clone import EnPI_Load_Data, EnPI_PythonEdition
# Specify the path and file name for excel file containing facility data
folder_path = ''
file_name = 'Acme_Hastings.xlsx'
sheet_name = 'Hastings'
# Enter the columns in the excel file with the data to be analyzed
Data_Columns = 'A,C:E'
# Give the name of the variables used for unit of output
Production_Header = "Production (tons)"
# Give the number of utilities and relevant variables
n_utilities = 2
n_relevant_variables = 1
# Specify the range for Better Plants Reporting
Reporting_Range_Start = '2007-01-01'
Reporting_Range_End = '2010-01-01'
# Choose Method (Regression or Energy Intensity)
Method = "Energy Intensity"
# Show Regression Models (if True, shows all valid models but does not do EnPI analysis)
Show_Models = False
# Index of Chosen Models (-1 for best adjusted R2, [] for model information)
Chosen_Models = []
# Specify range for models years to be tested (leave as '' if same as reporting range)
Model_Range_Start = ''
Model_Range_End = ''
# Save the Results?
Save_Results = False
# Get data from Excel File
Facility_Data = EnPI_Load_Data(folder_path + file_name, sheet_name, Data_Columns, n_utilities, n_relevant_variables)
# Get the EnPI Results
EnPI_Results = EnPI_PythonEdition(Facility_Data, n_utilities, n_relevant_variables, Reporting_Range_Start, Reporting_Range_End, Model_Range_Start, Model_Range_End, Chosen_Models, Method, Show_Models, Production_Header)