General Purpose transform function for network science analysis