This guide is designed to help you generate operation profile reports for an Energy dataset provided Python script. The reports analyze equipment performance based on data provided and are visualized through charts and tables. The Python script reads the data from CSV files and generates the HTML reports in the charts/
directory and viewable on your browser.
- Python versions 3.8, 3.9, or 3.10 installed on your computer.
- Basic familiarity with command-line operations.
- Access to the CSV data files.
If you do not meet the minimum requirements, that's okay!
You can still run the script on your local machine by skipping over to the section 'Runing The Executable File' within this guide.
First, clone this repository to your local machine using the command below:
git clone [repository-url]
# Replace [repository-url] with the actual URL of this repository.
Navigate to the Project Directory Change the directory to where the repository is cloned.
cd path/to/repository
Please refer to the following links for more information on cloning a repository:
If this repository is being shared with you via a zip file or other means, you can skip cloning the repository steps.
Please do the following below by setting up a virtual environment and installing the required packages using the requirements.txt file.:
Before running the script, set up a Python virtual environment. This will ensure that the required packages do not conflict with other Python projects on your system.
For Windows:
python -m venv venv
venv\Scripts\activate
For macOS/Linux:
python3 -m venv venv
source venv/bin/activate
With the virtual environment activated, install the required Python packages using the requirements.txt file:
pip install -r requirements.txt
Before running the main.py script make sure to have the CSV data files in the data/ directory. The CSV files should have the following column names:
'Timestamp', 'Power (MW)', 'Press (psig)', 'Temp (°F)','PowerSwing (MW)'
Run the script to generate the report by using a command-line interface (CLI) or an integrated development environment (IDE). The following command runs the script in the CLI:
python main.py
After running the script, check the charts/
directory for the generated reports. The reports automatically open in your default web browser. The reports are saved as HTML files and contain charts and tables that analyze the equipment performance based on the provided data.
It is using a module called plotly
to generate the charts and tables. You can take a screenshot of the charts and tables and save them as images to add to your reports. Every chart/table has a download button that allows you to save the chart/table as an image. This is located at the top right corner of the chart/table.
If you do not have Python installed on your local machine, you can run the executable file main.exe. The executable file is a standalone version of the main.py script that does not require Python to execute.
Make sure their are CSV data files in the data/ directory that meet the requirements or else the Executable file will not run. Refer to Usage
section of this guide for more information.
Refer to the main.log file to track the progress of the script.
Simply double-click the main.exe file to run the script and generate the reports.
Note: Windows may display a security warning when running the executable file. Click More info
and then Run anyway
to proceed.
Refer to the Directory and File Structure
section for more information about the directory structure and file contents.
If you want to generate the executable file from the main.py script, you can use the pyinstaller
package. First, install the pyinstaller
package using the following command:
pip install pyinstaller
Then, run the following command to generate the executable file:
pyinstaller --onefile main.py
Alternatively, if you are having issues with the above command, stating dependencies not found, you can use the following command:
# example of installing a dependency that is not found
pyinstaller --onefile --hidden-import=iapws --add-data "D:\PyScripts\energy_report_assessment\venv\Lib\site-packages\iapws;iapws" main.py
If you encounter any issues while installing packages or running the script, please ensure that:
- Your Python version is correct (3.8, 3.9, or 3.10).
- You have activated the virtual environment as described above.
- The CSV data files are placed in the correct directory (charts/).
For any further assistance, please contact the repository maintainer or your IT support.
The charts/
directory contains the CSV data files used to generate the reports. The script reads the data from these files and generates the reports in the same directory.
The data/
directory contains the CSV data files used to generate the reports. The script reads the data from these files and generates the reports in the same directory.
The venv/
directory contains the Python virtual environment used to install the required packages.
The deliverables.pdf
file contains the deliverables of the project, including the project plan, report, and other relevant documents.
The main.log
file contains the log of the main script, providing information about its execution and any errors encountered.
The main.py
file is the main script that generates the operation profile reports.
The main.exe
file is the executable version of the main script that generates the operation profile reports.
The README.md
file is the project's main documentation, providing information about the project, its usage, and other relevant details.
The README.pdf
file is the project's main documentation, providing information about the project, its usage, and other relevant details. The file is in PDF format rather than Markdown.
The requirements.txt
file contains the required Python packages for the project.
The sandbox.ipynb
file is a testing and sandbox file used to assist in the development of the code.
Your contributions are welcome!
This project is licensed under the MIT License.
Jean Paul Mitterhofer
jp86mitter@gmail.com