def convert_coord_data_to_dict(data):
 coord_header = data['coord'][0]
 coords = data['coord'][1]
 pct_var = data['coord'][3]
 coords_dict = {}
 pct_var_dict = {}
 coords_dict['pc vector number'] = coord_header
 for x in range(len(coords)):
  coords_dict[str((x + 1))] = coords[0:, x]
  pct_var_dict[str((x + 1))] = pct_var[x]
 return (coords_dict, pct_var_dict)

def convert_coord_data_to_dict ( data ) : coord_header = data [ 'coord' ] [ 0 ] coords = data [ 'coord' ] [ 1 ] pct_var = data [ 'coord' ] [ 3 ] coords_dict = { } pct_var_dict = { } coords_dict [ 'pc vector number' ] = coord_header for x in range ( len ( coords ) ) : coords_dict [ str ( ( x + 1 ) ) ] = coords [ 0 : , x ] pct_var_dict [ str ( ( x + 1 ) ) ] = pct_var [ x ] return ( coords_dict , pct_var_dict )
convert the coord data into a dictionary .