I am working on clustering the customer base of a business-to-business company. I have data on customers that consists of both numerical (e.g. # of purchases made, avg. spend per purchase) and categorical (e.g. industry code) data.
Additionally, I have latitude and longitude information for each customer, which I would like to include in the clustering. Normal categorical and numerical data can be clustered using e.g. PAM / K-Prototypes / Hierarchical Clustering (anything where a distance matrix has to be computed, since there are distance functions that can differentiate between both types).
However, I do not know how to go about including latitude and longitude values. Latitude and longitude are in decimal degrees, therefore metrics like Euclidean distance cannot be used. Some possible approaches I have considered are:
calculating x, y, z points on a sphere from lat / lon coordinates using
$x = \cos(lat) \times cos(lon)$
$y = cos(lat) \times sin(lon)$
$z = sin(lat)$
which could then be treated as 3 numeric attributes using Euclidean distance.
somehow implement haversine distance in the calculation of the distance matrix. So create a distance function that calculates numeric differences using Euclidean, categorical (after one-hot encoding) using e.g. Jaccard, and lat-long dissimilarity using Haversine. How could I potentially go about implementing something like this? Is it possible, or am I overlooking something?
creating regions, such as "EMEA" (Europe, Middle East, Africa), "APAC (Asia Pacific), "NA" (North America) from the lat-lon values, thereby creating more categorical attributes.
Can someone comment on what a suitable approach might be?