Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/harshsahu23/wabtec3_brakesgui_shared
💻 App to visualize error logs and dump files generated by the braking system of locomotives 🚅
https://github.com/harshsahu23/wabtec3_brakesgui_shared
csv data-visualization graphs pandas plotly python streamlit visualization
Last synced: 5 days ago
JSON representation
💻 App to visualize error logs and dump files generated by the braking system of locomotives 🚅
- Host: GitHub
- URL: https://github.com/harshsahu23/wabtec3_brakesgui_shared
- Owner: HarshSahu23
- Created: 2024-11-16T06:04:07.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-02-02T23:47:46.000Z (12 days ago)
- Last Synced: 2025-02-03T00:26:09.889Z (12 days ago)
- Topics: csv, data-visualization, graphs, pandas, plotly, python, streamlit, visualization
- Language: Python
- Homepage: https://wabtec-brakesgui-vitbhopal.streamlit.app/
- Size: 1.98 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Error Analyzer 📊
> A Python-based application for analyzing error codes from CSV files with interactive visualizations.
## Features ✨
- Interactive GUI built with Streamlit
- Real-time error code analysis
- Dynamic visualization using Plotly
- CSV file processing and management
- Comprehensive error frequency reporting## Installation 🚀
### Prerequisites
- Python 3.8+
- Git### Quick Start
1. Clone the repository:
```bash
git clone https://github.com/HarshSahu23/Wabtec3_BrakesGUI_shared.git
cd Wabtec3_BrakesGUI_shared
```2. Set up virtual environment:
```bash
python -m venv venv# Windows
.\venv\Scripts\activate# Unix/MacOS
source venv/bin/activate
```3. Install dependencies:
```bash
pip install -r requirements.txt
```## Project Structure 📁
```
.
├── assets # App/Repo related assets here.
├── build_scripts # Folder for Build related scripts.
│ ├── build_exe.py -> Script to generate exec.
│ ├── exclude_modules.py -> List of modules to be excluded.
│ └── main.spec -> Specifications that can be used with pyinstaller.
├── csv # CSV files for testing purposes.
├── instructions.md # Contains general instructions about project (to be merged with README).
├── readme.md # Project instructions.
├── requirements.txt # Required Python packages list.
└── src # Containes the source code.
├── backend -> Code for backend and data processing.
│ ├── data_extractor ->> Code for Data extraction.
│ │ ├── dataframe_classifier.py - Identifies the type of log being processed.
│ │ └── dataframe_extractor.py - Extracts the CSV data as a dataframe.
│ ├── data_handler.py ->> Code common interface that exposes all the backend functionality to frontend.
│ ├── data_processors ->> Code for analytical processing and data formatting.
│ │ ├── detailed_data_for_error_grouper.py - Generate custom dataframe table to obtain detailed data.
│ │ ├── dmp_processor.py - Dump file procesing and formatting.
│ │ ├── ecl_processor.py - Error log processor.
│ │ ├── error_grouper_for_error_log_tab.py - Error group generator for error log tab in UI.
│ │ └── table_maker_for_summary_tab.py - Table maker for summary tab in UI.
│ ├── json_config_loader.py ->> Loads JSON config from the directory.
│ ├── plotter.py ->> Plotting functions for the use in CLI.
│ └── utils ->> Utility code.
│ ├── exceptions.py - Custom exception class code.
│ ├── folder_validator.py - Folder path validator.
│ └── logging_config.py - Logging config file.
├── backup_config.json -> Backup config JSON in case some corruption of original happens.
├── config.json -> Config file for the app.
├── frontend -> Frontend code Part.
│ ├── cmd_toolset.py ->> Code for cmd toolset.
│ ├── compute ->> Computes various charting elements.
│ │ ├── calculate_percentages.py - Annotaions on the chart.
│ │ ├── summary_viz.py - Chart for the summary tab.
│ │ ├── update_chart.py - Updates chart when specific button clicked in error log tab.
│ │ └── visualizations.py - Charts for the error log tab.
│ ├── gui.py ->> Main GUI entrypoint.
│ ├── tabs ->> Contains GUI code for different tabs.
│ └── utils ->> Utility functions for various widgets.
│ ├── create_tab_labels.py - CSS designs for labeling.
│ ├── css_utils.py - CSS designs for error log tab.
│ ├── edit_folder_metadata.py - Widget for editing Coach and depot data
│ ├── render_section_header.py - CSS for section header.
│ ├── render_sidebar.py - Display custom sidebar.
│ └── sidebar_utils.py - Widgets displayed inside sidebar.
├── main.py -> Main entry code for the app.
└── tester.ipynb -> Tester python notebook to test the new functions.
```## Usage 💡
1. Launch the application:
```bash
python main.py
```2. Process error logs:
- Place CSV files in the `csv/` directory
- Input expected error descriptions
- View analysis results and visualizationsOR
## Use the GUI 💻
### A) Browse Files to upload :
### B) Select files to upload :
### C) Select/Search various errors
### D) Use dashboard to view charts & interact with them:
### E) View various charts:
### F) Get Detailed Data of any selected errors, apply filters
### G) View Dump Log
### H) Detailed Data for Dump Files
## Development 🛠️
### Code Style
- Follow [PEP 8](https://www.python.org/dev/peps/pep-0008/) guidelines
- Use descriptive variable and function names
- Include docstrings and comments where appropriate### Testing
```bash
# Run tests
python -m pytest tests/# Check code coverage
python -m pytest --cov=src tests/
```## Contributing 🤝
1. Fork the repository
2. Create a feature branch:
```bash
git checkout -b feature/amazing-feature
```3. Commit your changes:
```bash
git commit -m 'Add amazing feature'
```4. Push to your branch:
```bash
git push origin feature/amazing-feature
```5. Open a Pull Request
### Contribution Guidelines
- Write clear commit messages
- Include tests for new features
- Update documentation as needed
- Submit PRs to the `develop` branch## License 📝
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
---
Made with ❤️ by Team ^_^ - Exceed 3.0