This study examines the repercussions of the COVID-19 pandemic on Moroccan companies by employing the K-means clustering algorithm to classify them based on their performance. Owing to its efficiency, this algorithm excels in segmenting complex datasets, making it an ideal tool for clustering companies according to their size, sales volume, resilience, and adaptability to new economic realities. The literature indicates that sustainable governance practices are crucial in fostering resilience during crises. In this context, the study adopts a methodology that combines the K-means algorithm with data normalization techniques, which facilitate the creation of homogeneous groups of companies.
The results reveal distinct clusters with varying sales performance and strategic orientations. On the one hand, high-performing companies tend to embrace digitization and diversification strategies, thereby reinforcing their resilience. On the other hand, clusters with weaker performance exhibit limited adoption of such measures, opting instead for approaches such as reducing working hours. These insights highlight the importance of adopting digital transformation and innovation as pivotal strategies to increase competitiveness. Ultimately, the study offers actionable recommendations to strengthen corporate governance and resilience, particularly in times of crisis.