Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2025 Jan-Dec:62:469580251319905.
doi: 10.1177/00469580251319905.

Analyzing Demographic Grocery Purchase Patterns in Kenyan Supermarkets Through Unsupervised Learning Techniques

Affiliations

Analyzing Demographic Grocery Purchase Patterns in Kenyan Supermarkets Through Unsupervised Learning Techniques

Reinpeter Momanyi et al. Inquiry. 2025 Jan-Dec.

Abstract

Kenya is experiencing a significant increase in the prevalence of non-communicable diseases (NCDs) such as cardiovascular diseases, hypertension, Type 2 diabetes, and certain cancers (bowel, lung, prostate, and uterine). This case is not unique to Kenya but is common in many Low and Middle-Income Countries (LMICs) in Africa. Many NCDs, are linked to diets high in added sugars, sodium, saturated fat, and low in fiber. There is a notable lack of information regarding the demographic differences among supermarket customers and their purchasing habits of healthy versus unhealthy foods in some parts of Africa. This gap in knowledge hinders the ability to connect grocery purchase patterns to NCDs, including obesity. Supermarkets in LMICs offer valuable demographic insights through grocery data. This research utilizes NOVA classification tool, data mining and unsupervised machine learning techniques to analyze grocery purchase patterns in 10 supermarkets across 5 counties in Kenya between 2022 and 2023. The apriori algorithm was used to create association rules and an analysis was done on the association rules to find out the relationship between demography (location, gender, and age) with purchase patterns. Individual data was collected along with transaction data, since the supermarkets logged transactions done by loyalty card customers. The main aim is to provide guidance to policymakers in public health. We collected 3 934 122 unique transactions and each transaction was associated with a customer who was identified with a unique customer ID. Findings from this research demonstrate that 53% of food purchases from these transactions were mainly industrially processed food items and males above the age of 50 years were the main consumers of these food items. The findings lead to the conclusion that this purchase trend has a chance of rising NCDs in older people. Therefore we recommend that policymakers adopt our recommendations to safeguard public health.

Keywords: NOVA; association rule mining; demography; low and middle-income countries (LMICs); non-communicable diseases (NCDs).

PubMed Disclaimer

Conflict of interest statement

Declaration of Conflicting InterestsThe author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Figures

Figure 1.
Figure 1.
Process workflow.
Figure 2.
Figure 2.
Age-gender trend of shoppers across the study period.
Figure 3.
Figure 3.
Purchase patterns associated with age and gender; support ≥0.02.
Figure 4.
Figure 4.
Purchase patterns associated with age and location; support ≥0.025.
Figure 5.
Figure 5.
Purchase patterns associated with location and gender; support ≥0.025.

References

    1. World Health Organization. Noncommunicable diseases progress monitor 2022. World Health Organization 2022. Licence: CC BY-NC-SA 3.0 IGO; 2022.
    1. Oikonomou E, Psaltopoulou T, Georgiopoulos G, et al.. Western dietary pattern is associated with severe coronary artery disease. Angiology. 2018;69(4):339-346. doi:10.1177/0003319717721603 - DOI - PubMed
    1. Shu L, Shen XM, Li C, Zhang XY, Zheng PF. Dietary patterns are associated with type 2 diabetes mellitus among middle-aged adults in Zhejiang Province, China. Nutr J. 2017;16(1):81-89. doi:10.1186/s12937-017-0303-0 - DOI - PMC - PubMed
    1. Sun J, Buys NJ, Hills AP. Dietary pattern and its association with the prevalence of obesity, hypertension and other cardiovascular risk factors among Chinese older adults. Int J Environ Res Public Health. 2014;11(4):3956-3971. doi:10.3390/ijerph110403956 - DOI - PMC - PubMed
    1. Bodirsky BL, Dietrich JP, Martinelli E, et al.. The ongoing nutrition transition thwarts long-term targets for food security, public health and environmental protection. Sci Rep. 2020;10(1):19778. doi:10.1038/s41598-020-75213-3 - DOI - PMC - PubMed

LinkOut - more resources