Skip to content

Commit f57b6ca

Browse files
committed
Remove visualizations from GitHub Pages HTML report
- Remove Plotly.js charts and all related code - Keep tabbed interface with data tables and explanatory text - Simplify script.js to tab switching only - Clean up CSS by removing chart-specific styles
1 parent d4485c6 commit f57b6ca

File tree

5 files changed

+50
-377
lines changed

5 files changed

+50
-377
lines changed

Graph Analysis/unified_analysis.py

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,6 @@ def write_html_report(
366366
<meta name="viewport" content="width=device-width, initial-scale=1.0">
367367
<title>Unified Graph Analysis Report</title>
368368
<link rel="stylesheet" href="style.css">
369-
<script src="https://cdn.plot.ly/plotly-2.26.0.min.js"></script>
370369
</head>
371370
<body>
372371
<div class="container">
@@ -390,7 +389,6 @@ def write_html_report(
390389
<div id="summary" class="tab-pane active">
391390
<h2>Summary</h2>
392391
<p class="explanation">These are high-level counts of nodes/edges for each graph constructed during analysis.</p>
393-
<div id="summary-chart"></div>
394392
<ul class="summary-list">
395393
""")
396394
for k, v in summary.items():
@@ -405,7 +403,6 @@ def write_html_report(
405403
406404
<h3>Top Nodes by Degree</h3>
407405
<p class="explanation">These are the people connected to the most unique others across meetings.</p>
408-
<div id="coattendance-top-chart"></div>
409406
<table>
410407
<thead>
411408
<tr><th>Rank</th><th>Node</th><th>Degree</th></tr>
@@ -420,7 +417,6 @@ def write_html_report(
420417
421418
<h3>Degree Distribution</h3>
422419
<p class="explanation">How many people fall into each degree (number of unique co-attendees) bucket.</p>
423-
<div id="coattendance-dist-chart"></div>
424420
<table>
425421
<thead>
426422
<tr><th>Degree</th><th>Count of Nodes</th></tr>
@@ -440,7 +436,6 @@ def write_html_report(
440436
441437
<h3>Top Fields by Degree</h3>
442438
<p class="explanation">These fields co-occur with the largest variety of other fields.</p>
443-
<div id="field-degree-top-chart"></div>
444439
<table>
445440
<thead>
446441
<tr><th>Rank</th><th>Field</th><th>Degree</th></tr>
@@ -455,7 +450,6 @@ def write_html_report(
455450
456451
<h3>Degree Distribution</h3>
457452
<p class="explanation">How many fields have each degree (number of distinct co-occurring fields).</p>
458-
<div id="field-degree-dist-chart"></div>
459453
<table>
460454
<thead>
461455
<tr><th>Degree</th><th>Count of Fields</th></tr>
@@ -489,7 +483,6 @@ def write_html_report(
489483
490484
<h3>Most Common Parent Paths</h3>
491485
<p class="explanation">Parents that appear most often, suggesting common structural hubs.</p>
492-
<div id="path-structure-chart"></div>
493486
<table>
494487
<thead>
495488
<tr><th>Rank</th><th>Parent Path</th><th>Count</th></tr>
@@ -507,7 +500,6 @@ def write_html_report(
507500
<h2>Field Centrality (Co-occurrence)</h2>
508501
<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>
509502
510-
<div id="centrality-chart"></div>
511503
<table>
512504
<thead>
513505
<tr><th>Rank</th><th>Field</th><th>Degree</th><th>Betweenness</th><th>Closeness</th><th>Eigenvector</th></tr>
@@ -540,7 +532,6 @@ def write_html_report(
540532
541533
<h3>Top Nodes by Clustering Coefficient</h3>
542534
<p class="explanation">Fields whose immediate neighborhoods are most tightly interlinked.</p>
543-
<div id="clustering-chart"></div>
544535
<table>
545536
<thead>
546537
<tr><th>Rank</th><th>Field</th><th>Clustering</th></tr>
@@ -558,7 +549,6 @@ def write_html_report(
558549
<h2>Connected Components (Field Co-occurrence Graph)</h2>
559550
<p class="explanation">Components are groups of fields that are all reachable from each other; multiple components suggest separate substructures.</p>
560551
561-
<div id="components-chart"></div>
562552
<ul class="summary-list">
563553
<li><strong>Number of Components:</strong> """ + str(components['component_count']) + """</li>
564554
<li><strong>Component Sizes (top 10):</strong> """ + str(components['component_sizes'][:10]) + """</li>
@@ -574,29 +564,6 @@ def write_html_report(
574564
</div>
575565
</div>
576566
577-
<script type="text/javascript">
578-
// Embedded chart data
579-
const chartData = {
580-
summary: """ + json.dumps({k: v for k, v in summary.items()}) + """,
581-
coattendanceTop: """ + json.dumps([{"node": _truncate_label(node, 80), "degree": deg} for node, deg in attend_top], ensure_ascii=False) + """,
582-
coattendanceDist: """ + json.dumps([{"degree": d, "count": c} for d, c in attend_dist]) + """,
583-
fieldDegreeTop: """ + json.dumps([{"field": _truncate_label(node, 80), "degree": deg} for node, deg in field_top], ensure_ascii=False) + """,
584-
fieldDegreeDist: """ + json.dumps([{"degree": d, "count": c} for d, c in field_dist]) + """,
585-
pathStructure: """ + json.dumps([{"parent": parent, "count": cnt} for parent, cnt in parent_top], ensure_ascii=False) + """,
586-
centrality: """ + json.dumps([{
587-
"field": node,
588-
"degree": round(centrality["degree"].get(node, 0), 3),
589-
"betweenness": round(centrality["betweenness"].get(node, 0), 3),
590-
"closeness": round(centrality["closeness"].get(node, 0), 3),
591-
"eigenvector": round(centrality["eigenvector"].get(node, 0), 3)
592-
} for node in sorted(centrality["degree"].keys(), key=lambda x: centrality["degree"][x], reverse=True)[:10]], ensure_ascii=False) + """,
593-
clustering: """ + json.dumps([{"field": node, "clustering": round(val, 3)} for node, val in top_clust_nodes], ensure_ascii=False) + """,
594-
components: """ + json.dumps({
595-
"count": components['component_count'],
596-
"sizes": components['component_sizes'][:10]
597-
}) + """
598-
};
599-
</script>
600567
<script src="script.js"></script>
601568
</body>
602569
</html>

0 commit comments

Comments
 (0)