Implementasi Algoritma K-Means Clustering dengan Python untuk Analisis Produksi Bawang Merah di Indonesia - Jafar Pahrudin; Sri Mulyeni (SOSIAL : Jurnal Ilmiah Pendidikan IPS, 2025)
Shallots are one of the most strategic horticultural commodities in Indonesia, with high demand and varying production levels across regions. Differences in productivity between areas often create challenges in managing distribution and formulating national food policies. This study aims to analyze shallot production data in Indonesia by applying the K-Means Clustering algorithm using Python. The production data were collected from official agricultural statistics publications, followed by preprocessing, normalization, and determination of the optimal number of clusters using the Elbow method and Silhouette Score. The clustering results show the formation of several groups representing regions with high, medium, and low production levels. Visualization of the clustering results reveals the distribution patterns of shallot production, which can serve as a basis for supporting policy formulation in the development of shallot production centers in Indonesia. Thus, the application of K-Means Clustering with Python proves to be an effective approach to provide clearer insights into regional production variations and can be utilized as an analytical tool to support decision-making in the agricultural sector.