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|
|
|
| 1 |
+
# AI-Powered Excel Data Analysis App
|
| 2 |
+
|
| 3 |
+
A Streamlit application that automates Excel data processing, provides intelligent analysis using Google's Gemini AI, and offers interactive visualizations. Perfect for analyzing EOC (Emergency Operations Center) data with automated designation-to-cadre mapping.
|
| 4 |
+
|
| 5 |
+
## Features
|
| 6 |
+
|
| 7 |
+
- **File Upload & Processing**
|
| 8 |
+
- Supports CSV, XLS, XLSX formats
|
| 9 |
+
- Automatic data cleaning
|
| 10 |
+
- Smart designation to cadre mapping
|
| 11 |
+
- Handles multi-level headers
|
| 12 |
+
|
| 13 |
+
- **Interactive Data Preview**
|
| 14 |
+
- Column selection
|
| 15 |
+
- Global search functionality
|
| 16 |
+
- Advanced column-specific filters
|
| 17 |
+
- Customizable row display
|
| 18 |
+
- Hide/show index options
|
| 19 |
+
|
| 20 |
+
- **AI-Powered Analysis**
|
| 21 |
+
- Intelligent data insights using Gemini AI
|
| 22 |
+
- Natural language queries
|
| 23 |
+
- Automated data summaries
|
| 24 |
+
- Pattern recognition
|
| 25 |
+
- Follow-up question suggestions
|
| 26 |
+
|
| 27 |
+
- **Data Visualization**
|
| 28 |
+
- Dynamic charts and graphs
|
| 29 |
+
- Cadre distribution analysis
|
| 30 |
+
- District-wise visualizations
|
| 31 |
+
- Interactive dashboards
|
| 32 |
+
- Correlation analysis
|
| 33 |
+
|
| 34 |
+
## Setup & Installation
|
| 35 |
+
|
| 36 |
+
1. **Clone the repository**
|
| 37 |
+
```bash
|
| 38 |
+
git clone https://github.com/HussainM899/AI-Data-Processing-Analytics.git
|
| 39 |
+
cd AI-Data-Processing-Analytics
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
2. **Create and activate virtual environment**
|
| 43 |
+
```bash
|
| 44 |
+
python -m venv venv
|
| 45 |
+
source venv/bin/activate # For Linux/Mac
|
| 46 |
+
venv\Scripts\activate # For Windows
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
3. **Install dependencies**
|
| 50 |
+
```bash
|
| 51 |
+
pip install -r requirements.txt
|
| 52 |
+
```
|
| 53 |
+
|
| 54 |
+
4. **Set up environment variables**
|
| 55 |
+
- Create a `.env` file in the root directory
|
| 56 |
+
- Add required credentials (see `.env.example`)
|
| 57 |
+
|
| 58 |
+
## Required Environment Variables
|
| 59 |
+
```.env
|
| 60 |
+
env
|
| 61 |
+
GOOGLE_APPLICATION_CREDENTIALS=path/to/credentials.json
|
| 62 |
+
GOOGLE_API_KEY=your_api_key_here
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
## Usage
|
| 66 |
+
|
| 67 |
+
1. **Start the application**
|
| 68 |
+
```bash
|
| 69 |
+
streamlit run app.py
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
2. **Upload Data**
|
| 73 |
+
- Use the file uploader to import your Excel/CSV file
|
| 74 |
+
- The app automatically processes and cleans the data
|
| 75 |
+
- Multi-level headers are automatically handled
|
| 76 |
+
|
| 77 |
+
3. **Analyze Data**
|
| 78 |
+
- Use the navigation sidebar to switch between modes:
|
| 79 |
+
- Data Processing
|
| 80 |
+
- Analysis & Visualization
|
| 81 |
+
- About
|
| 82 |
+
- Ask questions in natural language
|
| 83 |
+
- View automated insights and visualizations
|
| 84 |
+
|
| 85 |
+
4. **Export Results**
|
| 86 |
+
- Download processed data in Excel format
|
| 87 |
+
- Export updated designation mappings
|
| 88 |
+
- Save analysis reports
|
| 89 |
+
|
| 90 |
+
## Project Structure
|
| 91 |
+
```
|
| 92 |
+
AI-Data-Processing-Analytics/
|
| 93 |
+
βββ app.py # Main application file
|
| 94 |
+
βββ requirements.txt # Project dependencies
|
| 95 |
+
βββ .env.example # Example environment variables
|
| 96 |
+
βββ .gitignore # Git ignore rules
|
| 97 |
+
βββ README.md # Project documentation
|
| 98 |
+
```
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
## Dependencies
|
| 102 |
+
|
| 103 |
+
- `streamlit`: Web application framework
|
| 104 |
+
- `pandas`: Data manipulation and analysis
|
| 105 |
+
- `plotly`: Interactive visualizations
|
| 106 |
+
- `google-generativeai`: Gemini AI integration
|
| 107 |
+
- `langchain-google-genai`: LangChain integration
|
| 108 |
+
- `python-dotenv`: Environment variable management
|
| 109 |
+
- `openpyxl`: Excel file handling
|
| 110 |
+
|
| 111 |
+
## Security Notes
|
| 112 |
+
|
| 113 |
+
- Never commit sensitive credentials
|
| 114 |
+
- Use environment variables for API keys
|
| 115 |
+
- Keep service account JSON file secure
|
| 116 |
+
- Regularly rotate credentials
|
| 117 |
+
- Avoid sharing API keys publicly
|
| 118 |
+
|
| 119 |
+
## Features in Detail
|
| 120 |
+
|
| 121 |
+
### Data Processing
|
| 122 |
+
- Automatic cleaning of data
|
| 123 |
+
- Handling of missing values
|
| 124 |
+
- Removal of duplicates
|
| 125 |
+
- Smart string cleaning
|
| 126 |
+
- Multi-level header handling
|
| 127 |
+
|
| 128 |
+
### AI Analysis
|
| 129 |
+
- District-wise analysis
|
| 130 |
+
- Cadre distribution insights
|
| 131 |
+
- Trend identification
|
| 132 |
+
- Anomaly detection
|
| 133 |
+
- Custom query handling
|
| 134 |
+
|
| 135 |
+
### Visualization
|
| 136 |
+
- Pie charts for distributions
|
| 137 |
+
- Bar charts for comparisons
|
| 138 |
+
- Histograms for numerical data
|
| 139 |
+
- Correlation matrices
|
| 140 |
+
- Interactive filters
|
| 141 |
+
|
| 142 |
+
## Contributing
|
| 143 |
+
|
| 144 |
+
1. Fork the repository
|
| 145 |
+
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
|
| 146 |
+
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
|
| 147 |
+
4. Push to the branch (`git push origin feature/AmazingFeature`)
|
| 148 |
+
5. Open a Pull Request
|
| 149 |
+
|
| 150 |
+
## License
|
| 151 |
+
|
| 152 |
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
| 153 |
+
|
| 154 |
+
## Contact
|
| 155 |
+
|
| 156 |
+
Hussain - hussainmurtaza899@gmail.com
|
| 157 |
+
Project Link: [https://github.com/HussainM899/AI-Data-Processing-Analytics](https://github.com/HussainM899/AI-Data-Processing-Analytics)
|
| 158 |
+
|
| 159 |
+
---
|
| 160 |
+
Built using Streamlit and Gemini AI
|