import numpy as np # this module handles arrays, but here we need it for its NaN value
import pandas as pd # this module contains a lot of tools for handling tabular data
from matplotlib import pyplot as plt
from salishsea_tools import evaltools as et
import datetime as dt
import os
import gsw
import pickle
import netCDF4 as nc
import cmocean
from scipy import stats as spst
from pandas.plotting import register_matplotlib_converters
register_matplotlib_converters()
%matplotlib inline
# Base Parameters
modSourceDir = "/results2/SalishSea/nowcast-green.201905/"
modver = "201905"
Chl_N = 1.8
start_date = dt.datetime(2015,1,1)
end_date = dt.datetime(2018,12,31)
clusterD='/data/tjarniko/MEOPAR/analysis_tereza/notebooks/CLUSTER_PAPER/CLEAN/KEY_PAPERFIGURES/pkls/'
cxf='Xcoords_for571_stations.pkl'
cyf='Ycoords_for571_stations.pkl'
cfile={2015:'BIO_clno_5_2015_reass.pkl',
2016:'BIO_clno_5_2016_reass.pkl'} # only 2015 and 2016 overlap with hplc
cver='BIOMASS'
print('Cluster version is:', cver)
Cluster version is: BIO
def logt(x):
return np.log10(x+.001)
cx=pickle.load(open(clusterD+cxf, 'rb'))
cy=pickle.load(open(clusterD+cyf, 'rb'))
cf=dict()
for iyear in cfile.keys():
cf[iyear]=pickle.load(open(clusterD+cfile[iyear],'rb'))
cx[:5],cy[:5]
(array([12, 12, 12, 12, 12]), array([382, 392, 402, 412, 422]))
# 8-17=>12; 18-27=>22, etc
def round2(num):
return int(np.trunc((num+2)/10)*10+2)
datestr='_'+start_date.strftime('%Y%m%d')+'_'+end_date.strftime('%Y%m%d')
data=pickle.load(open( 'matched_'+modver+datestr+'.pkl', 'rb' ) )
data['other']=0.0
for el in ('Cryptophytes', 'Cyanobacteria', 'Dictyochophytes', 'Dinoflagellates',
'Haptophytes', 'Prasinophytes', 'Raphidophytes'):
data['other']=data['other']+data[el]
def yd(idt):
if type(idt)==dt.datetime:
yd=(idt-dt.datetime(idt.year-1,12,31)).days
else: # assume array or pandas
yd=[(ii-dt.datetime(ii.year-1,12,31)).days for ii in idt]
return yd
data['yd']=yd(data['dtUTC'])
data['Year']=[ii.year for ii in data['dtUTC']]
data['mod_diatoms_chl']=Chl_N*data['mod_diatoms']
data['mod_flagellates_chl']=Chl_N*data['mod_flagellates']
data['mod_ciliates_chl']=Chl_N*data['mod_ciliates']
data['mod_TChl']=data['mod_diatoms_chl']+data['mod_flagellates_chl']+data['mod_ciliates_chl']
data['CCPH']=data['Cyanobacteria']+data['Cryptophytes']+data['Prasinophytes']+data['Haptophytes']
data['DD']=data['Diatoms-1']+data['Diatoms-2']
data2=data.loc[(data.Year<2017)&(data.i>7)]
data=data2.copy(deep=True).reset_index()
data['Cluster']=np.zeros(len(data))
for ir, row in data.iterrows():
ii=(cx==round2(row['i']))&(cy==round2(row['j']))
if sum(ii)==1:
cluster=cf[row['Year']][ii]
data.at[ir,'Cluster']=int(cluster)
np.sum(data['Cluster']==0),len(data)
(62, 2238)
data.keys()
Index(['index', 'FIL:START TIME YYYY/MM/DD HH:MM:SS', 'LOC:STATION', 'Lat', 'Lon', 'LOC:WATER DEPTH', 'Sample_Number', 'Temperature', 'Salinity', 'Oxygen:Dissolved:CTD', 'pH:SBE:Nominal', 'Salinity:Bottle', 'Flag:Salinity:Bottle', 'Flag:Chlorophyll:Extracted', 'Flag:Nitrate_plus_Nitrite', 'Flag:Silicate', 'Flag:Phosphate', 'Cruise', 'Oxygen:Dissolved', 'Flag:Oxygen:Dissolved', 'Cyanobacteria', 'Prasinophytes', 'Cryptophytes', 'Diatoms-1', 'Diatoms-2', 'Haptophytes', 'TchlA (ug/L)', 'Pressure [decibar]', 'Transmissivity [*/metre]', 'PAR [uE/m^2/sec]', 'PAR:Reference [uE/m^2/sec]', 'Oxygen:Dissolved:SBE [mL/L]', 'Oxygen:Dissolved:SBE [umol/kg]', 'Chlorophyll:Extracted [mg/m^3]', 'Phaeo-Pigment:Extracted [mg/m^3]', 'Nitrate_plus_Nitrite [umol/L]', 'Silicate [umol/L]', 'Phosphate [umol/L]', 'Bottle_Number', 'Oxygen:Dissolved [mL/L]', 'Oxygen:Dissolved [umol/kg]', 'Depth [metres]', 'Fluorescence [mg/m^3]', 'Oxygen:Dissolved:CTD [mL/L]', 'Oxygen:Dissolved:CTD [umol/kg]', 'Depth:Nominal [metres]', 'Alkalinity:Total [umol/L]', 'Flag:Alkalinity:Total', 'Carbon:Dissolved:Inorganic [umol/kg]', 'Flag:Carbon:Dissolved:Inorganic', 'Dinoflagellates', 'Dictyochophytes', 'Raphidophytes', 'Z', 'p', 'SA', 'CT', 'dtUTC', 'j', 'i', 'mod_nitrate', 'mod_silicon', 'mod_ammonium', 'mod_diatoms', 'mod_ciliates', 'mod_flagellates', 'mod_vosaline', 'mod_votemper', 'k', 'other', 'yd', 'Year', 'mod_diatoms_chl', 'mod_flagellates_chl', 'mod_ciliates_chl', 'mod_TChl', 'CCPH', 'DD', 'Cluster'], dtype='object')
pickle.dump(data,open('HPLCClusterBIO.pkl','wb'))
fig,ax=plt.subplots(1,1,figsize=(3,6))
cm0='Set1_r'
m=ax.scatter(data['i'],data['j'],c=data['Cluster'],cmap=cm0)
fig.colorbar(m)
<matplotlib.colorbar.Colorbar at 0x7f89fc2b71f0>
data.keys()
Index(['index', 'FIL:START TIME YYYY/MM/DD HH:MM:SS', 'LOC:STATION', 'Lat', 'Lon', 'LOC:WATER DEPTH', 'Sample_Number', 'Temperature', 'Salinity', 'Oxygen:Dissolved:CTD', 'pH:SBE:Nominal', 'Salinity:Bottle', 'Flag:Salinity:Bottle', 'Flag:Chlorophyll:Extracted', 'Flag:Nitrate_plus_Nitrite', 'Flag:Silicate', 'Flag:Phosphate', 'Cruise', 'Oxygen:Dissolved', 'Flag:Oxygen:Dissolved', 'Cyanobacteria', 'Prasinophytes', 'Cryptophytes', 'Diatoms-1', 'Diatoms-2', 'Haptophytes', 'TchlA (ug/L)', 'Pressure [decibar]', 'Transmissivity [*/metre]', 'PAR [uE/m^2/sec]', 'PAR:Reference [uE/m^2/sec]', 'Oxygen:Dissolved:SBE [mL/L]', 'Oxygen:Dissolved:SBE [umol/kg]', 'Chlorophyll:Extracted [mg/m^3]', 'Phaeo-Pigment:Extracted [mg/m^3]', 'Nitrate_plus_Nitrite [umol/L]', 'Silicate [umol/L]', 'Phosphate [umol/L]', 'Bottle_Number', 'Oxygen:Dissolved [mL/L]', 'Oxygen:Dissolved [umol/kg]', 'Depth [metres]', 'Fluorescence [mg/m^3]', 'Oxygen:Dissolved:CTD [mL/L]', 'Oxygen:Dissolved:CTD [umol/kg]', 'Depth:Nominal [metres]', 'Alkalinity:Total [umol/L]', 'Flag:Alkalinity:Total', 'Carbon:Dissolved:Inorganic [umol/kg]', 'Flag:Carbon:Dissolved:Inorganic', 'Dinoflagellates', 'Dictyochophytes', 'Raphidophytes', 'Z', 'p', 'SA', 'CT', 'dtUTC', 'j', 'i', 'mod_nitrate', 'mod_silicon', 'mod_ammonium', 'mod_diatoms', 'mod_ciliates', 'mod_flagellates', 'mod_vosaline', 'mod_votemper', 'k', 'other', 'yd', 'Year', 'mod_diatoms_chl', 'mod_flagellates_chl', 'mod_ciliates_chl', 'mod_TChl', 'CCPH', 'DD', 'Cluster'], dtype='object')
## Depths!
plt.hist(data.loc[data.DD>=0,['Z']].values,np.arange(0,10,.5));
plt.xlabel('Depth (m)')
plt.ylabel('Numer of HPLC Samples')
Text(0, 0.5, 'Numer of HPLC Samples')
np.arange(0,10,.5)
array([0. , 0.5, 1. , 1.5, 2. , 2.5, 3. , 3.5, 4. , 4.5, 5. , 5.5, 6. , 6.5, 7. , 7.5, 8. , 8.5, 9. , 9.5])
print('number of data points in each cluster:')
data.loc[:,['Cluster','Diatoms-1']].groupby('Cluster').count()
number of data points in each cluster:
Diatoms-1 | |
---|---|
Cluster | |
0.0 | 10 |
1.0 | 7 |
2.0 | 3 |
3.0 | 100 |
4.0 | 35 |
5.0 | 44 |
data.loc[:,['Pressure [decibar]','Diatoms-1']]
Pressure [decibar] | Diatoms-1 | |
---|---|---|
0 | 1.5 | 24.471 |
1 | 6.5 | NaN |
2 | 11.6 | NaN |
3 | 21.8 | NaN |
4 | 31.6 | NaN |
... | ... | ... |
2233 | 175.1 | NaN |
2234 | 200.0 | NaN |
2235 | 249.9 | NaN |
2236 | 299.8 | NaN |
2237 | 346.3 | NaN |
2238 rows × 2 columns
fig,ax=plt.subplots(1,3,figsize=(15,5))
fig.subplots_adjust(wspace=.5)
m=ax[0].scatter(logt(data['DD']),logt(data['mod_diatoms_chl']),c=data['Cluster'],cmap=cm0)
ax[0].set_aspect(1)
ax[0].set_xlim(-3,1.5)
ax[0].set_ylim(-3,1.5)
ax[0].plot((-3,1.5),(-3,1.5),'k-',lw=1)
ax[0].set_xlabel('log10[Diatoms-1+Diatoms-2 (mg/m3)+.001]')
ax[0].set_ylabel('log10[Diatom Chl (mg/m3)+.001]')
ax[0].set_title('Model vs. HPLC')
ax[1].scatter(logt(data['CCPH']),logt(data['mod_flagellates_chl']),c=data['Cluster'],cmap=cm0)
ax[1].set_aspect(1)
ax[1].set_xlim(-3,1.5)
ax[1].set_ylim(-3,1.5)
ax[1].plot((-3,1.5),(-3,1.5),'k-',lw=1)
ax[1].set_xlabel('log10[Cyano+Crypto+Prasino+Hapto (mg/m3)+.001]')
ax[1].set_ylabel('log10[Flagellate Chl (mg/m3)+.001]')
ax[1].set_title('Model vs. HPLC')
ax[2].scatter(logt(data['TchlA (ug/L)']),logt(data['mod_TChl']),c=data['Cluster'],cmap=cm0)
ax[2].set_aspect(1)
ax[2].set_xlim(-1,1.5)
ax[2].set_ylim(-1,1.5)
ax[2].plot((-3,1.5),(-3,1.5),'k-',lw=1)
ax[2].set_xlabel('log10[Total HPLC Chl (mg/m3)+.001]')
ax[2].set_ylabel('log10[Model Chl (mg/m3)+.001]')
ax[2].set_title('Model vs. HPLC')
#fig.colorbar(m)
print('By Cluster:')
By Cluster:
print('Same plots, by Season:')
fig,ax=plt.subplots(1,3,figsize=(15,5))
fig.subplots_adjust(wspace=.5)
m=ax[0].scatter(logt(data['DD']),logt(data['mod_diatoms_chl']),c=data['yd'],cmap=cmocean.cm.phase)
ax[0].set_aspect(1)
ax[0].set_xlim(-3,1.5)
ax[0].set_ylim(-3,1.5)
ax[0].plot((-3,1.5),(-3,1.5),'k-',lw=1)
ax[0].set_xlabel('log10[Diatoms-1+Diatoms-2 (mg/m3)+.001]')
ax[0].set_ylabel('log10[Diatom Chl (mg/m3)+.001]')
ax[0].set_title('Model vs. HPLC')
ax[1].scatter(logt(data['CCPH']),logt(data['mod_flagellates_chl']),c=data['yd'],cmap=cmocean.cm.phase)
ax[1].set_aspect(1)
ax[1].set_xlim(-3,1.5)
ax[1].set_ylim(-3,1.5)
ax[1].plot((-3,1.5),(-3,1.5),'k-',lw=1)
ax[1].set_xlabel('log10[Cyano+Crypto+Prasino+Hapto (mg/m3)+.001]')
ax[1].set_ylabel('log10[Flagellate Chl (mg/m3)+.001]')
ax[1].set_title('Model vs. HPLC')
m=ax[2].scatter(logt(data['TchlA (ug/L)']),logt(data['mod_TChl']),c=data['yd'],cmap=cmocean.cm.phase)
ax[2].set_aspect(1)
ax[2].set_xlim(-1,1.5)
ax[2].set_ylim(-1,1.5)
ax[2].plot((-3,1.5),(-3,1.5),'k-',lw=1)
ax[2].set_xlabel('log10[Total HPLC Chl (mg/m3)+.001]')
ax[2].set_ylabel('log10[Model Chl (mg/m3)+.001]')
ax[2].set_title('Model vs. HPLC')
fig.colorbar(m,ax=ax[2])
#fig.colorbar(m)
Same plots, by Season:
<matplotlib.colorbar.Colorbar at 0x7f89de78a430>
fig,ax=plt.subplots(5,3,figsize=(12,20))
fig.subplots_adjust(hspace=.5,wspace=.5)
for el in range(1,6):
idata=data.loc[data.Cluster==el]
ax[el-1,0].plot(logt(idata['DD']),logt(idata['mod_diatoms_chl']),'k.')
ax[el-1,0].set_xlabel('log10[Diatoms-1+Diatoms-2 (mg/m3)+.001]')
ax[el-1,0].set_ylabel('log10[Diatom Chl (mg/m3)+.001]')
ax[el-1,0].set_title('Model vs. HPLC, Cluster='+str(el))
ax[el-1,1].plot(logt(idata['CCPH']),logt(idata['mod_flagellates_chl']),'k.')
ax[el-1,1].set_xlabel('log10[CCPH (mg/m3)+.001]')
ax[el-1,1].set_ylabel('log10[Flagellate Chl (mg/m3)+.001]')
ax[el-1,1].set_title('Model vs. HPLC, Cluster='+str(el))
ax[el-1,2].plot(logt(idata['TchlA (ug/L)']),logt(idata['mod_TChl']),'k.')
ax[el-1,2].set_xlabel('log10[HPLC Tot Chl (mg/m3)+.001]')
ax[el-1,2].set_ylabel('log10[Model Tot Chl (mg/m3)+.001]')
ax[el-1,2].set_title('Model vs. HPLC, Cluster='+str(el))
for iax in ax.flatten():
iax.set_xlim(-3,2)
iax.set_ylim(-3,2)
fig,ax=plt.subplots(1,2,figsize=(12,4))
diatFracMod=data['mod_diatoms']/(data['mod_diatoms']+data['mod_flagellates']+data['mod_ciliates'])
diatFracObs=data['DD']/data['TchlA (ug/L)']
m=ax[0].scatter(diatFracObs,diatFracMod,
c=data['Cluster'],cmap=cm0)
ax[0].set_xlabel('HPLC Diatom Fraction')
ax[0].set_ylabel('Model Diatom Fraction')
ax[0].set_xlim((0,1))
ax[0].set_ylim((0,1))
flFracMod=data['mod_flagellates']/(data['mod_diatoms']+data['mod_flagellates']+data['mod_ciliates'])
CCPHFracObs=data['CCPH']/data['TchlA (ug/L)']
m=ax[1].scatter(CCPHFracObs,flFracMod,
c=data['Cluster'],cmap=cm0)
ax[1].set_xlabel('HPLC Crypto Cyano Prasino Hapto Fraction')
ax[1].set_ylabel('Model Flagellate Fraction')
ax[1].set_xlim((0,1))
ax[1].set_ylim((0,1))
ax[0].set_aspect(1)
ax[1].set_aspect(1)
fig.colorbar(m)
<matplotlib.colorbar.Colorbar at 0x7f89de40d250>
for icluster in range(1,6):
fig,ax=plt.subplots(1,1,figsize=(12,3.5))
idata=data.loc[data.Cluster==icluster]
hplclist=('Diatoms-1', 'Diatoms-2','Cyanobacteria','Cryptophytes', 'Prasinophytes',
'Haptophytes', 'Dictyochophytes','Dinoflagellates','Raphidophytes')
x=np.array([logt(idata[el]) for el in hplclist]).T
cols=('darkblue','cornflowerblue','cyan','olive','limegreen','magenta','orange','firebrick','plum')
bins=np.linspace(-3,2,10)
ax.hist(x, bins, density=False, histtype='bar', color=cols, label=hplclist);
ax.legend(prop={'size': 12},bbox_to_anchor=(1,0.04));
ax.set_xlim(-3,1)
ax.set_xlabel('log10(Chl[ug/L]+.001)')
ax.set_ylabel('Count')
ax.set_title('Cluster='+str(icluster))
## Mean and stdev for yd 150-280:
for icluster in (3,4,):
print('Cluster: ',icluster)
print(' Year days 150-280: ')
print(' Diatoms-1+2 Mean: ',np.nanmean(data.loc[(data.yd>=150)&(data.yd<=280)&(data.Cluster==icluster),['DD']]))
print(' Diatoms-1+2 St. Dev.: ',np.nanstd(data.loc[(data.yd>=150)&(data.yd<=280)&(data.Cluster==icluster),['DD']]))
print(' Model Diatoms Mean: ',np.nanmean(data.loc[(data.yd>=150)&(data.yd<=280)&(data.Cluster==icluster),['mod_diatoms_chl']]))
print(' Model Diatoms St. Dev.: ',np.nanstd(data.loc[(data.yd>=150)&(data.yd<=280)&(data.Cluster==icluster),['mod_diatoms_chl']]))
Cluster: 3 Year days 150-280: Diatoms-1+2 Mean: 1.3043235294117648 Diatoms-1+2 St. Dev.: 1.6402355412021887 Model Diatoms Mean: 0.14899766309857196 Model Diatoms St. Dev.: 0.477232785882177 Cluster: 4 Year days 150-280: Diatoms-1+2 Mean: 0.5169545454545456 Diatoms-1+2 St. Dev.: 0.4548825500033175 Model Diatoms Mean: 0.1707624326672969 Model Diatoms St. Dev.: 0.4864646347289268
for i in range(0,len(hplclist)):
fig,ax=plt.subplots(1,1,figsize=(16,3))
ax.scatter(data['yd'],data[hplclist[i]],c=data['Cluster'],label=hplclist[i],cmap=cm0)
#ax.set_ylim(-3,1)
ax.set_xlim((0,366))
ax.set_title((hplclist[i]))
ax.set_xlabel('Year Day')
ax.set_ylabel('Chl [ug/l]')
print('Residuals: Model - Obs')
fig,ax=plt.subplots(2,1,figsize=(16,6))
ax[0].scatter(data['yd'],data['mod_diatoms_chl']-data['DD'],c=data['Cluster'],label=hplclist[i],cmap=cm0)
ax[0].set_xlim((0,366))
ax[0].set_title('Model diatoms - Diatoms1+2')
ax[0].set_xlabel('Year Day')
ax[0].set_ylabel('Difference, Chl [ug/l]')
ax[0].plot((0,366),(0,0),'k-',lw=.5)
ax[1].scatter(data['yd'],data['mod_flagellates_chl']-data['CCPH'],c=data['Cluster'],label=hplclist[i],cmap=cm0)
ax[1].set_xlim((0,366))
ax[1].set_title('Model flagellates - CCPH')
ax[1].set_xlabel('Year Day')
ax[1].set_ylabel('Difference, Chl [ug/l]')
ax[1].plot((0,366),(0,0),'k-',lw=.5)
plt.tight_layout()
Residuals: Model - Obs
icluster=1
print('Cluster',icluster)
idata=data.loc[data.Cluster==icluster,['Diatoms-1', 'Diatoms-2','Cyanobacteria','Cryptophytes', 'Prasinophytes',
'Haptophytes', 'Dictyochophytes','Dinoflagellates','Raphidophytes','DD','CCPH','TchlA (ug/L)',
'mod_diatoms_chl','mod_flagellates_chl','mod_ciliates_chl','mod_TChl']]
idata.cov()
Cluster 1
Diatoms-1 | Diatoms-2 | Cyanobacteria | Cryptophytes | Prasinophytes | Haptophytes | Dictyochophytes | Dinoflagellates | Raphidophytes | DD | CCPH | TchlA (ug/L) | mod_diatoms_chl | mod_flagellates_chl | mod_ciliates_chl | mod_TChl | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diatoms-1 | 17.982473 | -0.085762 | -0.001709 | -0.138147 | 0.048377 | -0.116030 | -0.014663 | -0.039840 | 0.073285 | 17.896711 | -0.207509 | 17.708618 | 2.932403 | 3.885786 | 0.539620 | 7.357808 |
Diatoms-2 | -0.085762 | 0.036747 | -0.000036 | 0.012955 | 0.000391 | 0.007329 | 0.002271 | 0.001081 | -0.001560 | -0.049015 | 0.020639 | -0.026649 | 0.087746 | 0.104741 | 0.005999 | 0.198486 |
Cyanobacteria | -0.001709 | -0.000036 | 0.000010 | 0.000073 | 0.000121 | 0.000079 | 0.000002 | 0.000074 | 0.000089 | -0.001745 | 0.000283 | -0.001298 | -0.002535 | -0.001329 | -0.000120 | -0.003984 |
Cryptophytes | -0.138147 | 0.012955 | 0.000073 | 0.007169 | 0.001601 | 0.004210 | 0.001037 | 0.001568 | 0.000099 | -0.125192 | 0.013054 | -0.109433 | -0.033948 | 0.010174 | -0.001866 | -0.025641 |
Prasinophytes | 0.048377 | 0.000391 | 0.000121 | 0.001601 | 0.002421 | 0.001093 | 0.000135 | 0.000971 | 0.001763 | 0.048769 | 0.005236 | 0.056884 | -0.041055 | 0.010529 | 0.001065 | -0.029461 |
Haptophytes | -0.116030 | 0.007329 | 0.000079 | 0.004210 | 0.001093 | 0.003378 | 0.000569 | 0.001470 | 0.000553 | -0.108701 | 0.008760 | -0.097340 | -0.027344 | -0.002444 | -0.001832 | -0.031620 |
Dictyochophytes | -0.014663 | 0.002271 | 0.000002 | 0.001037 | 0.000135 | 0.000569 | 0.000165 | 0.000141 | -0.000064 | -0.012393 | 0.001742 | -0.010409 | -0.000573 | 0.004870 | 0.000053 | 0.004350 |
Dinoflagellates | -0.039840 | 0.001081 | 0.000074 | 0.001568 | 0.000971 | 0.001470 | 0.000141 | 0.001058 | 0.000736 | -0.038759 | 0.004083 | -0.032727 | -0.024777 | -0.011909 | -0.001370 | -0.038056 |
Raphidophytes | 0.073285 | -0.001560 | 0.000089 | 0.000099 | 0.001763 | 0.000553 | -0.000064 | 0.000736 | 0.001696 | 0.071725 | 0.002504 | 0.076615 | -0.024743 | 0.012039 | 0.001875 | -0.010829 |
DD | 17.896711 | -0.049015 | -0.001745 | -0.125192 | 0.048769 | -0.108701 | -0.012393 | -0.038759 | 0.071725 | 17.847697 | -0.186870 | 17.681969 | 3.020148 | 3.990527 | 0.545619 | 7.556294 |
CCPH | -0.207509 | 0.020639 | 0.000283 | 0.013054 | 0.005236 | 0.008760 | 0.001742 | 0.004083 | 0.002504 | -0.186870 | 0.027332 | -0.151187 | -0.104882 | 0.016929 | -0.002754 | -0.090706 |
TchlA (ug/L) | 17.708618 | -0.026649 | -0.001298 | -0.109433 | 0.056884 | -0.097340 | -0.010409 | -0.032727 | 0.076615 | 17.681969 | -0.151187 | 17.564884 | 2.864528 | 4.012741 | 0.543449 | 7.420719 |
mod_diatoms_chl | 2.932403 | 0.087746 | -0.002535 | -0.033948 | -0.041055 | -0.027344 | -0.000573 | -0.024777 | -0.024743 | 3.020148 | -0.104882 | 2.864528 | 0.613710 | 0.337643 | 0.055164 | 1.006517 |
mod_flagellates_chl | 3.885786 | 0.104741 | -0.001329 | 0.010174 | 0.010529 | -0.002444 | 0.004870 | -0.011909 | 0.012039 | 3.990527 | 0.016929 | 4.012741 | 0.337643 | 0.375787 | 0.048850 | 0.762280 |
mod_ciliates_chl | 0.539620 | 0.005999 | -0.000120 | -0.001866 | 0.001065 | -0.001832 | 0.000053 | -0.001370 | 0.001875 | 0.545619 | -0.002754 | 0.543449 | 0.055164 | 0.048850 | 0.008531 | 0.112545 |
mod_TChl | 7.357808 | 0.198486 | -0.003984 | -0.025641 | -0.029461 | -0.031620 | 0.004350 | -0.038056 | -0.010829 | 7.556294 | -0.090706 | 7.420719 | 1.006517 | 0.762280 | 0.112545 | 1.881342 |
icluster=2
print('Cluster',icluster)
idata=data.loc[data.Cluster==icluster,['Diatoms-1', 'Diatoms-2','Cyanobacteria','Cryptophytes', 'Prasinophytes',
'Haptophytes', 'Dictyochophytes','Dinoflagellates','Raphidophytes','DD','CCPH','TchlA (ug/L)',
'mod_diatoms_chl','mod_flagellates_chl','mod_ciliates_chl','mod_TChl']]
idata.cov()
Cluster 2
Diatoms-1 | Diatoms-2 | Cyanobacteria | Cryptophytes | Prasinophytes | Haptophytes | Dictyochophytes | Dinoflagellates | Raphidophytes | DD | CCPH | TchlA (ug/L) | mod_diatoms_chl | mod_flagellates_chl | mod_ciliates_chl | mod_TChl | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diatoms-1 | 5.830206 | 1.314561 | -0.006969 | 0.073696 | 0.020161 | -0.367340 | -0.002069 | -0.207422 | -0.153106 | 7.144768 | -0.280453 | 6.502392 | 4.267778 | 0.641032 | 0.097760 | 5.006570 |
Diatoms-2 | 1.314561 | 0.947550 | -0.001613 | -0.031364 | -0.084918 | -0.083827 | -0.000883 | -0.078686 | -0.065305 | 2.262112 | -0.201722 | 1.916076 | 2.063865 | 0.603229 | 0.043605 | 2.710698 |
Cyanobacteria | -0.006969 | -0.001613 | 0.000008 | -0.000085 | -0.000018 | 0.000439 | 0.000003 | 0.000250 | 0.000185 | -0.008582 | 0.000344 | -0.007802 | -0.005173 | -0.000796 | -0.000118 | -0.006087 |
Cryptophytes | 0.073696 | -0.031364 | -0.000085 | 0.004467 | 0.006847 | -0.004570 | 0.000004 | -0.000270 | 0.000333 | 0.042332 | 0.006659 | 0.049037 | -0.027225 | -0.025696 | -0.000353 | -0.053275 |
Prasinophytes | 0.020161 | -0.084918 | -0.000018 | 0.006847 | 0.012361 | -0.001133 | 0.000050 | 0.003668 | 0.003700 | -0.064757 | 0.018057 | -0.039335 | -0.136593 | -0.060804 | -0.002624 | -0.200022 |
Haptophytes | -0.367340 | -0.083827 | 0.000439 | -0.004570 | -0.001133 | 0.023146 | 0.000131 | 0.013118 | 0.009694 | -0.451168 | 0.017883 | -0.410384 | -0.270591 | -0.041095 | -0.006193 | -0.317879 |
Dictyochophytes | -0.002069 | -0.000883 | 0.000003 | 0.000004 | 0.000050 | 0.000131 | 0.000001 | 0.000094 | 0.000074 | -0.002952 | 0.000188 | -0.002595 | -0.002218 | -0.000521 | -0.000048 | -0.002787 |
Dinoflagellates | -0.207422 | -0.078686 | 0.000250 | -0.000270 | 0.003668 | 0.013118 | 0.000094 | 0.008944 | 0.006956 | -0.286108 | 0.016766 | -0.253392 | -0.205832 | -0.045290 | -0.004535 | -0.255657 |
Raphidophytes | -0.153106 | -0.065305 | 0.000185 | 0.000333 | 0.003700 | 0.009694 | 0.000074 | 0.006956 | 0.005476 | -0.218411 | 0.013912 | -0.192030 | -0.164154 | -0.038519 | -0.003587 | -0.206259 |
DD | 7.144768 | 2.262112 | -0.008582 | 0.042332 | -0.064757 | -0.451168 | -0.002952 | -0.286108 | -0.218411 | 9.406879 | -0.482176 | 8.418468 | 6.331642 | 1.244261 | 0.141365 | 7.717268 |
CCPH | -0.280453 | -0.201722 | 0.000344 | 0.006659 | 0.018057 | 0.017883 | 0.000188 | 0.016766 | 0.013912 | -0.482176 | 0.042944 | -0.408484 | -0.439582 | -0.128391 | -0.009289 | -0.577262 |
TchlA (ug/L) | 6.502392 | 1.916076 | -0.007802 | 0.049037 | -0.039335 | -0.410384 | -0.002595 | -0.253392 | -0.192030 | 8.418468 | -0.408484 | 7.563001 | 5.521040 | 1.031902 | 0.123931 | 6.676873 |
mod_diatoms_chl | 4.267778 | 2.063865 | -0.005173 | -0.027225 | -0.136593 | -0.270591 | -0.002218 | -0.205832 | -0.164154 | 6.331642 | -0.439582 | 5.521040 | 2.186321 | 0.551402 | 0.141507 | 2.879230 |
mod_flagellates_chl | 0.641032 | 0.603229 | -0.000796 | -0.025696 | -0.060804 | -0.041095 | -0.000521 | -0.045290 | -0.038519 | 1.244261 | -0.128391 | 1.031902 | 0.551402 | 0.162968 | 0.035958 | 0.750329 |
mod_ciliates_chl | 0.097760 | 0.043605 | -0.000118 | -0.000353 | -0.002624 | -0.006193 | -0.000048 | -0.004535 | -0.003587 | 0.141365 | -0.009289 | 0.123931 | 0.141507 | 0.035958 | 0.016123 | 0.193588 |
mod_TChl | 5.006570 | 2.710698 | -0.006087 | -0.053275 | -0.200022 | -0.317879 | -0.002787 | -0.255657 | -0.206259 | 7.717268 | -0.577262 | 6.676873 | 2.879230 | 0.750329 | 0.193588 | 3.823146 |
icluster=3
print('Cluster',icluster)
idata=data.loc[data.Cluster==icluster,['Diatoms-1', 'Diatoms-2','Cyanobacteria','Cryptophytes', 'Prasinophytes',
'Haptophytes', 'Dictyochophytes','Dinoflagellates','Raphidophytes','DD','CCPH','TchlA (ug/L)',
'mod_diatoms_chl','mod_flagellates_chl','mod_ciliates_chl','mod_TChl']]
idata.cov()
Cluster 3
Diatoms-1 | Diatoms-2 | Cyanobacteria | Cryptophytes | Prasinophytes | Haptophytes | Dictyochophytes | Dinoflagellates | Raphidophytes | DD | CCPH | TchlA (ug/L) | mod_diatoms_chl | mod_flagellates_chl | mod_ciliates_chl | mod_TChl | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diatoms-1 | 14.560905 | 0.331821 | -0.074357 | -0.303669 | -0.402601 | -0.423968 | -0.129763 | -0.054553 | -0.105618 | 14.892726 | -1.204595 | 13.398088 | 6.790147 | -0.598518 | 0.115239 | 6.306869 |
Diatoms-2 | 0.331821 | 0.279671 | 0.000320 | -0.003101 | 0.005285 | -0.021247 | 0.112296 | 0.006027 | -0.006412 | 0.611492 | -0.018743 | 0.704635 | 0.164449 | -0.010754 | -0.011663 | 0.142033 |
Cyanobacteria | -0.074357 | 0.000320 | 0.005080 | 0.009279 | 0.020167 | 0.012739 | 0.000382 | -0.000593 | 0.004159 | -0.074038 | 0.047265 | -0.022820 | -0.060505 | 0.006372 | -0.002540 | -0.056673 |
Cryptophytes | -0.303669 | -0.003101 | 0.009279 | 0.059971 | 0.071226 | 0.072185 | -0.002133 | 0.010783 | 0.016802 | -0.306770 | 0.212661 | -0.068651 | -0.269375 | 0.040940 | -0.009456 | -0.237891 |
Prasinophytes | -0.402601 | 0.005285 | 0.020167 | 0.071226 | 0.183340 | 0.065970 | -0.004962 | -0.000888 | 0.028529 | -0.397315 | 0.340703 | -0.033944 | -0.402960 | -0.017056 | -0.024719 | -0.444736 |
Haptophytes | -0.423968 | -0.021247 | 0.012739 | 0.072185 | 0.065970 | 0.243609 | -0.007217 | 0.031685 | 0.025328 | -0.445215 | 0.394504 | -0.000925 | -0.223072 | 0.000083 | -0.012931 | -0.235920 |
Dictyochophytes | -0.129763 | 0.112296 | 0.000382 | -0.002133 | -0.004962 | -0.007217 | 0.147774 | 0.010101 | -0.002210 | -0.017467 | -0.013930 | 0.124225 | -0.119626 | 0.066207 | -0.008462 | -0.061881 |
Dinoflagellates | -0.054553 | 0.006027 | -0.000593 | 0.010783 | -0.000888 | 0.031685 | 0.010101 | 0.011996 | 0.001120 | -0.048526 | 0.040986 | 0.015668 | -0.071370 | 0.022288 | -0.001079 | -0.050162 |
Raphidophytes | -0.105618 | -0.006412 | 0.004159 | 0.016802 | 0.028529 | 0.025328 | -0.002210 | 0.001120 | 0.012958 | -0.112030 | 0.074819 | -0.025326 | -0.090100 | -0.004134 | -0.004899 | -0.099133 |
DD | 14.892726 | 0.611492 | -0.074038 | -0.306770 | -0.397315 | -0.445215 | -0.017467 | -0.048526 | -0.112030 | 15.504218 | -1.223338 | 14.102723 | 6.954597 | -0.609272 | 0.103577 | 6.448902 |
CCPH | -1.204595 | -0.018743 | 0.047265 | 0.212661 | 0.340703 | 0.394504 | -0.013930 | 0.040986 | 0.074819 | -1.223338 | 0.995133 | -0.126341 | -0.955913 | 0.030339 | -0.049646 | -0.975220 |
TchlA (ug/L) | 13.398088 | 0.704635 | -0.022820 | -0.068651 | -0.033944 | -0.000925 | 0.124225 | 0.015668 | -0.025326 | 14.102723 | -0.126341 | 14.090768 | 5.717653 | -0.494653 | 0.039499 | 5.262499 |
mod_diatoms_chl | 6.790147 | 0.164449 | -0.060505 | -0.269375 | -0.402960 | -0.223072 | -0.119626 | -0.071370 | -0.090100 | 6.954597 | -0.955913 | 5.717653 | 1.509003 | 0.092472 | 0.081237 | 1.682712 |
mod_flagellates_chl | -0.598518 | -0.010754 | 0.006372 | 0.040940 | -0.017056 | 0.000083 | 0.066207 | 0.022288 | -0.004134 | -0.609272 | 0.030339 | -0.494653 | 0.092472 | 0.579785 | 0.073608 | 0.745866 |
mod_ciliates_chl | 0.115239 | -0.011663 | -0.002540 | -0.009456 | -0.024719 | -0.012931 | -0.008462 | -0.001079 | -0.004899 | 0.103577 | -0.049646 | 0.039499 | 0.081237 | 0.073608 | 0.022772 | 0.177617 |
mod_TChl | 6.306869 | 0.142033 | -0.056673 | -0.237891 | -0.444736 | -0.235920 | -0.061881 | -0.050162 | -0.099133 | 6.448902 | -0.975220 | 5.262499 | 1.682712 | 0.745866 | 0.177617 | 2.606194 |
icluster=4
print('Cluster',icluster)
idata=data.loc[data.Cluster==icluster,['Diatoms-1', 'Diatoms-2','Cyanobacteria','Cryptophytes', 'Prasinophytes',
'Haptophytes', 'Dictyochophytes','Dinoflagellates','Raphidophytes','DD','CCPH','TchlA (ug/L)',
'mod_diatoms_chl','mod_flagellates_chl','mod_ciliates_chl','mod_TChl']]
idata.cov()
Cluster 4
Diatoms-1 | Diatoms-2 | Cyanobacteria | Cryptophytes | Prasinophytes | Haptophytes | Dictyochophytes | Dinoflagellates | Raphidophytes | DD | CCPH | TchlA (ug/L) | mod_diatoms_chl | mod_flagellates_chl | mod_ciliates_chl | mod_TChl | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diatoms-1 | 0.668880 | 0.175677 | -0.013244 | -0.058728 | -0.071523 | -0.127238 | -0.015159 | -0.001292 | -0.001346 | 0.844556 | -0.270733 | 0.555942 | 0.423107 | -0.234634 | 0.029243 | 0.217717 |
Diatoms-2 | 0.175677 | 0.178600 | 0.003750 | 0.007990 | 0.045230 | -0.062868 | 0.007154 | 0.000657 | -0.003882 | 0.354277 | -0.005898 | 0.352330 | 0.088623 | -0.088244 | 0.018460 | 0.018839 |
Cyanobacteria | -0.013244 | 0.003750 | 0.009544 | 0.021020 | 0.032777 | 0.017578 | 0.002652 | 0.002270 | 0.001457 | -0.009495 | 0.080919 | 0.077804 | -0.033450 | 0.002358 | -0.003331 | -0.034423 |
Cryptophytes | -0.058728 | 0.007990 | 0.021020 | 0.062095 | 0.090645 | 0.057250 | 0.011558 | 0.006822 | 0.003713 | -0.050738 | 0.231010 | 0.202382 | -0.110073 | 0.067806 | -0.014055 | -0.056321 |
Prasinophytes | -0.071523 | 0.045230 | 0.032777 | 0.090645 | 0.206562 | 0.037459 | 0.022546 | 0.003113 | 0.003496 | -0.026292 | 0.367444 | 0.370431 | -0.209902 | 0.012881 | -0.026286 | -0.223306 |
Haptophytes | -0.127238 | -0.062868 | 0.017578 | 0.057250 | 0.037459 | 0.159663 | 0.003192 | 0.008735 | 0.004708 | -0.190106 | 0.271950 | 0.098521 | -0.044482 | 0.151625 | -0.010354 | 0.096789 |
Dictyochophytes | -0.015159 | 0.007154 | 0.002652 | 0.011558 | 0.022546 | 0.003192 | 0.007441 | 0.000705 | 0.000052 | -0.008004 | 0.039947 | 0.040165 | -0.029969 | 0.035026 | -0.003942 | 0.001115 |
Dinoflagellates | -0.001292 | 0.000657 | 0.002270 | 0.006822 | 0.003113 | 0.008735 | 0.000705 | 0.003055 | 0.000873 | -0.000635 | 0.020941 | 0.024927 | 0.003345 | 0.017853 | 0.002822 | 0.024020 |
Raphidophytes | -0.001346 | -0.003882 | 0.001457 | 0.003713 | 0.003496 | 0.004708 | 0.000052 | 0.000873 | 0.001226 | -0.005228 | 0.013374 | 0.010286 | -0.009865 | -0.003203 | -0.002084 | -0.015152 |
DD | 0.844556 | 0.354277 | -0.009495 | -0.050738 | -0.026292 | -0.190106 | -0.008004 | -0.000635 | -0.005228 | 1.198833 | -0.276631 | 0.908272 | 0.511731 | -0.322877 | 0.047703 | 0.236556 |
CCPH | -0.270733 | -0.005898 | 0.080919 | 0.231010 | 0.367444 | 0.271950 | 0.039947 | 0.020941 | 0.013374 | -0.276631 | 0.951323 | 0.749138 | -0.397906 | 0.234670 | -0.054026 | -0.217262 |
TchlA (ug/L) | 0.555942 | 0.352330 | 0.077804 | 0.202382 | 0.370431 | 0.098521 | 0.040165 | 0.024927 | 0.010286 | 0.908272 | 0.749138 | 1.732910 | 0.077112 | -0.038354 | -0.009512 | 0.029246 |
mod_diatoms_chl | 0.423107 | 0.088623 | -0.033450 | -0.110073 | -0.209902 | -0.044482 | -0.029969 | 0.003345 | -0.009865 | 0.511731 | -0.397906 | 0.077112 | 0.465249 | 0.100417 | 0.069554 | 0.635221 |
mod_flagellates_chl | -0.234634 | -0.088244 | 0.002358 | 0.067806 | 0.012881 | 0.151625 | 0.035026 | 0.017853 | -0.003203 | -0.322877 | 0.234670 | -0.038354 | 0.100417 | 0.468660 | 0.065379 | 0.634457 |
mod_ciliates_chl | 0.029243 | 0.018460 | -0.003331 | -0.014055 | -0.026286 | -0.010354 | -0.003942 | 0.002822 | -0.002084 | 0.047703 | -0.054026 | -0.009512 | 0.069554 | 0.065379 | 0.027684 | 0.162618 |
mod_TChl | 0.217717 | 0.018839 | -0.034423 | -0.056321 | -0.223306 | 0.096789 | 0.001115 | 0.024020 | -0.015152 | 0.236556 | -0.217262 | 0.029246 | 0.635221 | 0.634457 | 0.162618 | 1.432296 |
icluster=5
print('Cluster',icluster)
idata=data.loc[data.Cluster==icluster,['Diatoms-1', 'Diatoms-2','Cyanobacteria','Cryptophytes', 'Prasinophytes',
'Haptophytes', 'Dictyochophytes','Dinoflagellates','Raphidophytes','DD','CCPH','TchlA (ug/L)',
'mod_diatoms_chl','mod_flagellates_chl','mod_ciliates_chl','mod_TChl']]
idata.cov()
Cluster 5
Diatoms-1 | Diatoms-2 | Cyanobacteria | Cryptophytes | Prasinophytes | Haptophytes | Dictyochophytes | Dinoflagellates | Raphidophytes | DD | CCPH | TchlA (ug/L) | mod_diatoms_chl | mod_flagellates_chl | mod_ciliates_chl | mod_TChl | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diatoms-1 | 19.085968 | 0.278712 | -0.005160 | -0.169379 | 0.018722 | -0.289899 | -0.017112 | 0.082836 | -0.095718 | 19.364680 | -0.445716 | 18.888450 | 4.766033 | 0.964032 | 0.285393 | 6.015458 |
Diatoms-2 | 0.278712 | 0.184646 | -0.000004 | -0.009744 | -0.000155 | -0.009780 | -0.000486 | 0.031448 | -0.003436 | 0.463358 | -0.019683 | 0.471144 | -0.120053 | -0.041605 | 0.001191 | -0.160467 |
Cyanobacteria | -0.005160 | -0.000004 | 0.000026 | 0.000856 | 0.000021 | 0.000097 | 0.000033 | 0.000133 | 0.000178 | -0.005164 | 0.001000 | -0.003821 | 0.006096 | 0.000667 | 0.000103 | 0.006866 |
Cryptophytes | -0.169379 | -0.009744 | 0.000856 | 0.059843 | 0.007344 | 0.013938 | 0.001092 | 0.006859 | 0.009600 | -0.179124 | 0.081980 | -0.079626 | 0.445319 | 0.051696 | 0.008743 | 0.505758 |
Prasinophytes | 0.018722 | -0.000155 | 0.000021 | 0.007344 | 0.014842 | 0.007229 | -0.000082 | 0.001771 | 0.005685 | 0.018567 | 0.029436 | 0.055389 | 0.047950 | -0.008481 | 0.001845 | 0.041314 |
Haptophytes | -0.289899 | -0.009780 | 0.000097 | 0.013938 | 0.007229 | 0.025317 | 0.000231 | 0.002152 | 0.008472 | -0.299679 | 0.046580 | -0.242236 | -0.054482 | -0.012418 | -0.005339 | -0.072239 |
Dictyochophytes | -0.017112 | -0.000486 | 0.000033 | 0.001092 | -0.000082 | 0.000231 | 0.000237 | 0.000217 | 0.000641 | -0.017599 | 0.001274 | -0.015228 | 0.013861 | 0.001236 | 0.000294 | 0.015391 |
Dinoflagellates | 0.082836 | 0.031448 | 0.000133 | 0.006859 | 0.001771 | 0.002152 | 0.000217 | 0.015759 | 0.004042 | 0.114285 | 0.010915 | 0.145199 | 0.061037 | 0.003298 | 0.003492 | 0.067827 |
Raphidophytes | -0.095718 | -0.003436 | 0.000178 | 0.009600 | 0.005685 | 0.008472 | 0.000641 | 0.004042 | 0.008336 | -0.099154 | 0.023935 | -0.062194 | 0.075149 | 0.005624 | 0.001576 | 0.082349 |
DD | 19.364680 | 0.463358 | -0.005164 | -0.179124 | 0.018567 | -0.299679 | -0.017599 | 0.114285 | -0.099154 | 19.828038 | -0.465400 | 19.359594 | 4.645979 | 0.922428 | 0.286584 | 5.854991 |
CCPH | -0.445716 | -0.019683 | 0.001000 | 0.081980 | 0.029436 | 0.046580 | 0.001274 | 0.010915 | 0.023935 | -0.465400 | 0.158996 | -0.270294 | 0.444883 | 0.031464 | 0.005350 | 0.481697 |
TchlA (ug/L) | 18.888450 | 0.471144 | -0.003821 | -0.079626 | 0.055389 | -0.242236 | -0.015228 | 0.145199 | -0.062194 | 19.359594 | -0.270294 | 19.156478 | 5.240507 | 0.964003 | 0.297286 | 6.501795 |
mod_diatoms_chl | 4.766033 | -0.120053 | 0.006096 | 0.445319 | 0.047950 | -0.054482 | 0.013861 | 0.061037 | 0.075149 | 4.645979 | 0.444883 | 5.240507 | 2.695001 | 0.446761 | 0.150819 | 3.292581 |
mod_flagellates_chl | 0.964032 | -0.041605 | 0.000667 | 0.051696 | -0.008481 | -0.012418 | 0.001236 | 0.003298 | 0.005624 | 0.922428 | 0.031464 | 0.964003 | 0.446761 | 0.114032 | 0.032678 | 0.593471 |
mod_ciliates_chl | 0.285393 | 0.001191 | 0.000103 | 0.008743 | 0.001845 | -0.005339 | 0.000294 | 0.003492 | 0.001576 | 0.286584 | 0.005350 | 0.297286 | 0.150819 | 0.032678 | 0.015922 | 0.199419 |
mod_TChl | 6.015458 | -0.160467 | 0.006866 | 0.505758 | 0.041314 | -0.072239 | 0.015391 | 0.067827 | 0.082349 | 5.854991 | 0.481697 | 6.501795 | 3.292581 | 0.593471 | 0.199419 | 4.085470 |
icluster=1
print('Cluster',icluster)
idata=data.loc[data.Cluster==icluster,['Diatoms-1', 'Diatoms-2','Cyanobacteria','Cryptophytes', 'Prasinophytes',
'Haptophytes', 'Dictyochophytes','Dinoflagellates','Raphidophytes','DD','CCPH','TchlA (ug/L)',
'mod_diatoms_chl','mod_flagellates_chl','mod_ciliates_chl','mod_TChl']]
idata.corr()
Cluster 1
Diatoms-1 | Diatoms-2 | Cyanobacteria | Cryptophytes | Prasinophytes | Haptophytes | Dictyochophytes | Dinoflagellates | Raphidophytes | DD | CCPH | TchlA (ug/L) | mod_diatoms_chl | mod_flagellates_chl | mod_ciliates_chl | mod_TChl | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diatoms-1 | 1.000000 | -0.105501 | -0.128087 | -0.384745 | 0.231871 | -0.470756 | -0.269230 | -0.288794 | 0.419654 | 0.998981 | -0.295988 | 0.996408 | 0.481240 | 0.734380 | 0.909275 | 0.712966 |
Diatoms-2 | -0.105501 | 1.000000 | -0.059396 | 0.798136 | 0.041510 | 0.657758 | 0.922213 | 0.173292 | -0.197633 | -0.060523 | 0.651243 | -0.033170 | 0.318550 | 0.437899 | 0.223603 | 0.425464 |
Cyanobacteria | -0.128087 | -0.059396 | 1.000000 | 0.273762 | 0.782517 | 0.432655 | 0.037699 | 0.727435 | 0.687435 | -0.131265 | 0.544229 | -0.098402 | -0.560466 | -0.338490 | -0.272749 | -0.520161 |
Cryptophytes | -0.384745 | 0.798136 | 0.273762 | 1.000000 | 0.384389 | 0.855388 | 0.953205 | 0.569213 | 0.028358 | -0.349979 | 0.932492 | -0.308378 | -0.279022 | 0.096293 | -0.157463 | -0.124432 |
Prasinophytes | 0.231871 | 0.041510 | 0.782517 | 0.384389 | 1.000000 | 0.382096 | 0.214170 | 0.606875 | 0.870212 | 0.234629 | 0.643695 | 0.275866 | -0.580713 | 0.171504 | 0.154658 | -0.246054 |
Haptophytes | -0.470756 | 0.657758 | 0.432655 | 0.855388 | 0.382096 | 1.000000 | 0.761622 | 0.777240 | 0.230974 | -0.442685 | 0.911610 | -0.399593 | -0.327395 | -0.033694 | -0.225277 | -0.223540 |
Dictyochophytes | -0.269230 | 0.922213 | 0.037699 | 0.953205 | 0.214170 | 0.761622 | 1.000000 | 0.337586 | -0.121049 | -0.228399 | 0.820409 | -0.193387 | -0.031024 | 0.303904 | 0.029280 | 0.139183 |
Dinoflagellates | -0.288794 | 0.173292 | 0.727435 | 0.569213 | 0.606875 | 0.777240 | 0.337586 | 1.000000 | 0.549526 | -0.282019 | 0.759233 | -0.240038 | -0.530046 | -0.293379 | -0.300862 | -0.480687 |
Raphidophytes | 0.419654 | -0.197633 | 0.687435 | 0.028358 | 0.870212 | 0.230974 | -0.121049 | 0.549526 | 1.000000 | 0.412268 | 0.367786 | 0.443908 | -0.418130 | 0.234293 | 0.325341 | -0.108049 |
DD | 0.998981 | -0.060523 | -0.131265 | -0.349979 | 0.234629 | -0.442685 | -0.228399 | -0.282019 | 0.412268 | 1.000000 | -0.267553 | 0.998658 | 0.497508 | 0.757017 | 0.922847 | 0.734959 |
CCPH | -0.295988 | 0.651243 | 0.544229 | 0.932492 | 0.643695 | 0.911610 | 0.820409 | 0.759233 | 0.367786 | -0.267553 | 1.000000 | -0.218199 | -0.441493 | 0.082067 | -0.119013 | -0.225446 |
TchlA (ug/L) | 0.996408 | -0.033170 | -0.098402 | -0.308378 | 0.275866 | -0.399593 | -0.193387 | -0.240038 | 0.443908 | 0.998658 | -0.218199 | 1.000000 | 0.475657 | 0.767335 | 0.926548 | 0.727560 |
mod_diatoms_chl | 0.481240 | 0.318550 | -0.560466 | -0.279022 | -0.580713 | -0.327395 | -0.031024 | -0.530046 | -0.418130 | 0.497508 | -0.441493 | 0.475657 | 1.000000 | 0.703081 | 0.762388 | 0.936711 |
mod_flagellates_chl | 0.734380 | 0.437899 | -0.338490 | 0.096293 | 0.171504 | -0.033694 | 0.303904 | -0.293379 | 0.234293 | 0.757017 | 0.082067 | 0.767335 | 0.703081 | 1.000000 | 0.862770 | 0.906588 |
mod_ciliates_chl | 0.909275 | 0.223603 | -0.272749 | -0.157463 | 0.154658 | -0.225277 | 0.029280 | -0.300862 | 0.325341 | 0.922847 | -0.119013 | 0.926548 | 0.762388 | 0.862770 | 1.000000 | 0.888370 |
mod_TChl | 0.712966 | 0.425464 | -0.520161 | -0.124432 | -0.246054 | -0.223540 | 0.139183 | -0.480687 | -0.108049 | 0.734959 | -0.225446 | 0.727560 | 0.936711 | 0.906588 | 0.888370 | 1.000000 |
icluster=2
print('Cluster',icluster)
idata=data.loc[data.Cluster==icluster,['Diatoms-1', 'Diatoms-2','Cyanobacteria','Cryptophytes', 'Prasinophytes',
'Haptophytes', 'Dictyochophytes','Dinoflagellates','Raphidophytes','DD','CCPH','TchlA (ug/L)',
'mod_diatoms_chl','mod_flagellates_chl','mod_ciliates_chl','mod_TChl']]
idata.corr()
Cluster 2
Diatoms-1 | Diatoms-2 | Cyanobacteria | Cryptophytes | Prasinophytes | Haptophytes | Dictyochophytes | Dinoflagellates | Raphidophytes | DD | CCPH | TchlA (ug/L) | mod_diatoms_chl | mod_flagellates_chl | mod_ciliates_chl | mod_TChl | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diatoms-1 | 1.000000 | 0.559291 | -0.999838 | 0.456658 | 0.075098 | -0.999967 | -0.856877 | -0.908337 | -0.856877 | 0.964769 | -0.560487 | 0.979229 | 0.791426 | 0.423165 | 0.834615 | 0.726659 |
Diatoms-2 | 0.559291 | 1.000000 | -0.574134 | -0.482084 | -0.784629 | -0.566034 | -0.906596 | -0.854733 | -0.906596 | 0.757687 | -0.999999 | 0.715755 | 0.949359 | 0.987764 | 0.923418 | 0.975916 |
Cyanobacteria | -0.999838 | -0.574134 | 1.000000 | -0.440556 | -0.057121 | 0.999951 | 0.866025 | 0.915724 | 0.866025 | -0.969352 | 0.575316 | -0.982723 | -0.802310 | -0.439420 | -0.844403 | -0.738918 |
Cryptophytes | 0.456658 | -0.482084 | -0.440556 | 1.000000 | 0.921424 | -0.449386 | 0.067329 | -0.042716 | 0.067329 | 0.206506 | 0.480818 | 0.266790 | -0.182397 | -0.612821 | -0.108912 | -0.279348 |
Prasinophytes | 0.075098 | -0.784629 | -0.057121 | 0.921424 | 1.000000 | -0.066962 | 0.449715 | 0.348844 | 0.449715 | -0.189903 | 0.783733 | -0.128648 | -0.550105 | -0.871715 | -0.486600 | -0.630487 |
Haptophytes | -0.999967 | -0.566034 | 0.999951 | -0.449386 | -0.066962 | 1.000000 | 0.861054 | 0.911718 | 0.861054 | -0.966883 | 0.567224 | -0.980850 | -0.796385 | -0.430542 | -0.839080 | -0.732239 |
Dictyochophytes | -0.856877 | -0.906596 | 0.866025 | 0.067329 | 0.449715 | 0.861054 | 1.000000 | 0.993944 | 1.000000 | -0.962321 | 0.907204 | -0.943605 | -0.993275 | -0.829690 | -0.999129 | -0.976819 |
Dinoflagellates | -0.908337 | -0.854733 | 0.915724 | -0.042716 | 0.348844 | 0.911718 | 0.993944 | 1.000000 | 0.993944 | -0.986373 | 0.855482 | -0.974271 | -0.974536 | -0.763323 | -0.988492 | -0.947381 |
Raphidophytes | -0.856877 | -0.906596 | 0.866025 | 0.067329 | 0.449715 | 0.861054 | 1.000000 | 0.993944 | 1.000000 | -0.962321 | 0.907204 | -0.943605 | -0.993275 | -0.829690 | -0.999129 | -0.976819 |
DD | 0.964769 | 0.757687 | -0.969352 | 0.206506 | -0.189903 | -0.966883 | -0.962321 | -0.986373 | -0.962321 | 1.000000 | -0.758629 | 0.998075 | 0.924366 | 0.646638 | 0.950134 | 0.881806 |
CCPH | -0.560487 | -0.999999 | 0.575316 | 0.480818 | 0.783733 | 0.567224 | 0.907204 | 0.855482 | 0.907204 | -0.758629 | 1.000000 | -0.716763 | -0.949811 | -0.987538 | -0.923971 | -0.976230 |
TchlA (ug/L) | 0.979229 | 0.715755 | -0.982723 | 0.266790 | -0.128648 | -0.980850 | -0.943605 | -0.974271 | -0.943605 | 0.998075 | -0.716763 | 1.000000 | 0.898926 | 0.598086 | 0.928965 | 0.850860 |
mod_diatoms_chl | 0.791426 | 0.949359 | -0.802310 | -0.182397 | -0.550105 | -0.796385 | -0.993275 | -0.974536 | -0.993275 | 0.924366 | -0.949811 | 0.898926 | 1.000000 | 0.923761 | 0.753701 | 0.995884 |
mod_flagellates_chl | 0.423165 | 0.987764 | -0.439420 | -0.612821 | -0.871715 | -0.430542 | -0.829690 | -0.763323 | -0.829690 | 0.646638 | -0.987538 | 0.598086 | 0.923761 | 1.000000 | 0.701496 | 0.950582 |
mod_ciliates_chl | 0.834615 | 0.923418 | -0.844403 | -0.108912 | -0.486600 | -0.839080 | -0.999129 | -0.988492 | -0.999129 | 0.950134 | -0.923971 | 0.928965 | 0.753701 | 0.701496 | 1.000000 | 0.779734 |
mod_TChl | 0.726659 | 0.975916 | -0.738918 | -0.279348 | -0.630487 | -0.732239 | -0.976819 | -0.947381 | -0.976819 | 0.881806 | -0.976230 | 0.850860 | 0.995884 | 0.950582 | 0.779734 | 1.000000 |
icluster=3
print('Cluster',icluster)
idata=data.loc[data.Cluster==icluster,['Diatoms-1', 'Diatoms-2','Cyanobacteria','Cryptophytes', 'Prasinophytes',
'Haptophytes', 'Dictyochophytes','Dinoflagellates','Raphidophytes','DD','CCPH','TchlA (ug/L)',
'mod_diatoms_chl','mod_flagellates_chl','mod_ciliates_chl','mod_TChl']]
idata.corr()
Cluster 3
Diatoms-1 | Diatoms-2 | Cyanobacteria | Cryptophytes | Prasinophytes | Haptophytes | Dictyochophytes | Dinoflagellates | Raphidophytes | DD | CCPH | TchlA (ug/L) | mod_diatoms_chl | mod_flagellates_chl | mod_ciliates_chl | mod_TChl | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diatoms-1 | 1.000000 | 0.164432 | -0.273405 | -0.324963 | -0.246406 | -0.225108 | -0.088462 | -0.130526 | -0.243153 | 0.991186 | -0.316451 | 0.935365 | 0.651133 | -0.155141 | 0.162084 | 0.618665 |
Diatoms-2 | 0.164432 | 1.000000 | 0.008477 | -0.023942 | 0.023341 | -0.081401 | 0.552383 | 0.104048 | -0.106513 | 0.293658 | -0.035528 | 0.354955 | 0.113787 | -0.020113 | -0.118360 | 0.100531 |
Cyanobacteria | -0.273405 | 0.008477 | 1.000000 | 0.531606 | 0.660840 | 0.362140 | 0.013960 | -0.075996 | 0.512617 | -0.263818 | 0.664779 | -0.085296 | -0.310637 | 0.088426 | -0.191239 | -0.297638 |
Cryptophytes | -0.324963 | -0.023942 | 0.531606 | 1.000000 | 0.679258 | 0.597210 | -0.022661 | 0.402021 | 0.602743 | -0.318138 | 0.870511 | -0.074681 | -0.402504 | 0.165356 | -0.207235 | -0.363615 |
Prasinophytes | -0.246406 | 0.023341 | 0.660840 | 0.679258 | 1.000000 | 0.312156 | -0.030147 | -0.018943 | 0.585328 | -0.235658 | 0.797640 | -0.021119 | -0.344365 | -0.039400 | -0.309840 | -0.388785 |
Haptophytes | -0.225108 | -0.081401 | 0.362140 | 0.597210 | 0.312156 | 1.000000 | -0.038035 | 0.586110 | 0.450805 | -0.229086 | 0.801242 | -0.000499 | -0.165380 | 0.000166 | -0.140611 | -0.178918 |
Dictyochophytes | -0.088462 | 0.552383 | 0.013960 | -0.022661 | -0.030147 | -0.038035 | 1.000000 | 0.239917 | -0.050509 | -0.011540 | -0.036324 | 0.086088 | -0.113870 | 0.170351 | -0.118140 | -0.060255 |
Dinoflagellates | -0.130526 | 0.104048 | -0.075996 | 0.402021 | -0.018943 | 0.586110 | 0.239917 | 1.000000 | 0.089811 | -0.112519 | 0.375123 | 0.038108 | -0.238440 | 0.201272 | -0.052864 | -0.171428 |
Raphidophytes | -0.243153 | -0.106513 | 0.512617 | 0.602743 | 0.585328 | 0.450805 | -0.050509 | 0.089811 | 1.000000 | -0.249945 | 0.658878 | -0.059270 | -0.289631 | -0.035918 | -0.230991 | -0.325979 |
DD | 0.991186 | 0.293658 | -0.263818 | -0.318138 | -0.235658 | -0.229086 | -0.011540 | -0.112519 | -0.249945 | 1.000000 | -0.311445 | 0.954137 | 0.646297 | -0.153048 | 0.141180 | 0.613051 |
CCPH | -0.316451 | -0.035528 | 0.664779 | 0.870511 | 0.797640 | 0.801242 | -0.036324 | 0.375123 | 0.658878 | -0.311445 | 1.000000 | -0.033739 | -0.350641 | 0.030082 | -0.267100 | -0.365930 |
TchlA (ug/L) | 0.935365 | 0.354955 | -0.085296 | -0.074681 | -0.021119 | -0.000499 | 0.086088 | 0.038108 | -0.059270 | 0.954137 | -0.033739 | 1.000000 | 0.557359 | -0.130339 | 0.056474 | 0.524760 |
mod_diatoms_chl | 0.651133 | 0.113787 | -0.310637 | -0.402504 | -0.344365 | -0.165380 | -0.113870 | -0.238440 | -0.289631 | 0.646297 | -0.350641 | 0.557359 | 1.000000 | 0.098863 | 0.438238 | 0.848519 |
mod_flagellates_chl | -0.155141 | -0.020113 | 0.088426 | 0.165356 | -0.039400 | 0.000166 | 0.170351 | 0.201272 | -0.035918 | -0.153048 | 0.030082 | -0.130339 | 0.098863 | 1.000000 | 0.640615 | 0.606770 |
mod_ciliates_chl | 0.162084 | -0.118360 | -0.191239 | -0.207235 | -0.309840 | -0.140611 | -0.118140 | -0.052864 | -0.230991 | 0.141180 | -0.267100 | 0.056474 | 0.438238 | 0.640615 | 1.000000 | 0.729094 |
mod_TChl | 0.618665 | 0.100531 | -0.297638 | -0.363615 | -0.388785 | -0.178918 | -0.060255 | -0.171428 | -0.325979 | 0.613051 | -0.365930 | 0.524760 | 0.848519 | 0.606770 | 0.729094 | 1.000000 |
icluster=4
print('Cluster',icluster)
idata=data.loc[data.Cluster==icluster,['Diatoms-1', 'Diatoms-2','Cyanobacteria','Cryptophytes', 'Prasinophytes',
'Haptophytes', 'Dictyochophytes','Dinoflagellates','Raphidophytes','DD','CCPH','TchlA (ug/L)',
'mod_diatoms_chl','mod_flagellates_chl','mod_ciliates_chl','mod_TChl']]
idata.corr()
Cluster 4
Diatoms-1 | Diatoms-2 | Cyanobacteria | Cryptophytes | Prasinophytes | Haptophytes | Dictyochophytes | Dinoflagellates | Raphidophytes | DD | CCPH | TchlA (ug/L) | mod_diatoms_chl | mod_flagellates_chl | mod_ciliates_chl | mod_TChl | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diatoms-1 | 1.000000 | 0.508275 | -0.165768 | -0.288165 | -0.192417 | -0.389352 | -0.214873 | -0.028576 | -0.046990 | 0.943138 | -0.339393 | 0.516378 | 0.363429 | -0.302924 | 0.143840 | 0.149701 |
Diatoms-2 | 0.508275 | 1.000000 | 0.090820 | 0.075874 | 0.235486 | -0.372293 | 0.196250 | 0.028114 | -0.262349 | 0.765636 | -0.014307 | 0.633316 | 0.147316 | -0.220476 | 0.175719 | 0.025069 |
Cyanobacteria | -0.165768 | 0.090820 | 1.000000 | 0.863469 | 0.738230 | 0.450315 | 0.314656 | 0.420440 | 0.425904 | -0.088767 | 0.849240 | 0.605007 | -0.240536 | 0.025482 | -0.137188 | -0.198156 |
Cryptophytes | -0.288165 | 0.075874 | 0.863469 | 1.000000 | 0.800374 | 0.574969 | 0.537709 | 0.495324 | 0.425470 | -0.185961 | 0.950471 | 0.616958 | -0.310309 | 0.287317 | -0.226897 | -0.127101 |
Prasinophytes | -0.192417 | 0.235486 | 0.738230 | 0.800374 | 1.000000 | 0.206269 | 0.575104 | 0.123917 | 0.219690 | -0.052835 | 0.828900 | 0.619147 | -0.324440 | 0.029926 | -0.232664 | -0.276301 |
Haptophytes | -0.389352 | -0.372293 | 0.450315 | 0.574969 | 0.206269 | 1.000000 | 0.092597 | 0.395508 | 0.336501 | -0.434525 | 0.697788 | 0.187301 | -0.078203 | 0.400670 | -0.104246 | 0.136216 |
Dictyochophytes | -0.214873 | 0.196250 | 0.314656 | 0.537709 | 0.575104 | 0.092597 | 1.000000 | 0.147862 | 0.017152 | -0.084752 | 0.474809 | 0.353718 | -0.244071 | 0.428750 | -0.183841 | 0.007267 |
Dinoflagellates | -0.028576 | 0.028114 | 0.420440 | 0.495324 | 0.123917 | 0.395508 | 0.147862 | 1.000000 | 0.451007 | -0.010494 | 0.388430 | 0.342576 | 0.042517 | 0.341046 | 0.205372 | 0.244379 |
Raphidophytes | -0.046990 | -0.262349 | 0.425904 | 0.425470 | 0.219690 | 0.336501 | 0.017152 | 0.451007 | 1.000000 | -0.136360 | 0.391585 | 0.223131 | -0.197903 | -0.096597 | -0.239360 | -0.243328 |
DD | 0.943138 | 0.765636 | -0.088767 | -0.185961 | -0.052835 | -0.434525 | -0.084752 | -0.010494 | -0.136360 | 1.000000 | -0.259034 | 0.630157 | 0.328326 | -0.311370 | 0.175265 | 0.121496 |
CCPH | -0.339393 | -0.014307 | 0.849240 | 0.950471 | 0.828900 | 0.697788 | 0.474809 | 0.388430 | 0.391585 | -0.259034 | 1.000000 | 0.583459 | -0.286589 | 0.254046 | -0.222831 | -0.125264 |
TchlA (ug/L) | 0.516378 | 0.633316 | 0.605007 | 0.616958 | 0.619147 | 0.187301 | 0.353718 | 0.342576 | 0.223131 | 0.630157 | 0.583459 | 1.000000 | 0.041151 | -0.030763 | -0.029069 | 0.012494 |
mod_diatoms_chl | 0.363429 | 0.147316 | -0.240536 | -0.310309 | -0.324440 | -0.078203 | -0.244071 | 0.042517 | -0.197903 | 0.328326 | -0.286589 | 0.041151 | 1.000000 | 0.215049 | 0.612861 | 0.778154 |
mod_flagellates_chl | -0.302924 | -0.220476 | 0.025482 | 0.287317 | 0.029926 | 0.400670 | 0.428750 | 0.341046 | -0.096597 | -0.311370 | 0.254046 | -0.030763 | 0.215049 | 1.000000 | 0.573976 | 0.774385 |
mod_ciliates_chl | 0.143840 | 0.175719 | -0.137188 | -0.226897 | -0.232664 | -0.104246 | -0.183841 | 0.205372 | -0.239360 | 0.175265 | -0.222831 | -0.029069 | 0.612861 | 0.573976 | 1.000000 | 0.816647 |
mod_TChl | 0.149701 | 0.025069 | -0.198156 | -0.127101 | -0.276301 | 0.136216 | 0.007267 | 0.244379 | -0.243328 | 0.121496 | -0.125264 | 0.012494 | 0.778154 | 0.774385 | 0.816647 | 1.000000 |
icluster=5
print('Cluster',icluster)
idata=data.loc[data.Cluster==icluster,['Diatoms-1', 'Diatoms-2','Cyanobacteria','Cryptophytes', 'Prasinophytes',
'Haptophytes', 'Dictyochophytes','Dinoflagellates','Raphidophytes','DD','CCPH','TchlA (ug/L)',
'mod_diatoms_chl','mod_flagellates_chl','mod_ciliates_chl','mod_TChl']]
idata.corr()
Cluster 5
Diatoms-1 | Diatoms-2 | Cyanobacteria | Cryptophytes | Prasinophytes | Haptophytes | Dictyochophytes | Dinoflagellates | Raphidophytes | DD | CCPH | TchlA (ug/L) | mod_diatoms_chl | mod_flagellates_chl | mod_ciliates_chl | mod_TChl | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diatoms-1 | 1.000000 | 0.148467 | -0.232265 | -0.158488 | 0.035176 | -0.417042 | -0.254348 | 0.151045 | -0.239964 | 0.995436 | -0.255864 | 0.987828 | 0.389938 | 0.421184 | 0.640591 | 0.423702 |
Diatoms-2 | 0.148467 | 1.000000 | -0.001709 | -0.092699 | -0.002969 | -0.143037 | -0.073506 | 0.583001 | -0.087582 | 0.242163 | -0.114877 | 0.250511 | -0.099862 | -0.184803 | 0.027175 | -0.114912 |
Cyanobacteria | -0.232265 | -0.001709 | 1.000000 | 0.687849 | 0.034613 | 0.119474 | 0.425095 | 0.207678 | 0.382328 | -0.228043 | 0.492998 | -0.171693 | 0.428516 | 0.250218 | 0.197940 | 0.415460 |
Cryptophytes | -0.158488 | -0.092699 | 0.687849 | 1.000000 | 0.246412 | 0.358074 | 0.289762 | 0.223349 | 0.429798 | -0.164439 | 0.840444 | -0.074368 | 0.650669 | 0.403354 | 0.350450 | 0.636185 |
Prasinophytes | 0.035176 | -0.002969 | 0.034613 | 0.246412 | 1.000000 | 0.372909 | -0.043510 | 0.115825 | 0.511088 | 0.034225 | 0.605949 | 0.103877 | 0.140683 | -0.132876 | 0.148480 | 0.104351 |
Haptophytes | -0.417042 | -0.143037 | 0.119474 | 0.358074 | 0.372909 | 1.000000 | 0.094206 | 0.107764 | 0.583172 | -0.422967 | 0.734177 | -0.347834 | -0.122389 | -0.148961 | -0.329063 | -0.139705 |
Dictyochophytes | -0.254348 | -0.073506 | 0.425095 | 0.289762 | -0.043510 | 0.094206 | 1.000000 | 0.112127 | 0.455527 | -0.256637 | 0.207489 | -0.225927 | 0.321705 | 0.153247 | 0.187287 | 0.307539 |
Dinoflagellates | 0.151045 | 0.583001 | 0.207678 | 0.223349 | 0.115825 | 0.107764 | 0.112127 | 1.000000 | 0.352636 | 0.204451 | 0.218063 | 0.264270 | 0.173793 | 0.050141 | 0.272778 | 0.166262 |
Raphidophytes | -0.239964 | -0.087582 | 0.382328 | 0.429798 | 0.511088 | 0.583172 | 0.455527 | 0.352636 | 1.000000 | -0.243882 | 0.657418 | -0.155633 | 0.294190 | 0.117561 | 0.169267 | 0.277533 |
DD | 0.995436 | 0.242163 | -0.228043 | -0.164439 | 0.034225 | -0.422967 | -0.256637 | 0.204451 | -0.243882 | 1.000000 | -0.262116 | 0.993341 | 0.372935 | 0.395394 | 0.631112 | 0.404608 |
CCPH | -0.255864 | -0.114877 | 0.492998 | 0.840444 | 0.605949 | 0.734177 | 0.207489 | 0.218063 | 0.657418 | -0.262116 | 1.000000 | -0.154877 | 0.398794 | 0.150610 | 0.131580 | 0.371732 |
TchlA (ug/L) | 0.987828 | 0.250511 | -0.171693 | -0.074368 | 0.103877 | -0.347834 | -0.225927 | 0.264270 | -0.155633 | 0.993341 | -0.154877 | 1.000000 | 0.427968 | 0.420396 | 0.666056 | 0.457113 |
mod_diatoms_chl | 0.389938 | -0.099862 | 0.428516 | 0.650669 | 0.140683 | -0.122389 | 0.321705 | 0.173793 | 0.294190 | 0.372935 | 0.398794 | 0.427968 | 1.000000 | 0.805902 | 0.728075 | 0.992284 |
mod_flagellates_chl | 0.421184 | -0.184803 | 0.250218 | 0.403354 | -0.132876 | -0.148961 | 0.153247 | 0.050141 | 0.117561 | 0.395394 | 0.150610 | 0.420396 | 0.805902 | 1.000000 | 0.766905 | 0.869491 |
mod_ciliates_chl | 0.640591 | 0.027175 | 0.197940 | 0.350450 | 0.148480 | -0.329063 | 0.187287 | 0.272778 | 0.169267 | 0.631112 | 0.131580 | 0.666056 | 0.728075 | 0.766905 | 1.000000 | 0.781889 |
mod_TChl | 0.423702 | -0.114912 | 0.415460 | 0.636185 | 0.104351 | -0.139705 | 0.307539 | 0.166262 | 0.277533 | 0.404608 | 0.371732 | 0.457113 | 0.992284 | 0.869491 | 0.781889 | 1.000000 |
data.keys()
Index(['index', 'FIL:START TIME YYYY/MM/DD HH:MM:SS', 'LOC:STATION', 'Lat', 'Lon', 'LOC:WATER DEPTH', 'Sample_Number', 'Temperature', 'Salinity', 'Oxygen:Dissolved:CTD', 'pH:SBE:Nominal', 'Salinity:Bottle', 'Flag:Salinity:Bottle', 'Flag:Chlorophyll:Extracted', 'Flag:Nitrate_plus_Nitrite', 'Flag:Silicate', 'Flag:Phosphate', 'Cruise', 'Oxygen:Dissolved', 'Flag:Oxygen:Dissolved', 'Cyanobacteria', 'Prasinophytes', 'Cryptophytes', 'Diatoms-1', 'Diatoms-2', 'Haptophytes', 'TchlA (ug/L)', 'Pressure [decibar]', 'Transmissivity [*/metre]', 'PAR [uE/m^2/sec]', 'PAR:Reference [uE/m^2/sec]', 'Oxygen:Dissolved:SBE [mL/L]', 'Oxygen:Dissolved:SBE [umol/kg]', 'Chlorophyll:Extracted [mg/m^3]', 'Phaeo-Pigment:Extracted [mg/m^3]', 'Nitrate_plus_Nitrite [umol/L]', 'Silicate [umol/L]', 'Phosphate [umol/L]', 'Bottle_Number', 'Oxygen:Dissolved [mL/L]', 'Oxygen:Dissolved [umol/kg]', 'Depth [metres]', 'Fluorescence [mg/m^3]', 'Oxygen:Dissolved:CTD [mL/L]', 'Oxygen:Dissolved:CTD [umol/kg]', 'Depth:Nominal [metres]', 'Alkalinity:Total [umol/L]', 'Flag:Alkalinity:Total', 'Carbon:Dissolved:Inorganic [umol/kg]', 'Flag:Carbon:Dissolved:Inorganic', 'Dinoflagellates', 'Dictyochophytes', 'Raphidophytes', 'Z', 'p', 'SA', 'CT', 'dtUTC', 'j', 'i', 'mod_nitrate', 'mod_silicon', 'mod_ammonium', 'mod_diatoms', 'mod_ciliates', 'mod_flagellates', 'mod_vosaline', 'mod_votemper', 'k', 'other', 'yd', 'Year', 'mod_diatoms_chl', 'mod_flagellates_chl', 'mod_ciliates_chl', 'mod_TChl', 'CCPH', 'DD', 'Cluster'], dtype='object')
def printStats0(s,descript):
print(' '+descript)
print(' N= ',s[0])
print(' model mean=',s[1])
print(' obs mean= ',s[2])
print(' bias= ',s[3])
print(' RMSE= ',s[4])
print(' WSS= ',s[5])
def printStatsAll(icluster,data):
idata=data.loc[data.Cluster==icluster]
sD=et.stats(idata['DD'],idata['mod_diatoms_chl'])
sF=et.stats(idata['CCPH'],idata['mod_flagellates_chl'])
sT=et.stats(idata['TchlA (ug/L)'],idata['mod_TChl'])
dataHPLCLocs=idata.loc[idata.DD>=0]
sTem=et.stats(dataHPLCLocs['CT'],dataHPLCLocs['mod_votemper'])
sSal=et.stats(dataHPLCLocs['SA'],dataHPLCLocs['mod_vosaline'])## units?
print('Cluster=',icluster)
printStats0(sD,'Diatoms-1+Diatoms-2 and Model Diatoms')
printStats0(sF,'Crypto+Cyano+Prasino+Hapto and Model Flagellates')
printStats0(sT,'Total Chlorophyll (ug/L)')
printStats0(sTem,'Conservative Temperature')
printStats0(sSal,'Reference Salinity')
for icluster in range(1,6):
printStatsAll(icluster,data)
data['Temperature']
Cluster= 1 Diatoms-1+Diatoms-2 and Model Diatoms N= 7 model mean= 1.541199406449284 obs mean= 3.4787142857142856 bias= -1.9375148792650017 RMSE= 3.9553006767020715 WSS= 0.52738272203478 Crypto+Cyano+Prasino+Hapto and Model Flagellates N= 7 model mean= 0.9191453722970826 obs mean= 0.22599999999999998 bias= 0.6931453722970826 RMSE= 1.345124594944328 WSS= 0.10880015854805625 Total Chlorophyll (ug/L) N= 7 model mean= 2.7860084700797287 obs mean= 3.7647142857142852 bias= -0.9787058156345565 RMSE= 2.8928754068985754 WSS= 0.7546943933533866 Conservative Temperature N= 7 model mean= 11.740195683070592 obs mean= 10.779180372580294 bias= 0.9610153104902981 RMSE= 1.356938458645703 WSS= 0.754007701433208 Reference Salinity N= 7 model mean= 29.215067999703543 obs mean= 29.78387087042816 bias= -0.5688028707246175 RMSE= 0.8865137592740546 WSS= 0.7571490766079084 Cluster= 2 Diatoms-1+Diatoms-2 and Model Diatoms N= 3 model mean= 2.2314881980419163 obs mean= 3.808 bias= -1.5765118019580835 RMSE= 1.9077679400388772 WSS= 0.8412853042284493 Crypto+Cyano+Prasino+Hapto and Model Flagellates N= 3 model mean= 0.5688631832599641 obs mean= 0.5223333333333334 bias= 0.04652984992663067 RMSE= 0.6814562267097646 WSS= 0.0 Total Chlorophyll (ug/L) N= 3 model mean= 3.1329140603542327 obs mean= 4.500666666666667 bias= -1.367752606312434 RMSE= 1.8542665197464965 WSS= 0.8576228994796257 Conservative Temperature N= 3 model mean= 11.333172480265299 obs mean= 10.94457519730328 bias= 0.388597282962019 RMSE= 0.4067459391098711 WSS= 0.8818718129141834 Reference Salinity N= 3 model mean= 30.399763107299805 obs mean= 30.679512751925078 bias= -0.27974964462527296 RMSE= 0.3918259758517716 WSS= 0.8977957008055653 Cluster= 3 Diatoms-1+Diatoms-2 and Model Diatoms N= 100 model mean= 1.389847192164045 obs mean= 2.2496 bias= -0.8597528078359551 RMSE= 3.1164097586397386 WSS= 0.7579877104504467 Crypto+Cyano+Prasino+Hapto and Model Flagellates N= 100 model mean= 1.1381629794985055 obs mean= 0.9924100000000001 bias= 0.1457529794985054 RMSE= 1.3993870346430897 WSS= 0.3850441151733929 Total Chlorophyll (ug/L) N= 100 model mean= 2.9085302104311994 obs mean= 3.4831600000000003 bias= -0.5746297895688008 RMSE= 3.305471528124419 WSS= 0.6977847612405823 Conservative Temperature N= 100 model mean= 14.081168527603149 obs mean= 13.963695858058895 bias= 0.11747266954425406 RMSE= 0.9503826249641765 WSS= 0.9737462151215563 Reference Salinity N= 100 model mean= 24.299228200912477 obs mean= 24.851023900300216 bias= -0.5517956993877391 RMSE= 2.4664068835962443 WSS= 0.9150646120096915 Cluster= 4 Diatoms-1+Diatoms-2 and Model Diatoms N= 35 model mean= 0.787663998353694 obs mean= 0.7617714285714287 bias= 0.025892569782265396 RMSE= 1.4626964260102135 WSS= 0.5440617208372476 Crypto+Cyano+Prasino+Hapto and Model Flagellates N= 35 model mean= 0.918229034287589 obs mean= 1.0680285714285715 bias= -0.1497995371409826 RMSE= 1.1670328305108004 WSS= 0.533164077383347 Total Chlorophyll (ug/L) N= 35 model mean= 2.0605138760645474 obs mean= 1.9487714285714293 bias= 0.11174244749311812 RMSE= 2.170459993820359 WSS= 0.3570883875321662 Conservative Temperature N= 35 model mean= 13.145041465759277 obs mean= 13.389398740101768 bias= -0.24435727434249088 RMSE= 1.0020433223934733 WSS= 0.9647921668254179 Reference Salinity N= 35 model mean= 27.428720583234515 obs mean= 27.686499213532674 bias= -0.2577786302981586 RMSE= 1.0892288379916317 WSS= 0.8656625313021775 Cluster= 5 Diatoms-1+Diatoms-2 and Model Diatoms N= 44 model mean= 2.5379747460892594 obs mean= 3.8224318181818178 bias= -1.2844570720925583 RMSE= 4.42671425724861 WSS= 0.5909701075302164 Crypto+Cyano+Prasino+Hapto and Model Flagellates N= 44 model mean= 0.5451702012257142 obs mean= 0.5252954545454545 bias= 0.01987474668025979 RMSE= 0.602105205135285 WSS= 0.5037080951429683 Total Chlorophyll (ug/L) N= 44 model mean= 3.4059304682918916 obs mean= 4.523068181818181 bias= -1.1171377135262897 RMSE= 4.193086113517278 WSS= 0.6571518638496183 Conservative Temperature N= 44 model mean= 11.244335412979126 obs mean= 10.944506542413878 bias= 0.2998288705652481 RMSE= 0.7004402241421247 WSS= 0.8415719672099807 Reference Salinity N= 44 model mean= 30.515184662558816 obs mean= 30.850794390544184 bias= -0.3356097279853678 RMSE= 0.6649381354853522 WSS= 0.7993909209151008