{"id":15159754,"url":"https://github.com/majobasgall/customer_segmentation_using_kmeans_and_streamlit","last_synced_at":"2026-02-26T11:33:20.234Z","repository":{"id":255173224,"uuid":"848734413","full_name":"majobasgall/customer_segmentation_using_kmeans_and_streamlit","owner":"majobasgall","description":"Streamlit app with a business case study focused on customer segmentation using K-means clustering","archived":false,"fork":false,"pushed_at":"2026-02-11T19:22:13.000Z","size":33,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-12T03:44:24.342Z","etag":null,"topics":["customer-segmentation","kmeans-clustering","python","streamlit"],"latest_commit_sha":null,"homepage":"https://customer-segmentation-using-kmeans.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/majobasgall.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-28T10:04:02.000Z","updated_at":"2026-02-11T19:21:10.000Z","dependencies_parsed_at":"2024-12-21T07:25:09.389Z","dependency_job_id":"d53e0c43-9728-4642-8a2c-2a9cd2d4fb15","html_url":"https://github.com/majobasgall/customer_segmentation_using_kmeans_and_streamlit","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"7e0190b339efbbeaf519f0e10506ee07559f1a04"},"previous_names":["majobasgall/customer_segmentation_using_kmeans_and_streamlit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/majobasgall/customer_segmentation_using_kmeans_and_streamlit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/majobasgall%2Fcustomer_segmentation_using_kmeans_and_streamlit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/majobasgall%2Fcustomer_segmentation_using_kmeans_and_streamlit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/majobasgall%2Fcustomer_segmentation_using_kmeans_and_streamlit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/majobasgall%2Fcustomer_segmentation_using_kmeans_and_streamlit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/majobasgall","download_url":"https://codeload.github.com/majobasgall/customer_segmentation_using_kmeans_and_streamlit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/majobasgall%2Fcustomer_segmentation_using_kmeans_and_streamlit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29857551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T08:51:08.701Z","status":"ssl_error","status_checked_at":"2026-02-26T08:50:19.607Z","response_time":89,"last_error":"SSL_read: 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":["customer-segmentation","kmeans-clustering","python","streamlit"],"created_at":"2024-09-26T22:00:22.857Z","updated_at":"2026-02-26T11:33:20.215Z","avatar_url":"https://github.com/majobasgall.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Customer Segmentation Using K-Means Clustering\n\n## Overview\n\nThis Streamlit application demonstrates customer segmentation using the K-means clustering algorithm. The app uses a synthetic dataset that simulates customer behavior based on various features such as annual income, spending score, and age. The goal is to segment customers into distinct groups, which can help businesses target different customer segments with tailored marketing strategies.\n\n## Features\n\n- **Data Input:** Synthetic dataset with customer information.\n- **User Input:** Adjustable number of clusters for the K-means algorithm.\n- **Data Display:** View the clustered data and cluster centers.\n- **Visualization:** Scatter plot visualization of customer segments based on selected features.\n- **Summary and Insights:** Business insights and potential applications of the results.\n\n## Dependencies\n- **Streamlit**\n- **pandas**\n- **numpy**\n- **scikit-learn**\n- **matplotlib**\n\n# Usage\nOnce the app is running (`streamlit run customer_segmentator.py`), you can adjust the number of clusters using the sidebar slider. The app will automatically re-cluster the data and update the visualizations and insights based on the selected number of clusters.\n\n# Example Use Cases\n- Retail Industry: Segmenting customers based on their purchasing power and spending behavior.\n- Banking Sector: Identifying customer segments for personalized financial products.\n- Marketing: Targeting customer segments with tailored promotional strategies.\n\n# Cluster Analysis and Conclusions\nAs an example, for k=3, the K-means clustering results in the following customer segments:\n\n| Cluster | Average Age | Average Annual Income ($k) | Average Spending Score |\n|---------|-----------|----------------------|------------------------|\n| **0**   | ~ 43      | ~ 50                 | ~ 42.9                 |\n| **1**   | ~ 57      | ~ 102                | ~ 66.9                 |\n| **2**   | ~ 29      | ~ 124                | ~ 40.4                 |\n\n**Some insights from the results:**\n- Cluster 0: Middle-aged, moderate income and spending. Ideal for mid-tier products.\n- Cluster 1: Older, high income, high spenders. Best for premium offerings.\n- Cluster 2: Younger, high income, conservative spenders. Focus on upselling with exclusive offers.\n\n# Deploy the App on Streamlit Cloud:\n\n- Go to Streamlit Cloud (https://share.streamlit.io/)\n- Log in with your GitHub account.\n- Select \"New app\" and link it to your GitHub repository.\n- Choose the branch and the main file (customer_segmentator.py).\n- Click \"Deploy\" to make the app publicly accessible.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmajobasgall%2Fcustomer_segmentation_using_kmeans_and_streamlit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmajobasgall%2Fcustomer_segmentation_using_kmeans_and_streamlit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmajobasgall%2Fcustomer_segmentation_using_kmeans_and_streamlit/lists"}