Skip to content

Commit 0e2a6c1

Browse files
committed
synthetic data reports in accordions en volgorde configureerbaar via python
1 parent 35b7d72 commit 0e2a6c1

File tree

6 files changed

+239
-92
lines changed

6 files changed

+239
-92
lines changed

src/assets/synthetic-data.tsx

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,24 @@ def run():
238238
# combined_data_encoded = pd.concat((df_encoded.assign(realOrSynthetic='real_encoded'), synth_df.assign(realOrSynthetic='synthetic')), keys=['real_encoded','synthetic'], names=['Data'])
239239
240240
# setResult(json.dumps({'type': 'distribution', 'real': real_data.to_json(orient="records"), 'synthetic': synthetic_data.to_json(orient="records"), 'dataTypes': json.dumps(dtypes_dict), 'combined_data' : combined_data.to_json(orient="records")}))
241-
setResult(json.dumps({'type': 'distribution', 'real': cloned_real_data.to_json(orient="records"), 'synthetic': synth_df_decoded.to_json(orient="records"), 'dataTypes': json.dumps(dtypes_dict), 'combined_data' : combined_data.to_json(orient="records")}))
241+
setResult(json.dumps({
242+
'type': 'distribution',
243+
'real': cloned_real_data.to_json(orient="records"),
244+
'synthetic': synth_df_decoded.to_json(orient="records"),
245+
'dataTypes': json.dumps(dtypes_dict),
246+
'combined_data' : combined_data.to_json(orient="records"),
247+
'realCorrelations': real_data.corr().to_json(orient="records"),
248+
'syntheticCorrelations': synthetic_data.corr().to_json(orient="records"),
249+
'reports' : [
250+
'univariate', 'distribution', 'correlation'
251+
]
252+
}))
242253
243-
setResult(json.dumps({'type': 'heatmap', 'real': real_data.corr().to_json(orient="records"), 'synthetic': synthetic_data.corr().to_json(orient="records")}))
254+
# setResult(json.dumps({
255+
# 'type': 'heatmap',
256+
# 'real': real_data.corr().to_json(orient="records"),
257+
# 'synthetic': synthetic_data.corr().to_json(orient="records")
258+
# }))
244259
245260
return
246261

0 commit comments

Comments
 (0)