Exploratory Analysis on Market Basket Data using Network Visualization

  • Henrique L. S. Gino USP
  • Diogenes S. Pedro USP
  • Jean R. Ponciano USP
  • Claudio D. G. Linhares USP
  • Agma J. M. Traina USP


Market basket analysis is a powerful technique for understanding customer behavior and optimizing business strategies based on that understanding. Market-based analysis over time using visualization techniques can provide insights into market trends and relations, simplify complex data, and communicate insights effectively, which can help organizations make more informed decisions. This paper leverages a dataset focused on the users’ incomes and temporal aspects of market purchases. We modeled this dataset as three distinct temporal networks and performed an exploratory evaluation identifying patterns and anomalies in the data. More specifically, we identified groups of related products, indicating thematic purchases, and evaluated the impact of demographic factors, such as income, on customer spending.


Abdelaal, M., Lhuillier, A., Hlawatsch, M., and Weiskopf, D. (2020). Time-aligned edge plots for dynamic graph visualization. In 2020 24th International Conference Information Visualisation (IV), pages 248–257.

Agrawal, R., Imieliński, T., and Swami, A. (1993). Mining association rules between sets of items in large databases. In Proceedings of the 1993 ACM SIGMOD international conference on Management of data, pages 207–216.

Arboleda, F., Ortega, G., and Luna, J. (2022). Temporal visual profiling of market basket analysis. IAENG International Journal of Computer Science, 49(2).

De Domenico, M., Porter, M. A., and Arenas, A. (2014). MuxViz: a tool for multilayer analysis and visualization of networks. Journal of Complex Networks, 3(2):159–176.

Estrada, E. (2015). Introduction to Complex Networks: Structure and Dynamics, pages 93–131. Springer International Publishing, Cham.

Fortunato, S. and Newman, M. E. J. (2022). 20 years of network community detection. Nature Physics, 18(8):848–850.

Gonen, F. (2020). Dunnhumby The Complete Journey. [link]. Accessed: 2023-02-23.

Griva, A., Bardaki, C., Pramatari, K., and Papakiriakopoulos, D. (2018). Retail business analytics: Customer visit segmentation using market basket data. Expert Syst. Appl., 100:1–16.

Holme, P. and Saramäki, J. (2019). Temporal Network Theory. Springer Cham.

Huang, H., Yao, L., Chang, J.-S., Tsai, C.-Y., and Kuo, R. (2019). Using product network analysis to optimize product-to-shelf assignment problems. Applied Sciences, 9(8).

Kafkas, K., Perdahçı, Z. N., and Aydın, M. N. (2021). Discovering customer purchase patterns in product communities: an empirical study on co-purchase behavior in an online marketplace. J. Theor. Appl. Electron. Commer. Res., 16(7):2965–2980.

Kaur, M. and Kang, S. (2016). Market basket analysis: Identify the changing trends of market data using association rule mining. Procedia computer science, 85:78–85.

Linhares, C. D. G., Ponciano, J. R., Paiva, J. G. S., Rocha, L. E. C., and Travençolo, B. A. N. (2020). DyNetVis an interactive software to visualize structure and epidemics on temporal networks. In 2020 ASONAM Conference, pages 933–936.

Linhares, C. D. G., Ponciano, J. R., Pedro, D. S., Rocha, L. E. C., Traina, A. J. M., and Poco, J. (2023). LargeNetVis: Visual exploration of large temporal networks based on community taxonomies. IEEE Trans. on Vis. and Comput. Graphics, 29(1):203–213.

Linhares, C. D. G., Ponciano, J. R., Pereira, F. S. F., Rocha, L. E. C., Paiva, J. G. S., and Travençolo, B. A. N. (2019). A scalable node ordering strategy based on community structure for enhanced temporal network visualization. Comput. & Graph., 84:185 – 198.

Lismont, J., Ram, S., Vanthienen, J., Lemahieu, W., and Baesens, B. (2018). Predicting interpurchase time in a retail environment using customer-product networks: An empirical study and evaluation. Expert Syst. Appl., 104:22–32.

Oestreicher-Singer, G., Libai, B., Sivan, L., Carmi, E., and Yassin, O. (2013). The network value of products. Journal of Marketing, 77(3):1–14.

Osadchiy, T., Poliakov, I., Olivier, P., Rowland, M., and Foster, E. (2019). Recommender system based on pairwise association rules. Expert Syst. Appl., 115:535–542.

Ponciano, J. R., Linhares, C. D., Rocha, L. E., Faria, E. R., and Travençolo, B. A. (2021). A streaming edge sampling method for network visualization. KAIS, 63(7):1717–1743.

Rahman, M. K., Sujon, M. H., and Azad, A. (2022). Scalable force-directed graph representation learning and visualization. KAIS, 64(1):207–233.

Rendle, S., Freudenthaler, C., and Schmidt-Thieme, L. (2010). Factorizing personalized markov chains for next-basket recommendation. In Proceedings of the 19th international conference on World wide web, pages 811–820.

Valdivia, P., Buono, P., Plaisant, C., Dufournaud, N., and Fekete, J.-D. (2021). Analyzing dynamic hypergraphs with parallel aggregated ordered hypergraph visualization. IEEE Trans. on Vis. and Comput. Graphics, 27(1):1–13.

Valle, M. A., Ruz, G. A., and Morrás, R. (2018). Market basket analysis: Complementing association rules with minimum spanning trees. Expert Syst. Appl., 97:146–162.

van den Elzen, S., Holten, D., Blaas, J., and van Wijk, J. (2014). Dynamic network visualization with extended massive sequence views. IEEE Trans. on Vis. and Comput. Graphics, 20:1087–1099.

Videla-Cavieres, I. F. and Ríos, S. A. (2014). Extending market basket analysis with graph mining techniques: A real case. Expert Syst. Appl., 41(4, Part 2):1928–1936.

Vieira, R. S., Do Nascimento, H. A. D., Ferreira, J. M., and Foulds, L. (2022). Clustering ensemble-based edge bundling to improve the readability of graph drawings. In 2022 26th International Conference Information Visualisation (IV), pages 21–26.

Wilke, C. (2019). Fundamentals of Data Visualization: A Primer on Making Informative and Compelling Figures. O’Reilly.

Wu, J., Wang, Y., Shafiee, S., and Zhang, D. (2021). Discovery of associated consumer demands: Construction of a co-demanded product network with community detection. Expert Syst. Appl., 178:115038.

You, Y., Ren, L., Zhang, Z., Zhang, K., and Huang, J. (2022). Research on improvement of Louvain community detection algorithm. In Zhu, L., editor, 2nd AIAHPC 2022, volume 12348. International Society for Optics and Photonics, SPIE.

Zoss, A., Maltese, A., Uzzo, S. M., and Börner, K. (2018). Network Visualization Literacy: Novel Approaches to Measurement and Instruction, pages 169–187. Springer International Publishing, Cham.

Ünvan, Y. A. (2021). Market basket analysis with association rules. Communications in Statistics Theory and Methods, 50(7):1615–1628.
GINO, Henrique L. S.; PEDRO, Diogenes S.; PONCIANO, Jean R.; LINHARES, Claudio D. G.; TRAINA, Agma J. M.. Exploratory Analysis on Market Basket Data using Network Visualization. In: BRAZILIAN WORKSHOP ON SOCIAL NETWORK ANALYSIS AND MINING (BRASNAM), 12. , 2023, João Pessoa/PB. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2023 . p. 19-30. ISSN 2595-6094. DOI: https://doi.org/10.5753/brasnam.2023.229505.