This NHS England repository provides R code which can be used to identify 10 CCGs similar to a given CGG based on characteristics like size, demographics, deprivation, and ethnicity.
This is used in RightCare data products, the Model Health System and Viewpoint (including the PCN Dashboard).
More details on this method (including how it is being used, when, and by who) are provided on their FutureNHS workspace (only accessible to NHS health and social care employees).