Skip to content

Commit 0d961ef

Browse files
committed
Move review forms to bottom of each analysis tab
Reposition review forms from top to bottom of all 6 analysis tabs. Users now see analysis results first, then provide feedback at the end. Improves UX by showing content before asking for feedback.
1 parent d8d0cd0 commit 0d961ef

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Graph Analysis/unified_analysis.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,6 @@ def write_html_report(
453453
<!-- Co-attendance Degree Tab -->
454454
<div id="coattendance" class="tab-pane">
455455
<h2>Degree (Co-attendance) Analysis</h2>
456-
""" + _review_form("coattendance") + """
457456
<p class="explanation">People are connected if they attend the same meeting; a person's degree is how many unique people they co-attended with.</p>
458457
459458
<h3>Interactive Network Visualization</h3>
@@ -490,12 +489,12 @@ def write_html_report(
490489
f.write(f" <tr><td>{d}</td><td>{c}</td></tr>\n")
491490
f.write(""" </tbody>
492491
</table>
492+
""" + _review_form("coattendance") + """
493493
</div>
494494
495495
<!-- Field Degree Tab -->
496496
<div id="field-degree" class="tab-pane">
497497
<h2>JSON Field Degree Analysis</h2>
498-
""" + _review_form("field-degree") + """
499498
<p class="explanation">Fields are connected when they appear together inside the same JSON object; a field's degree is the number of distinct fields it co-occurs with.</p>
500499
501500
<h3>Top Fields by Degree</h3>
@@ -524,12 +523,12 @@ def write_html_report(
524523
f.write(f" <tr><td>{d}</td><td>{c}</td></tr>\n")
525524
f.write(""" </tbody>
526525
</table>
526+
""" + _review_form("field-degree") + """
527527
</div>
528528
529529
<!-- Path Structure Tab -->
530530
<div id="path-structure" class="tab-pane">
531531
<h2>JSON Path Structure Analysis</h2>
532-
""" + _review_form("path-structure") + """
533532
<p class="explanation">Each JSON path represents a unique nested route (keys/array indices); depth shows how deeply information is nested.</p>
534533
535534
<ul class="summary-list">
@@ -558,12 +557,12 @@ def write_html_report(
558557
f.write(f" <tr><td>{i}</td><td><code>{parent}</code></td><td>{cnt}</td></tr>\n")
559558
f.write(""" </tbody>
560559
</table>
560+
""" + _review_form("path-structure") + """
561561
</div>
562562
563563
<!-- Centrality Tab -->
564564
<div id="centrality" class="tab-pane">
565565
<h2>Field Centrality (Co-occurrence)</h2>
566-
""" + _review_form("centrality") + """
567566
<p class="explanation">Centrality scores highlight fields that are well-connected (degree), act as bridges (betweenness), are close to others (closeness), or connect to other influential fields (eigenvector).</p>
568567
569568
<table>
@@ -584,12 +583,12 @@ def write_html_report(
584583
)
585584
f.write(""" </tbody>
586585
</table>
586+
""" + _review_form("centrality") + """
587587
</div>
588588
589589
<!-- Clustering Tab -->
590590
<div id="clustering" class="tab-pane">
591591
<h2>Clustering (Field Co-occurrence Graph)</h2>
592-
""" + _review_form("clustering") + """
593592
<p class="explanation">Clustering measures how tightly a field's neighbors are connected to each other (higher means more triads).</p>
594593
595594
<p><strong>Average Clustering Coefficient:</strong> """)
@@ -609,12 +608,12 @@ def write_html_report(
609608
f.write(f" <tr><td>{i}</td><td>{node}</td><td>{val:.3f}</td></tr>\n")
610609
f.write(""" </tbody>
611610
</table>
611+
""" + _review_form("clustering") + """
612612
</div>
613613
614614
<!-- Connected Components Tab -->
615615
<div id="components" class="tab-pane">
616616
<h2>Connected Components (Field Co-occurrence Graph)</h2>
617-
""" + _review_form("components") + """
618617
<p class="explanation">Components are groups of fields that are all reachable from each other; multiple components suggest separate substructures.</p>
619618
620619
<ul class="summary-list">
@@ -628,6 +627,7 @@ def write_html_report(
628627
for n in components["largest_component_sample"][:10]:
629628
f.write(f" <li>{n}</li>\n")
630629
f.write(""" </ul>
630+
""" + _review_form("components") + """
631631
</div>
632632
633633
<!-- Audit Tab -->

0 commit comments

Comments
 (0)