{"id":25808124,"url":"https://github.com/misaghmomenib/social-engagement-analysis","last_synced_at":"2025-11-21T18:03:35.655Z","repository":{"id":278378926,"uuid":"935426331","full_name":"MisaghMomeniB/Social-Engagement-Analysis","owner":"MisaghMomeniB","description":"In This Repository, Using a Csv File Related to Social Network Interactions I Made a General Analysis That You Can Have at Your Disposal","archived":false,"fork":false,"pushed_at":"2025-02-19T18:50:39.000Z","size":192,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T05:50:10.654Z","etag":null,"topics":["data-analysis","data-visualization","git","open-source","pandas-python","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MisaghMomeniB.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2025-02-19T12:29:58.000Z","updated_at":"2025-02-24T08:58:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"f294dc22-b7cb-47ff-b946-e085cc4ee3e1","html_url":"https://github.com/MisaghMomeniB/Social-Engagement-Analysis","commit_stats":null,"previous_names":["misaghmomenib/social-engagement-analysis"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MisaghMomeniB/Social-Engagement-Analysis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MisaghMomeniB%2FSocial-Engagement-Analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MisaghMomeniB%2FSocial-Engagement-Analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MisaghMomeniB%2FSocial-Engagement-Analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MisaghMomeniB%2FSocial-Engagement-Analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MisaghMomeniB","download_url":"https://codeload.github.com/MisaghMomeniB/Social-Engagement-Analysis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MisaghMomeniB%2FSocial-Engagement-Analysis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285663967,"owners_count":27210638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-21T02:00:06.175Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["data-analysis","data-visualization","git","open-source","pandas-python","python"],"created_at":"2025-02-27T21:58:26.950Z","updated_at":"2025-11-21T18:03:35.649Z","avatar_url":"https://github.com/MisaghMomeniB.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📊 Social Engagement Analysis\n\nA data-driven exploration project analyzing **social media engagement patterns** using Python \u0026 SQL. Designed to reveal what types of content, interactions, and metrics truly resonate with audiences.\n\n---\n\n## 📋 Table of Contents\n\n1. [Overview](#overview)  \n2. [Features](#features)  \n3. [Data \u0026 Approach](#data--approach)  \n4. [Getting Started](#getting-started)  \n5. [Usage Examples](#usage-examples)  \n6. [Tech Stack](#tech-stack)  \n7. [Insights \u0026 Metrics](#insights--metrics)  \n8. [Contributing](#contributing)  \n9. [License](#license)\n\n---\n\n## 💡 Overview\n\nThis repository focuses on **measuring and interpreting social media engagement**, leveraging aggregated data on reactions, comments, shares, and post types. It combines:\n\n- **Data cleaning \u0026 exploration**  \n- **Clustering \u0026 segmentation**  \n- **Visual dashboards**  \n- **Custom SQL metrics and aggregations**\n\nAims to help developers, marketers, and data analysts understand what drives meaningful engagement. :contentReference[oaicite:1]{index=1}\n\n---\n\n## ✅ Features\n\n- 📦 **Data Preprocessing**: Load `'engagement_data.csv'`, clean missing values, encode features  \n- 🔍 **Exploratory Analysis**: Plot distributions, correlation matrices, and summary stats  \n- 🧠 **Clustering**: K-means to segment posts based on reaction-comment-share profiles :contentReference[oaicite:2]{index=2}  \n- 🎯 **SQL-based Metrics**: Calculate key engagement KPIs like engagement rate, share ratio, reaction breakdowns  \n- 📈 **Visual Reports**: Charts and tables to highlight insights across clusters and content types\n\n---\n\n## 🗂️ Data \u0026 Approach\n\n1. **Data Source**: Replace or extend `data/engagement_data.csv` with your platform’s export. Example columns: likes, loves, wows, hahas, comments, shares, status_type (link/photo/status/video)  \n2. **Cleaning**: Use Pandas to fill NAs, normalize columns, encode `\"status_type\"` as dummy variables  \n3. **EDA**: Visualize distributions using Matplotlib/Seaborn, examine feature correlations  \n4. **Clustering**: Apply K-means, determine optimal `k` using elbow/silhouette methods  \n5. **SQL Metrics**: Write `.sql` scripts to aggregate by date, type, cluster — e.g., `engagement_rate = total_interactions / followers`  \n6. **Visualization**: Output static charts via notebook and export as `.png` for reporting\n\n---\n\n## ⚙️ Getting Started\n\n**Clone \u0026 setup**:\n```bash\ngit clone https://github.com/MisaghMomeniB/Social-Engagement-Analysis.git\ncd Social-Engagement-Analysis\npip install -r requirements.txt\n````\n\n**Run notebook**:\n\n```bash\njupyter notebook Social_Engagement_Analysis.ipynb\n```\n\n**Use SQL scripts**:\n\n```bash\nsqlite3 engagement.db \u003c sql/metrics.sql\n```\n\n*(Or adapt to PostgreSQL/MySQL as needed.)*\n\n---\n\n## 🛠️ Usage Examples\n\n### 🔧 Python - K-means clustering\n\n```python\ndf = pd.read_csv('data/engagement_data.csv')\nfeatures = ['likes','comments','shares']\nkmeans = KMeans(n_clusters=3); df['cluster'] = kmeans.fit_predict(df[features])\nsns.scatterplot(data=df, x='likes', y='comments', hue='cluster')\n```\n\n### 🧮 SQL - Engagement Rate\n\n```sql\nSELECT post_type,\n       SUM(likes + comments + shares)::float / SUM(followers) AS eng_rate\nFROM posts\nGROUP BY post_type;\n```\n\n### 📊 Visual Example\n\n* Reaction \u0026 share distribution per cluster\n* Post type vs. average engagement plot\n* Cluster profiles output to `reports/cluster_profiles.csv`\n\n---\n\n## 🔧 Tech Stack\n\n* **Python 3.10+**\n\n  * Pandas, NumPy\n  * Scikit-learn\n  * Matplotlib, Seaborn\n* **Jupyter Notebook** for exploratory analysis\n* **SQLite / PostgreSQL** for SQL aggregations\n* **Git** \u0026 **GitHub** for version control\n\n---\n\n## 📈 Insights \u0026 Metrics\n\n* Profiled content by cluster – e.g., “Cluster A has 2x more shares than others”\n* Compared engagement rates across post types\n* Identified top content features correlated with high engagement\n\nMetrics used include:\n\n* Engagement Rate = `(likes + comments + shares) / followers`\n* Reaction Ratios per post\n* Cluster-based behavior segmentation\n\n---\n\n## 🤝 Contributing\n\nContributions welcome!\n\n1. Fork this repo\n2. Create a feature branch (`feature/...`)\n3. Commit changes with clear messages\n4. Open a pull request for review\n\n---\n\n## 📄 License\n\nThis project is licensed under the **MIT License** — see the `LICENSE` file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisaghmomenib%2Fsocial-engagement-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmisaghmomenib%2Fsocial-engagement-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisaghmomenib%2Fsocial-engagement-analysis/lists"}