# Can I cluster an aggregated data-set (grouped by) and apply dimensionality reduction?

I have data of sales, however it is in the millions, about 500M rows. I aggregate this data by factors such as location, shoptype, country_of_shop, cardtype, and then the aggregated statistic is:

• number of transactions
• sum of amount in dollars

My questions is can i cluster this say using kprototypes or something similar? And can i reduce the dimensionality using Factor analysis?

There are no clear restrictions on can you cluster the data or not based on the data itself (in most of the cases), but you might face restrictions based on computational speed. The question is what you want to achieve in the end, but you can for sure cluster the data or reduce dimensions. You can also take a subset of your data, cluster it and then train ML model, something like catboost or lightgbm to predict clusters, instead of doing clustering on whole dataset. In my experience it will be faster to use model for cluster predictions.
For dimension reduction, you can go for PCA or TruncatedSVD, here are some useful links: