Compute pairwise distances between professions based on skill profiles
Source:R/distance.R
compute_profession_distance.RdBuilds a profession x skill incidence matrix from a data.table of
profession-skill associations. Applies a Balassa-type filter so that
only cells where the observed count exceeds the expected count are
retained (revealed comparative advantage). The transposed matrix is
then passed to stats::dist().
Arguments
- competenze
A
data.tablewith at least columnscod_3(profession code) andescoskill_level_3(skill label).- method
Character, distance method passed to
stats::dist(). Default:"binary". Other common options:"euclidean","canberra","maximum","minkowski".- filter_rca
Logical, whether to zero out cells where the observed count is below the expected count (Balassa filter). Default:
TRUE.