Skip to content

Commit 136a90b

Browse files
committed
ui text 3 and 4
1 parent b59b447 commit 136a90b

File tree

3 files changed

+88
-51
lines changed

3 files changed

+88
-51
lines changed

src/components/DistributionReport.tsx

Lines changed: 83 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,20 @@ export const DistributionReport = (
391391
title={t(
392392
'syntheticData.bivariateDistributionSyntheticData'
393393
)}
394-
content={<div>{charts}</div>}
394+
content={
395+
<div>
396+
<Markdown className="py-4 markdown">
397+
{t(
398+
'syntheticData.bivariateText',
399+
{
400+
samples:
401+
syntheticData.length,
402+
}
403+
)}
404+
</Markdown>
405+
{charts}
406+
</div>
407+
}
395408
/>
396409
</div>
397410
);
@@ -440,55 +453,76 @@ export const DistributionReport = (
440453
title={t(
441454
'syntheticData.univariateDistributionSyntheticData'
442455
)}
443-
content={Object.keys(
444-
realData[0]
445-
).map(
446-
(
447-
columnName: string,
448-
columnIndex: number
449-
) => {
450-
const realDataColumn =
451-
realData.map(
452-
(
453-
row: Record<
454-
string,
455-
number
456-
>
457-
) => row[columnName]
458-
);
459-
const syntheticDataColumn =
460-
syntheticData.map(
461-
(
462-
row: Record<
463-
string,
464-
number
456+
content={
457+
<>
458+
<Markdown className="py-4 markdown">
459+
{t(
460+
'syntheticData.univariateText',
461+
{
462+
samples:
463+
syntheticData.length,
464+
}
465+
)}
466+
</Markdown>
467+
{Object.keys(
468+
realData[0]
469+
).map(
470+
(
471+
columnName: string,
472+
columnIndex: number
473+
) => {
474+
const realDataColumn =
475+
realData.map(
476+
(
477+
row: Record<
478+
string,
479+
number
480+
>
481+
) =>
482+
row[
483+
columnName
484+
]
485+
);
486+
const syntheticDataColumn =
487+
syntheticData.map(
488+
(
489+
row: Record<
490+
string,
491+
number
492+
>
493+
) =>
494+
row[
495+
columnName
496+
]
497+
);
498+
return (
499+
<ErrorBoundary
500+
key={
501+
columnIndex
502+
}
465503
>
466-
) => row[columnName]
467-
);
468-
return (
469-
<ErrorBoundary
470-
key={columnIndex}
471-
>
472-
<DistributionBarChart
473-
dataType={
474-
dataTypes[
475-
columnName
476-
]
477-
}
478-
realData={
479-
realDataColumn
480-
}
481-
syntheticData={
482-
syntheticDataColumn
483-
}
484-
column={
485-
columnName
486-
}
487-
/>
488-
</ErrorBoundary>
489-
);
490-
}
491-
)}
504+
<DistributionBarChart
505+
dataType={
506+
dataTypes[
507+
columnName
508+
]
509+
}
510+
realData={
511+
realDataColumn
512+
}
513+
syntheticData={
514+
syntheticDataColumn
515+
}
516+
column={
517+
columnName
518+
}
519+
/>
520+
</ErrorBoundary>
521+
);
522+
}
523+
)}
524+
</>
525+
}
492526
></Accordion>
493527
</div>
494528
)}

src/locales/en.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@
107107
"evaluationOfGeneratedDataTitle": "3. Evaluation of generated data",
108108
"outputDataTitle": "4. Generated synthetic data",
109109
"diagnosticsTitle": "Diagnostic Results",
110-
"correlationDifference": "Correlation difference: {{correlationDifference}}"
110+
"correlationDifference": "Correlation difference: {{correlationDifference}}",
111+
"univariateText": "{{samples}} synthetic data points are generated using CART. The figures below display the differences in value frequency for each variable. The synthetic data is of high quality when all bars are of equal height.",
112+
"bivariateText": "The figures below display the differences in value frequency for a combination of variables. For comparing two categorical variables, bar charts are plotted. For comparing a numerical and a categorical variables, a so called [violin plot](https://en.wikipedia.org/wiki/Violin_plot) is shown. For comparing two numercial variables, a [LOESS plot](https://en.wikipedia.org/wiki/Local_regression) is created. For all plots holds: the synthetic data is of high quality when the shape of the distributions in the synthetic data equal the distributions in the real data."
111113
},
112114

113115
"biasAnalysis": {

src/locales/nl.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@
8484
"runGeneration": "Start synthetische data generatie",
8585
"analyzing": "Analyseren...",
8686
"initializing": "Initialiseren..."
87-
}
87+
},
88+
"univariateText": "{{samples}} synthetic data punten zijn gegeneert met CART. De grafieken tonen de verschillen in waarde frequentie voor elle variabele. De synthetische data is van hoge kwaliteit als alle balken van gelijke hoogte zijn."
8889
},
8990
"demoCard": {
9091
"title": "Probeer het uit!",

0 commit comments

Comments
 (0)