Clustering of Goat Buyers in West Java with K-Means Algorithm - Faizatul Mukaromah; I Kadek Dwi Nuryana (Universitas Negeri Surabaya, 2025)
The advancement of information technology has encouraged the utilization of data as a strategic resource across various fields, including the livestock sector. This study aims to implement the K-Means algorithm to segment goat buyers in West Java Province based on demographic characteristics such as age, marital status, geographic location, type of goat purchased, and transaction methods. This segmentation is expected to assist business actors in understanding purchasing patterns and designing more targeted marketing and distribution strategies. The study uses 1,250 transaction records and follows the stages of selection, preprocessing, transformation, data mining, and interpretation using the Knowledge Discovery in Databases (KDD) approach. Geographic distances between buyer locations and reference points were calculated using the Haversine formula. To determine the optimal number of clusters, the Elbow Method and Silhouette Score were used, with the best result obtained at a Silhouette score of 0.16 for 3 clusters. Each cluster was analyzed based on modal characteristics such as age, marital status, district, type of goat purchased, number of goats per transaction, purchase purpose, delivery method, payment method, as well as Recency, Frequency, and Monetary (RFM). The results indicate that the K-Means algorithm is effective in grouping goat buyers into relevant and meaningful segments. This information can be used by farmers and stakeholders to improve distribution efficiency, stock optimization, and data-driven marketing strategies. This study also emphasizes the importance of integrating technologies such as Python and Streamlit for interactive visualization and ID-based buyer tracking in advanced analytics.