Analysis of Recency Frequency Monetary (RFM) Using Python and Matplotlib in Optimizing Marketing Strategies at Dhiza Petshop Retail Store in Tanjung Selor
DOI:
https://doi.org/10.38035/dijemss.v6i5.4679Keywords:
RFM, Customer Segmentation, Python, MatplotlibAbstract
Petshops have been rapidly growing due to increased public awareness of pet care and food needs. The rising trend of pet adoption has fueled the expansion of petshops in various regions. The competition in the pet retail industry demands more targeted marketing strategies to enhance customer loyalty. One effective method is RFM (Recency, Frequency, Monetary) analysis, which allows for customer segmentation based on their shopping behavior. This study aims to analyze the customer behavior patterns of Dhiza Petshop Tanjung Selor using the RFM method with Python and Matplotlib, based on customer transaction data from December 21, 2024, to January 20, 2025, using 11 segments: Champions, Loyal Customers, Potential Loyalists, Recent Buyers, Promising, Need Attention, About to Sleep, Cannot Lose Them, At Risk, Hibernating, and Lost. The results show that the customer behavior patterns at Dhiza Petshop Tanjung Selor are dominated by customers with recent purchasing activity, while the number of loyal customers remains limited, indicating the need for retention and reactivation strategies to strengthen long-term relationships. The application of RFM analysis using Python and Matplotlib allows for efficient segmentation of customers, resulting in improved marketing strategies. The percentages for the 11 customer segments at Dhiza Petshop Tanjung Selor are: Champion (0.1%), Loyal (0%), Potential Loyalist (0.9%), Recent Buyers (72.6%), Promising (4.4%), Need Attention (0.1%), About to Sleep (0.2%), Cannot Lose Them (0%), At Risk (0%), Hibernating (12.1%), and Lost (9.6%).
References
Agustini, N. K. Y. (2003). Segmentasi Pasar, Penentuan Target dan Penentuan Posisi. Equilibrium, Jurnal Ekonomi-Manajemen-Akuntansi, 1(2), 91–106. http://journal.uwks.ac.id/index.php/equilibrium/article/download/169/159
Ajzen, I. (2005). Attitudes, Personality and Behavior. USA: Open University Press.
Ananda, T. A., Dewi, N. K., & Saleh, M. Z. (2023). Fenomena Perubahan Strategi Pemasaran dalam Menghadapi Tantangan di Era Digital. Jurnal Publikasi Ilmu Manajemen (JUPIMAN), 2(4), 98–107.
Asgandi, S. (2020). Analisis Strategi Pemasaran Dalam Meningkatkan Penjualan Pada Toko Kurnia Petshop Banjarmasin. http://eprints.uniska-bjm.ac.id/2151/1/ARTIKEL ILMIAH.Pdf, 57–67
Astandi. (2024). Penerapan Matplotlib dalam Visualisasi Data untuk Analisis Hubungan Penggunaan Gadget dan Hasil Belajar. Journal of Digital Business and Information Technology, 29–39. https://doi.org/https://doi.org/10.23971/jobit.v1i1.204
Astuti, D. P. (2018). Strategi Pemasaran Dalam Menarik Minat Konsumen Di Tinjau Dari Etika Bisnis Islam (Studi Kasus pada Pedagang Bakso dan Mie Ayam di Desa Sidodadi Sekampung Lampung Timur).
Bayhaqi, H., & Aslami, N. (2022). Indentifikasi Pasar, Segmen Dan Target Pasar Sasaran Bisnis Asuransi. MAMEN: Jurnal Manajemen, 1(1), 111–118. https://doi.org/https://doi.org/10.55123/mamen.v1i1.48
Blattberg, R. C., Malthouse, E. C., & Neslin, S. A. (2009). Customer Lifetime Value: Empirical Generalizations and Some Conceptual Questions. Journal of Interactive Marketing, 23(2), 157–168. https://doi.org/https://doi.org/10.1016/j.intmar.2009.02.005
Chaffey, D., & Chadwick, F. E. (2024). Digital Marketing Implementation and Practice. In Digital Marketing Technologies. https://doi.org/https://doi.org/10.1007/978-981-97-0607-5_3
Christian, Y., Yap, K. O., & Qi, R. (2022). Analisa Efisiensi Pendekatan Data-Driven Dalam Proses Segmentasi Pasar Dengan Studi Kasus Startup. Infotech Journal, 8(2), 147–156. https://doi.org/https://doi.org/10.31949/infotech.v8I2.3732
Devenport, T. H. (2006). Competing on Analytics. Harvard Business Review, 84(3), 144. http://journal.uwks.ac.id/index.php/equilibrium/article/download/169/159
Dewa, R. P., & Tranggono, D. (2022). Strategi Komunikasi Pemasaran Pit-Stop Kopi KIG Gresik dalam Mempertahankan Loyalitas Pelanggan. Jurnal Nomosleca, 8(1), 30–45. https://doi.org/https://doi.org/10.26905/nomosleca.v8i1.6569
Elvida, R., Wandi Al-Hafiz, N., Hasim Siregar, M., & Kuantan Singingi, I. (2021). Sistem Informasi Rekam Medis Hewan Peliharaan Berbasis Web. Prosiding Seminar Nasional Hasil Penelitian Dan Pengabdian Kepada Masyarakat, 46–52. http://ejournal.uniks.ac.id/index.php/ProsidingUniks/article/view/1963
Febriana, T. F., & Rosadi, M. I. (2024). Analisis Segmentasis Pelanggan Toko Sepatu Di E-Commerce Menggunakan Algoritma K-Means Klastering. JATI(Jurnal Mahasiswa Teknik Informatika), 8(6), 12069–12072.
Gazali, S. (2017). Analisis Pengaruh Bauran Pemasaran Jasa Terhadap Keputusan Mahasiswa Dalam Memilih Sekolah Tinggi Ilmu Ekonomi Madani Balikpapan. Jurnal Akuntansi Manajemen Madani, 1(3), 83–95.
Hamdat, A. (2020). Buku Manajemen Pemasaran Dan Perilaku Konsumen, Manajemen Dan Strategi Pemasaran Dalam Bisnis.
Jamal, J., & Yanto, D. (2019). Analisis RFM dan Algoritma K-Means untuk Clustering Loyalitas Customer. Fakultas Teknik Universitas Panca Marga Probolinggo, 9(1), 1–8.
Jamal, Jamal, & Yanto, D. (2019). Analisis RFM dan Algoritma K-Means untuk Clustering Loyalitas Customer. Fakultas Teknik Universitas Panca Marga Probolinggo, 9(1), 1–8.
Jeffery, M. (2010). Data-Driven Marketing: The 15 Metrics Everyone in Marketing Should Know. papers2://publication/uuid/1095FC9F-30FD-4F01-8201-26E748727D55
Junaidi, S., Devegi, M., & Kurniawan, H. (2023). Pelatihan Pengolahan dan Visualisasi Data Penduduk menggunakan Python. ADMA?: Jurnal Pengabdian Dan Pemberdayaan Masyarakat, 4(1), 151–162. https://doi.org/https://doi.org/10.30812/adma.v4i1.2963
Kohavi, R., & Parekh, R. (2004). Visualizing RFM segmentation. SIAM Proceedings Series, 391–399. https://doi.org/https://doi.org/10.1137/1.9781611972740.36
Kotler, P., & Keller, K. L. (2016). Marketing Management. Boletin Cultural e Informativo - Consejo General de Colegios Medicos de España, 22.
Krisnawati, D. (2018). Peran Perkembangan Teknologi Digital Pada Strategi Pemasaran Dan Jalur Distribusi Umkm Di Indonesia. Jurnal Manajemen Bisnis Krisnadwipayana, 6(1). https://doi.org/https://doi.org/10.35137/jmbk.v6i1.175
Kurniawan, D. (2020). Pengenalan Machine Leaning dengan Python. Solusi untuk Permasalahan Big Data. In Alex Media Komputindo.
Lubis, N. S., & Nasution, M. I. P. (2023). Perkembangan Teknologi Informasi Dan Dampaknya Pada Masyarakat. KOHESI: Jurnal Multidisplin Saintek, 1(12), 41–50. https://ejournal.warunayama.org/index.php/kohesi/article/view/1311
Maidla, M. (2023). No TitleUtilising Machine Learning And Rfm Analysis For Customer Retention In an Online Grocery Delivery Startup. University of Taru.
Maskanah, I. (2020). Segmentasi Pelanggan Toko Purnama dengan Algoritma K-Means dan Model RFM untuk Perancangan Strategi Pemasaran. INOVTEK Polbeng - Seri Informatika, 5(2), 218. https://doi.org/https://doi.org/10.35314/isi.v5i2.1443
Maulani, & Nadhifatul Nur, A. A. W. (2024). Analisis Pemanfaatan Data Analytics Dalam Pengambilan Keputusan Bisnis Di Pt Xyz. Jurnal Ekonomi Revolusioner, 7(7), 164–170. https://oaj.jurnalhst.com/index.php/jer/article/view/86/84
Muliyah, P., Aminatun, D., Nasution, S. S., Hastomo, T., Wahyuni, S. S., & Sitepu, T. (2020). Studi kelayakan Bisnis. Journal GEEJ, 7(2).
Prasetyo, S. S., Hakim, A. R., Statistika, D., Sains, F., & Diponegoro, U. (2020). 3 1,2,3. 9, 421–433.
Putri Nugraha, J., Alfiah, D., Sinulingga, G., Rojiati, U., Saloom, G., Rosmawati, F., Johannes, R., Kristia, Batin, M., Jati Lestari, W., Khatimah, H., & Beribe, M. (2021). Perilaku Perilaku Konsumen Teori.
Romzi, M., & Kurniawan, B. (2020). Pembelajaran Pemrograman Python Dengan Pendekatan Logika Algoritma. JTIM: Jurnal Teknik Informatika Mahakarya, 03(2), 37–44.
Salmah, H. (2018). Analisis Market Segmentation, Targeting, Dan Positioning Transportasi Online Grab Di Kota Bogor (Studi Kasus Pada Mahasiswa Universitas Pakuan). JIMFE (Jurnal Ilmiah Manajemen Fakultas Ekonomi), 4(2), 81–96.
Siahainenia, S. E. T. (2020). Analisis Pengaruh Orientasi Pesaing, Diferensiasi Produk, Positioning Produk Terhadap Kinerja Produk Gula Rendah Kalori Merek Tropicana Slim Di Kota Ambon. Jurnal Masohi, 1(1), 42–57.
Sitorus, E. R., & Nugraha, I. (2025). Analisis segmentasi pelanggan dengan model RFM (Recency , Frequency , Monetary) dan K-Means Clustering (Studi kasus?: PT XYZ). JUTIN: Jurnal Teknik Industri Terintegrasi, 8(1).
Smith, W. R. (1956). Product Differentiation and Market Segmentation as Alternative Marketing Strategies. Journal of Marketing, 21(1), 3. https://doi.org/https://doi.org/10.2307/1247695
Sudirjo, F., Purwati, T., Widyastuti, W., & Budiman, Y. U. (2023). Analisis Dampak Strategi Pemasaran Digital dalam Meningkatkan Loyalitas Pelanggan: Perspektif Industri E-commerce. Jurnal Pendidikan, 7, 7524–7532. https://jptam.org/index.php/jptam/article/view/7422%0Ahttps://jptam.org/index.php/jptam/article/download/7422/6136
Sugiyono. (2020). Metodologi Penelitian Kuantitatif, Kualitatif dan R & D.
Sutresno, S. A., Iriani, A., & Sediyono, E. (2018). Metode K-Means Clustering dengan Atribut RFM untuk Mempertahankan Pelanggan. JuTISI, 4(3), 433–440. https://doi.org/http://dx.doi.org/10.28932/jutisi.v4i3.878
Syah, A. (2020). Penerapan Web Walkers Sebagai Media Informasi Untuk Perbandingan Manual Brewing Coffee Di Indonesia. JSiI (Jurnal Sistem Informasi), 7(2), 132–137. https://doi.org/https://doi.org/10.30656/jsii.v7i2.2507
Syah, A. (2023). Strategi Pemasaran. In NBER Working Papers. http://www.nber.org/papers/w16019
Utama, A. A., & Ardiansah, I. (2023). Analisis Segmentasi Menggunakan Metode Rfm Dalam Mengidentifikasi Perilaku Pelanggan. SemanTIK?: Teknik Informasi, 9(2), 107. https://doi.org/https://doi.org/10.55679/semantik.v9i2.44945
Zaki, M. (2018). Pengaruh Influencer Marketing Sebagai Strategi Pemasaran Digital Era Moderen. Jurnal Manajemen Dan Inovasi (MANOVA), 1(2), 14–23. https://doi.org/https://doi.org/10.15642/manova.v1i2.350
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Eric Raharjo, Tinik Sugiati

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish their manuscripts in this journal agree to the following conditions:
- The copyright on each article belongs to the author(s).
- The author acknowledges that the Dinasti International Journal of Education Management and Social Science (DIJEMSS) has the right to be the first to publish with a Creative Commons Attribution 4.0 International license (Attribution 4.0 International (CC BY 4.0).
- Authors can submit articles separately, arrange for the non-exclusive distribution of manuscripts that have been published in this journal into other versions (e.g., sent to the author's institutional repository, publication into books, etc.), by acknowledging that the manuscript has been published for the first time in the Dinasti International Journal of Education Management and Social Science (DIJEMSS).









































