Analysis of the Spatial Distribution of Rice Prices Acrossprovinces in Indonesia Using the K-Means Algorithm
Abstract
Differences in rice prices across provinces in Indonesia reflect variations in distribution and market conditions that can be analyzed using a data clustering approach. This study aims to map the characteristics of interprovincial rice prices using the K-Means Clustering algorithm. The dataset consists of prices for Premium Rice, Medium Rice, Non-SPHP Medium Rice, and SPHP Rice obtained from official government data. The research stages included data preprocessing, transformation, normalization using StandardScaler, determining the number of clusters using the Elbow Method and Silhouette Score, and visualizing the results using Principal Component Analysis (PCA). The Elbow Method results indicated an efficient point at K = 5, while the highest Silhouette Score of 0.5658 was obtained at K = 7; thus, seven clusters were selected as the best model. PCA visualization reveals that provinces in Indonesia exhibit rice price characteristics that form seven groups with varying degrees of similarity. The research results indicate that the K-Means algorithm is capable of effectively identifying rice price clustering patterns and producing a map that can support the analysis of inter-regional price characteristics as a basis for formulating food distribution policies and stabilizing rice prices in Indonesia.
References
H. V. Christopher, A. A. Purnama, and S. M. M. Harahap, “Application of K-Means Clustering and OR-Tools to Optimize Rice Distribution: A Case Study of Perum Bulog Indonesia,” Applied Information System and Management (AISM), vol. 7, no. 2, pp. 57–63, Sep. 2024, doi: 10.15408/AISM.V7I2.40618.
M. Fariz Fadillah Mardianto et al., “Time Series Clustering Analysis for Increases Food Commodity Prices in Indonesia Based on K-Means Method,” Journal of Human, Earth, and Future, vol. 5, no. 3, pp. 319–329, Sep. 2024, doi: 10.28991/HEF-2024-05-03-02.
A. Karim et al., “Comparison Of Machine Learning Algorithms For Rice Production Prediction,” Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi), vol. 10, no. 2, pp. 407–418, Apr. 2026, doi: 10.29207/RESTI.V10I2.7453.
A. Karim et al., “Optimizing Agricultural Commodity Price Forecasts Using an Ensemble Stacking Method Based on Market and Product Characteristics,” Journal Global Technology Computer, vol. 5, no. 3, pp. 127–135, Aug. 2026, doi: 10.47065/JOGTC.V5I3.11033.
A. Karim and A. P. Juledi, “PCA-Assisted K-Means Clustering of 31 Food Commodity Price Profiles in Indonesia,” International Journal of Informatics and Data Science, vol. 3, no. 1, pp. 23–33, Dec. 2025, doi: 10.64366/IJIDS.V3I1.543.
R. F. Sinaga, M. A. Prabukusumo, and J. Manurung, “Comparison of k-means clustering with hierarchical agglomerative clustering for the analysis of food security of rice sector in Indonesia,” Journal of Intelligent Decision Support System (IDSS), vol. 8, no. 1, pp. 22–33, Mar. 2025, doi: 10.35335/IDSS.V8I1.290.
J. Suryadi, “CLUSTERING KETIDAKCUKUPAN KONSUMSI PANGAN PER KABUPATEN/KOTA MENGGUNAKAN ALGORITMA K-MEANS DAN FUZZY C-MEANS,” Jurnal Komputer dan Informatika, vol. 19, no. 1, pp. 30–35, Apr. 2024, Accessed: Aug. 06, 2026. [Online]. Available: https://journal.untar.ac.id/index.php/JKI/article/view/34579
I. Mujahidin and S. H. Hasanah, “COMPARATIVE ANALYSIS OF K-MEANS, K-MEDOIDS, AND FUZZY C-MEANS FOR CLUSTERING PROVINCES IN INDONESIA BASED ON RICE PRODUCTION IN 2024,” Jurnal Gaussian, vol. 14, no. 2, pp. 356–365, Oct. 2025, doi: 10.14710/J.GAUSS.14.2.356-365.
S. Retno, Bustami, and R. K. Dinata, “Enhancing K-Means Clustering Model to Improve Rice Harvest Productivity Areas in Aceh Utara Using Purity,” Jurnal Nasional Pendidikan Teknik Informatika: JANAPATI, vol. 13, no. 2, pp. 405–418, Jul. 2024, doi: 10.23887/JANAPATI.V13I2.78254.
S. Pardingotan Sipayung and P. Marto Hasugian, “Integration Of Pca And K-Means Clustering For Staple Food Segmentation In Support Of National Food Policy,” Sinkron : jurnal dan penelitian teknik informatika, vol. 9, no. 4, pp. 3175–3189, Oct. 2025, doi: 10.33395/SINKRON.V9I4.15343.
M. Veronica, H. Effendi, and A. Oktafian Saleh, “Clustering Tingkat Kedisiplinan Pegawai Pada Pengadilan Tinggi Palembang Menggunakan Algoritma K-Means,” in SEMINAR NASIONAL CORISINDO, 2023, pp. 261–266.
R. E. Marpaung, “Penerapan Algoritma K-Means Dalam Mengclustering Kualitas Bibit Kelapa Sawit Di PPKS Marihat,” Program Studi Sistem Informasi, vol. 1, no. 1, pp. 7–15, 2022.
I. Melani, B. Priyatna, F. Nurapriani, and S. S. Hilabi, “Implementasi Metode K-Means Clustering Pada Penilaian Kinerja Karyawan PT Kopetri Citra Abadi,” Jurnal Informasi Interaktif, vol. 8, no. 1, pp. 24–30, 2023.
S. P. Lloyd, “Least Squares Quantization in PCM,” IEEE Trans. Inf. Theory, vol. 28, no. 2, pp. 129–137, 1982, doi: 10.1109/TIT.1982.1056489.
T. Kanungo, D. M. Mount, N. S. Netanyahu, C. D. Piatko, R. Silverman, and A. Y. Wu, “An efficient k-means clustering algorithms: Analysis and implementation,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 24, no. 7, pp. 881–892, Jul. 2002, doi: 10.1109/TPAMI.2002.1017616.
M. Ahmed, R. Seraj, and S. M. S. Islam, “The k-means Algorithm: A Comprehensive Survey and Performance Evaluation,” Electronics 2020, Vol. 9, Page 1295, vol. 9, no. 8, p. 1295, Aug. 2020, doi: 10.3390/ELECTRONICS9081295.
W. Purba, W. Siawin, and . H., “Implementasi Data Mining Untuk Pengelompokkan Dan Prediksi Karyawan Yang Berpotensi Phk Dengan Algoritma K-Means Clustering,” Jurnal Sistem Informasi dan Ilmu Komputer Prima(JUSIKOM PRIMA), vol. 2, no. 2, pp. 85–90, 2019, doi: 10.34012/jusikom.v2i2.429.
U. Surapati and M. Jannah, “Penerapan Data Mining Menggunakan Metode K-Means Untuk Mengetahui Minat Customer Dalam Pembelian Merchandise Kpop,” Jurnal Sains dan Teknologi, vol. 5, no. 3, pp. 875–884, 2024, doi: 10.55338/saintek.v5i3.2739.
G. Karagiannis and P. Ravanos, “On the use of Malmquist productivity indices for intertemporal performance assessment by means of composite indicators,” The Journal of Economic Asymmetries, vol. 31, p. e00404, Jun. 2025, doi: 10.1016/J.JECA.2025.E00404.
P. Di, P. Dki, and F. Handayanna, “JOURNAL OF APPLIED COMPUTER SCIENCE AND TECHNOLOGY ( JACOST ) Penerapan Algoritma K-Means Untuk Mengelompokkan Kepadatan,” vol. 5, no. 1, pp. 50–55, 2024.
Copyright (c) 2026 Parini, Yessica Siagian , Guntur Maha Putra , Julpan Hartono Suria Manja Manurung, Nuri Apriani, Putri Wulandari

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (Refer to The Effect of Open Access).


.png)
.png)


