added css files for cohort and individual panels
This commit is contained in:
2
dashboard/.gitignore
vendored
2
dashboard/.gitignore
vendored
@@ -21,3 +21,5 @@
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
/flask-server/__pycache__
|
||||
Binary file not shown.
@@ -41,6 +41,7 @@ def read_rawFacialDf(ar, id):
|
||||
facial_asym_filename = ar + "/raw_variables/"+id+"/facial/face_asymmetry/"+id+"_facasym.csv"
|
||||
facial_au_filename = ar + "/raw_variables/"+id+"/facial/face_au/"+id+"_facau.csv"
|
||||
facial_expr_filename = ar + "/raw_variables/"+id+"/facial/face_expressivity/"+id+"_facemo.csv"
|
||||
landmark_filename = ar + "/raw_variables/"+id+"/facial/face_landmark/"+id+"_faclmk.csv"
|
||||
|
||||
if not exists(facial_asym_filename) or not exists(facial_au_filename) or not exists(facial_expr_filename):
|
||||
return pd.DataFrame()
|
||||
@@ -51,7 +52,6 @@ def read_rawFacialDf(ar, id):
|
||||
facial_au = pd.read_csv(facial_au_filename)
|
||||
facial_au_cols = [col for col in facial_au if col not in skip_cols]
|
||||
|
||||
|
||||
facial_expr = pd.read_csv(facial_expr_filename)
|
||||
facial_expr_cols = [col for col in facial_expr if col not in skip_cols and "AU" not in col]
|
||||
|
||||
@@ -71,6 +71,10 @@ def read_rawMovementDf(ar, id):
|
||||
head_movement_filename = ar + "/raw_variables/"+id+"/movement/head_movement/"+id+"_headmov.csv"
|
||||
head_pose_filename = ar + "/raw_variables/"+id+"/movement/head_pose/"+id+"_headpose.csv"
|
||||
|
||||
blinks_filename = ar + "/raw_variables/"+id+"/movement/eye_blink/"+id+"_eyeblinks.csv"
|
||||
fac_tremor_filename = ar + "/raw_variables/"+id+"/movement/facial_tremor/"+id+"_fac_tremor.csv"
|
||||
voice_tremor_filename = ar + "/raw_variables/"+id+"/movement/voice_tremor/"+id+"_vtremor.csv"
|
||||
|
||||
if not exists(gaze_filename) or not exists(head_movement_filename) or not exists(head_pose_filename):
|
||||
return pd.DataFrame()
|
||||
|
||||
@@ -81,6 +85,16 @@ def read_rawMovementDf(ar, id):
|
||||
head_movement_cols = [col for col in head_movement if col not in skip_cols]
|
||||
|
||||
|
||||
# blinks = pd.read_csv(blinks_filename)
|
||||
# blinks_cols = [col for col in blinks if col not in skip_cols]
|
||||
|
||||
# fac_tremor = pd.read_csv(fac_tremor_filename)
|
||||
# fac_tremor_cols = [col for col in fac_tremor if col not in skip_cols]
|
||||
|
||||
voice_tremor = pd.read_csv(voice_tremor_filename)
|
||||
voice_tremor_cols = [col for col in voice_tremor if col not in skip_cols]
|
||||
|
||||
|
||||
head_pose = pd.read_csv(head_pose_filename)
|
||||
head_pose_cols = [col for col in head_pose if col not in skip_cols]
|
||||
|
||||
@@ -89,8 +103,12 @@ def read_rawMovementDf(ar, id):
|
||||
movement_df[el] = head_movement[el]
|
||||
for el in gaze_cols:
|
||||
movement_df[el] = gaze[el]
|
||||
|
||||
|
||||
# for el in blinks_cols:
|
||||
# movement_df[el] = blinks[el]
|
||||
# for el in fac_tremor_cols:
|
||||
# movement_df[el] = fac_tremor[el]
|
||||
for el in voice_tremor_cols:
|
||||
movement_df[el] = voice_tremor[el]
|
||||
return movement_df.fillna(0)
|
||||
|
||||
|
||||
@@ -104,6 +122,12 @@ def read_rawAcousticDf(ar, id):
|
||||
intt_filename = ar + "/raw_variables/"+id+"/acoustic/intensity/"+id+"_intensity.csv"
|
||||
mfcc_filename = ar + "/raw_variables/"+id+"/acoustic/mfcc/"+id+"_mfcc.csv"
|
||||
pitch_filename = ar + "/raw_variables/"+id+"/acoustic/pitch/"+id+"_pitch.csv"
|
||||
jitter_filename = ar + "/raw_variables/"+id+"/acoustic/jitter/"+id+"_jitter.csv"
|
||||
pause_segment_filename = ar + "/raw_variables/"+id+"/acoustic/pause_segment/"+id+"_pausechar.csv"
|
||||
shimmer_filename = ar + "/raw_variables/"+id+"/acoustic/shimmer/"+id+"_shimmer.csv"
|
||||
voice_frame_score_filename = ar + "/raw_variables/"+id+"/acoustic/voice_frame_score/"+id+"_voiceprev.csv"
|
||||
|
||||
filename_list = [fm_filename, gne_filename, hnr_filename, intt_filename,mfcc_filename, pitch_filename, pause_segment_filename, shimmer_filename, voice_frame_score_filename]
|
||||
|
||||
if not exists(fm_filename) or not exists(gne_filename) or not exists(hnr_filename) or not exists(intt_filename) or not exists(mfcc_filename) or not exists(pitch_filename):
|
||||
return pd.DataFrame
|
||||
@@ -129,6 +153,18 @@ def read_rawAcousticDf(ar, id):
|
||||
pitch = pd.read_csv(pitch_filename)
|
||||
pitch_cols = [col for col in pitch if col not in skip_cols]
|
||||
|
||||
pause_segment = pd.read_csv(pause_segment_filename)
|
||||
pause_segment_cols = [col for col in pause_segment if col not in skip_cols]
|
||||
|
||||
jitter = pd.read_csv(jitter_filename)
|
||||
jitter_cols = [col for col in jitter if col not in skip_cols]
|
||||
|
||||
shimmer = pd.read_csv(shimmer_filename)
|
||||
shimmer_cols = [col for col in shimmer if col not in skip_cols]
|
||||
|
||||
voice_frame_score = pd.read_csv(voice_frame_score_filename)
|
||||
voice_frame_score_cols = [col for col in voice_frame_score if col not in skip_cols]
|
||||
|
||||
acoustic_df = fm.loc[:, ~fm.columns.isin(skip_cols)].copy()
|
||||
for el in gne_cols:
|
||||
acoustic_df[el] = gne[el]
|
||||
@@ -140,6 +176,14 @@ def read_rawAcousticDf(ar, id):
|
||||
acoustic_df[el] = mfcc[el]
|
||||
for el in pitch_cols:
|
||||
acoustic_df[el] = pitch[el]
|
||||
for el in pause_segment_cols:
|
||||
acoustic_df[el] = pause_segment[el]
|
||||
for el in jitter_cols:
|
||||
acoustic_df[el] = jitter[el]
|
||||
for el in shimmer_cols:
|
||||
acoustic_df[el] = shimmer[el]
|
||||
for el in voice_frame_score_cols:
|
||||
acoustic_df[el] = voice_frame_score[el]
|
||||
return acoustic_df.fillna(0)
|
||||
|
||||
|
||||
|
||||
@@ -111,15 +111,15 @@ def fetchIndividualFacialTimelineData():
|
||||
def getRawAttributesAndIds():
|
||||
result = {}
|
||||
if not individualFacialRawData.empty:
|
||||
result['facial'] = [x for x in list(individualFacialRawData.columns) if x not in ["frame"]]
|
||||
result['facial'] = [x for x in list(individualFacialRawData.columns)]
|
||||
else:
|
||||
result['facial'] =[]
|
||||
if not individualAcousticRawData.empty:
|
||||
result['acoustic'] = [x for x in list(individualAcousticRawData.columns) if x not in ["Frames"]]
|
||||
result['acoustic'] = [x for x in list(individualAcousticRawData.columns)]
|
||||
else:
|
||||
result['acoustic'] = []
|
||||
if not individualMovementRawData.empty:
|
||||
result['movement'] = [x for x in list(individualMovementRawData.columns) if x not in ["Frames"]]
|
||||
result['movement'] = [x for x in list(individualMovementRawData.columns)]
|
||||
else:
|
||||
result['movement'] = []
|
||||
if len(rawDataArgs) > 0:
|
||||
@@ -151,77 +151,68 @@ def individualCorrMatrixData(id):
|
||||
all_df = f.copy()
|
||||
if len(f) == len(m):
|
||||
for x in m.columns:
|
||||
if x not in ['Frames', 'frame']:
|
||||
all_df[x] = m[x]
|
||||
all_df[x] = m[x]
|
||||
else:
|
||||
seg = int(len(m)/(max(len(f),1)))
|
||||
reminder = len(m)%(max(len(f),1))
|
||||
for i, row in all_df.iterrows():
|
||||
for x in m.columns:
|
||||
if x not in ['Frames', 'frame']:
|
||||
if i <reminder:
|
||||
all_df.loc[i,x] = sum(list(m[i*(seg + 1):(i+1)*(seg+1)][x]))/(seg+1)
|
||||
else:
|
||||
all_df.loc[i,x] = sum(list(m[i*seg:(i+1)*seg][x]))/seg
|
||||
if i <reminder:
|
||||
all_df.loc[i,x] = sum(list(m[i*(seg + 1):(i+1)*(seg+1)][x]))/(seg+1)
|
||||
else:
|
||||
all_df.loc[i,x] = sum(list(m[i*seg:(i+1)*seg][x]))/seg
|
||||
if len(a) > len(f):
|
||||
seg = int(len(a)/(max(len(f),1)))
|
||||
reminder = len(a)%(max(len(f),1))
|
||||
for i, row in all_df.iterrows():
|
||||
for x in a.columns:
|
||||
if x not in ['Frames', 'frame']:
|
||||
if i <reminder:
|
||||
all_df.loc[i,x] = sum(list(a[i*(seg + 1):(i+1)*(seg+1)][x]))/(seg+1)
|
||||
else:
|
||||
all_df.loc[i,x] = sum(list(a[i*seg:(i+1)*seg][x]))/seg
|
||||
if i <reminder:
|
||||
all_df.loc[i,x] = sum(list(a[i*(seg + 1):(i+1)*(seg+1)][x]))/(seg+1)
|
||||
else:
|
||||
all_df.loc[i,x] = sum(list(a[i*seg:(i+1)*seg][x]))/seg
|
||||
else:
|
||||
for x in a.columns:
|
||||
if x not in ['Frames', 'frame']:
|
||||
all_df[x] = a[x]
|
||||
all_df[x] = a[x]
|
||||
elif len(m) == min_len:
|
||||
all_df = m.copy()
|
||||
seg = int(len(f)/(max(len(m),1)))
|
||||
reminder = len(f)%(max(len(m),1))
|
||||
for i, row in all_df.iterrows():
|
||||
for x in f.columns:
|
||||
if x not in ['Frames', 'frame']:
|
||||
if i <reminder:
|
||||
all_df.loc[i,x] = sum(list(f[i*(seg + 1):(i+1)*(seg+1)][x]))/(seg+1)
|
||||
else:
|
||||
all_df.loc[i,x] = sum(list(f[i*seg:(i+1)*seg][x]))/seg
|
||||
if i <reminder:
|
||||
all_df.loc[i,x] = sum(list(f[i*(seg + 1):(i+1)*(seg+1)][x]))/(seg+1)
|
||||
else:
|
||||
all_df.loc[i,x] = sum(list(f[i*seg:(i+1)*seg][x]))/seg
|
||||
if len(a) > len(m):
|
||||
seg = int(len(a)/(max(len(m),1)))
|
||||
reminder = len(a)%(max(len(m),1))
|
||||
for i, row in all_df.iterrows():
|
||||
for x in a.columns:
|
||||
if x not in ['Frames', 'frame']:
|
||||
if i <reminder:
|
||||
all_df.loc[i,x] = sum(list(a[i*(seg + 1):(i+1)*(seg+1)][x]))/(seg+1)
|
||||
else:
|
||||
all_df.loc[i,x] = sum(list(a[i*seg:(i+1)*seg][x]))/seg
|
||||
if i <reminder:
|
||||
all_df.loc[i,x] = sum(list(a[i*(seg + 1):(i+1)*(seg+1)][x]))/(seg+1)
|
||||
else:
|
||||
all_df.loc[i,x] = sum(list(a[i*seg:(i+1)*seg][x]))/seg
|
||||
else:
|
||||
for x in a.columns:
|
||||
if x not in ['Frames', 'frame']:
|
||||
all_df[x] = a[x]
|
||||
all_df[x] = a[x]
|
||||
else:
|
||||
all_df = a.copy()
|
||||
seg = int(len(f)/(max(len(a),1)))
|
||||
reminder = len(f)%(max(len(a),1))
|
||||
for i, row in all_df.iterrows():
|
||||
for x in f.columns:
|
||||
if x not in ['Frames', 'frame']:
|
||||
if i <reminder:
|
||||
all_df.loc[i,x] = sum(list(f[i*(seg + 1):(i+1)*(seg+1)][x]))/(seg+1)
|
||||
else:
|
||||
all_df.loc[i,x] = sum(list(f[i*seg:(i+1)*seg][x]))/seg
|
||||
if i <reminder:
|
||||
all_df.loc[i,x] = sum(list(f[i*(seg + 1):(i+1)*(seg+1)][x]))/(seg+1)
|
||||
else:
|
||||
all_df.loc[i,x] = sum(list(f[i*seg:(i+1)*seg][x]))/seg
|
||||
seg = int(len(m)/(max(len(a),1)))
|
||||
reminder = len(m)%(max(len(a),1))
|
||||
for i, row in all_df.iterrows():
|
||||
for x in m.columns:
|
||||
if x not in ['Frames', 'frame']:
|
||||
if i <reminder:
|
||||
all_df.loc[i,x] = sum(list(m[i*(seg + 1):(i+1)*(seg+1)][x]))/(seg+1)
|
||||
else:
|
||||
all_df.loc[i,x] = sum(list(m[i*seg:(i+1)*seg][x]))/seg
|
||||
if i <reminder:
|
||||
all_df.loc[i,x] = sum(list(m[i*(seg + 1):(i+1)*(seg+1)][x]))/(seg+1)
|
||||
else:
|
||||
all_df.loc[i,x] = sum(list(m[i*seg:(i+1)*seg][x]))/seg
|
||||
|
||||
return all_df.fillna(0)
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user