{"id":30290420,"url":"https://github.com/abidhasanrafi/pharma-sales-analytics","last_synced_at":"2026-04-08T18:06:52.621Z","repository":{"id":307990629,"uuid":"1031280969","full_name":"AbidHasanRafi/pharma-sales-analytics","owner":"AbidHasanRafi","description":"A Streamlit-powered web application for analyzing pharmaceutical sales performance across teams, products, and territories.","archived":false,"fork":false,"pushed_at":"2025-08-03T12:33:24.000Z","size":886,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-25T09:21:41.068Z","etag":null,"topics":["matplotlib","numpy","pandas","plotly","sales-analysis","scikit-learn","seaborn","streamlit"],"latest_commit_sha":null,"homepage":"https://pharma-sales-analytics.streamlit.app","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AbidHasanRafi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-03T12:11:40.000Z","updated_at":"2025-08-03T12:34:37.000Z","dependencies_parsed_at":"2025-08-03T14:33:38.174Z","dependency_job_id":"0d7f252a-7e24-49ea-a3ab-e006d6edb9a1","html_url":"https://github.com/AbidHasanRafi/pharma-sales-analytics","commit_stats":null,"previous_names":["abidhasanrafi/pharma-sales-analytics"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AbidHasanRafi/pharma-sales-analytics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbidHasanRafi%2Fpharma-sales-analytics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbidHasanRafi%2Fpharma-sales-analytics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbidHasanRafi%2Fpharma-sales-analytics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbidHasanRafi%2Fpharma-sales-analytics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AbidHasanRafi","download_url":"https://codeload.github.com/AbidHasanRafi/pharma-sales-analytics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbidHasanRafi%2Fpharma-sales-analytics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31567348,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["matplotlib","numpy","pandas","plotly","sales-analysis","scikit-learn","seaborn","streamlit"],"created_at":"2025-08-16T23:13:13.067Z","updated_at":"2026-04-08T18:06:52.597Z","avatar_url":"https://github.com/AbidHasanRafi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pharma Sales Analytics\n\n## Overview\nA Streamlit-powered web application for analyzing pharmaceutical sales performance across teams, products, and territories. The dashboard provides:\n\n- Interactive visualizations of sales trends\n- Performance benchmarking\n- Target achievement analysis\n- Predictive analytics capabilities\n- Custom report generation\n\n## Features\n\n### 📊 Dashboard\n- Key performance indicators (KPIs) at a glance\n- Sales trends by therapeutic group\n- Monthly sales performance tracking\n- Top product and team performance analysis\n\n### 🔍 Data Explorer\n- Interactive filtering by multiple dimensions\n- Custom chart creation (bar, line, scatter, etc.)\n- Real-time data statistics\n- Export capabilities\n\n### 📈 Performance Analysis\n- Team/Product/Territory performance breakdowns\n- Target vs actual comparisons\n- Achievement rate calculations\n- Top/bottom performer identification\n\n### 🤖 Predictive Analytics\n- Sales forecasting models\n- Performance prediction engine\n- AI-powered recommendations\n- What-if scenario analysis\n\n### 📑 Report Generator\n- Customizable report templates\n- Automated insights generation\n- Multi-format export (PDF, Excel, PPT)\n\n## Data Requirements\nThe application expects CSV data with the following structure:\n\n| Column | Description | Example |\n|--------|-------------|---------|\n| `YearMonth` | Date in month-year format | `May-25` or `2025-05` |\n| `RSM` | Regional Sales Manager | `B1` |\n| `FM` | Field Manager | `B10` |\n| `MPO` | Medical Representative | `EMP001` |\n| `Team` | Sales team name | `Nugenta` |\n| `Pcode` | Product code | `P1234` |\n| `Pname` | Product name | `MARVELON TAB` |\n| `Brand` | Brand name | `Marvelon` |\n| `Thgroup` | Therapeutic group | `Contraceptives` |\n| `TargetQnty` | Target quantity | `200` |\n| `SoldQnty` | Actual quantity sold | `227` |\n| `TargetValue` | Target sales value | `18000` |\n| `SoldTP` | Actual sales value | `20606` |\n\n## Installation\n\n### Prerequisites\n- Python 3.8+\n- pip package manager\n\n### Setup\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/AbidHasanRafi/pharma-sales-analytics.git\n   cd pharma-sales-analytics\n   ```\n\n2. Create a virtual environment:\n   ```bash\n   python -m venv venv\n   source venv/bin/activate  # On Windows use `venv\\Scripts\\activate`\n   ```\n\n3. Install dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n## Usage\n1. Prepare your sales data in CSV format (or see data in the repository)\n2. Run the application:\n   ```bash\n   streamlit run app.py\n   ```\n3. Upload your CSV file when prompted\n4. Explore the different analysis modules using the sidebar navigation\n\n## Configuration\nThe app can be customized by modifying the following in `app.py`:\n\n- **Color scheme**: Edit the CSS in the `st.markdown` section\n- **Default filters**: Adjust in the Data Explorer section\n- **Model parameters**: Modify in the Predictive Analytics section\n\n## Dependencies\n- Streamlit\n- Pandas\n- NumPy\n- Plotly\n- Scikit-learn\n- Matplotlib\n- Seaborn\n\n## Support\nFor issues or feature requests, please [open an issue](https://github.com/abidhasanrafi/pharma-sales-analytics/issues) on GitHub.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabidhasanrafi%2Fpharma-sales-analytics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabidhasanrafi%2Fpharma-sales-analytics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabidhasanrafi%2Fpharma-sales-analytics/lists"}