@wentorai/research-plugins 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +204 -0
- package/curated/analysis/README.md +64 -0
- package/curated/domains/README.md +104 -0
- package/curated/literature/README.md +53 -0
- package/curated/research/README.md +62 -0
- package/curated/tools/README.md +87 -0
- package/curated/writing/README.md +61 -0
- package/index.ts +39 -0
- package/mcp-configs/academic-db/ChatSpatial.json +17 -0
- package/mcp-configs/academic-db/academia-mcp.json +17 -0
- package/mcp-configs/academic-db/academic-paper-explorer.json +17 -0
- package/mcp-configs/academic-db/academic-search-mcp-server.json +17 -0
- package/mcp-configs/academic-db/agentinterviews-mcp.json +17 -0
- package/mcp-configs/academic-db/all-in-mcp.json +17 -0
- package/mcp-configs/academic-db/apple-health-mcp.json +17 -0
- package/mcp-configs/academic-db/arxiv-latex-mcp.json +17 -0
- package/mcp-configs/academic-db/arxiv-mcp-server.json +17 -0
- package/mcp-configs/academic-db/bgpt-mcp.json +17 -0
- package/mcp-configs/academic-db/biomcp.json +17 -0
- package/mcp-configs/academic-db/biothings-mcp.json +17 -0
- package/mcp-configs/academic-db/catalysishub-mcp-server.json +17 -0
- package/mcp-configs/academic-db/clinicaltrialsgov-mcp-server.json +17 -0
- package/mcp-configs/academic-db/deep-research-mcp.json +17 -0
- package/mcp-configs/academic-db/dicom-mcp.json +17 -0
- package/mcp-configs/academic-db/enrichr-mcp-server.json +17 -0
- package/mcp-configs/academic-db/fec-mcp-server.json +17 -0
- package/mcp-configs/academic-db/fhir-mcp-server-themomentum.json +17 -0
- package/mcp-configs/academic-db/fhir-mcp.json +19 -0
- package/mcp-configs/academic-db/gget-mcp.json +17 -0
- package/mcp-configs/academic-db/google-researcher-mcp.json +17 -0
- package/mcp-configs/academic-db/idea-reality-mcp.json +17 -0
- package/mcp-configs/academic-db/legiscan-mcp.json +19 -0
- package/mcp-configs/academic-db/lex.json +17 -0
- package/mcp-configs/ai-platform/Adaptive-Graph-of-Thoughts-MCP-server.json +17 -0
- package/mcp-configs/ai-platform/ai-counsel.json +17 -0
- package/mcp-configs/ai-platform/atlas-mcp-server.json +17 -0
- package/mcp-configs/ai-platform/counsel-mcp.json +17 -0
- package/mcp-configs/ai-platform/cross-llm-mcp.json +17 -0
- package/mcp-configs/ai-platform/gptr-mcp.json +17 -0
- package/mcp-configs/browser/decipher-research-agent.json +17 -0
- package/mcp-configs/browser/deep-research.json +17 -0
- package/mcp-configs/browser/everything-claude-code.json +17 -0
- package/mcp-configs/browser/gpt-researcher.json +17 -0
- package/mcp-configs/browser/heurist-agent-framework.json +17 -0
- package/mcp-configs/data-platform/4everland-hosting-mcp.json +17 -0
- package/mcp-configs/data-platform/context-keeper.json +17 -0
- package/mcp-configs/data-platform/context7.json +19 -0
- package/mcp-configs/data-platform/contextstream-mcp.json +17 -0
- package/mcp-configs/data-platform/email-mcp.json +17 -0
- package/mcp-configs/note-knowledge/ApeRAG.json +17 -0
- package/mcp-configs/note-knowledge/In-Memoria.json +17 -0
- package/mcp-configs/note-knowledge/agent-memory.json +17 -0
- package/mcp-configs/note-knowledge/aimemo.json +17 -0
- package/mcp-configs/note-knowledge/biel-mcp.json +19 -0
- package/mcp-configs/note-knowledge/cognee.json +17 -0
- package/mcp-configs/note-knowledge/context-awesome.json +17 -0
- package/mcp-configs/note-knowledge/context-mcp.json +17 -0
- package/mcp-configs/note-knowledge/conversation-handoff-mcp.json +17 -0
- package/mcp-configs/note-knowledge/cortex.json +17 -0
- package/mcp-configs/note-knowledge/devrag.json +17 -0
- package/mcp-configs/note-knowledge/easy-obsidian-mcp.json +17 -0
- package/mcp-configs/note-knowledge/engram.json +17 -0
- package/mcp-configs/note-knowledge/gnosis-mcp.json +17 -0
- package/mcp-configs/note-knowledge/graphlit-mcp-server.json +19 -0
- package/mcp-configs/reference-mgr/arxiv-cli.json +17 -0
- package/mcp-configs/reference-mgr/arxiv-search-mcp.json +17 -0
- package/mcp-configs/reference-mgr/chiken.json +17 -0
- package/mcp-configs/reference-mgr/claude-scholar.json +17 -0
- package/mcp-configs/reference-mgr/devonthink-mcp.json +17 -0
- package/mcp-configs/registry.json +447 -0
- package/openclaw.plugin.json +21 -0
- package/package.json +61 -0
- package/skills/analysis/dataviz/color-accessibility-guide/SKILL.md +230 -0
- package/skills/analysis/dataviz/geospatial-viz-guide/SKILL.md +218 -0
- package/skills/analysis/dataviz/interactive-viz-guide/SKILL.md +287 -0
- package/skills/analysis/dataviz/network-visualization-guide/SKILL.md +195 -0
- package/skills/analysis/dataviz/publication-figures-guide/SKILL.md +238 -0
- package/skills/analysis/dataviz/python-dataviz-guide/SKILL.md +195 -0
- package/skills/analysis/econometrics/causal-inference-guide/SKILL.md +197 -0
- package/skills/analysis/econometrics/iv-regression-guide/SKILL.md +198 -0
- package/skills/analysis/econometrics/panel-data-guide/SKILL.md +274 -0
- package/skills/analysis/econometrics/robustness-checks/SKILL.md +250 -0
- package/skills/analysis/econometrics/stata-regression/SKILL.md +117 -0
- package/skills/analysis/econometrics/time-series-guide/SKILL.md +235 -0
- package/skills/analysis/statistics/bayesian-statistics-guide/SKILL.md +221 -0
- package/skills/analysis/statistics/hypothesis-testing-guide/SKILL.md +210 -0
- package/skills/analysis/statistics/meta-analysis-guide/SKILL.md +206 -0
- package/skills/analysis/statistics/nonparametric-tests-guide/SKILL.md +221 -0
- package/skills/analysis/statistics/power-analysis-guide/SKILL.md +240 -0
- package/skills/analysis/statistics/sem-guide/SKILL.md +231 -0
- package/skills/analysis/statistics/survival-analysis-guide/SKILL.md +195 -0
- package/skills/analysis/wrangling/missing-data-handling/SKILL.md +224 -0
- package/skills/analysis/wrangling/pandas-data-wrangling/SKILL.md +242 -0
- package/skills/analysis/wrangling/questionnaire-design-guide/SKILL.md +234 -0
- package/skills/analysis/wrangling/text-mining-guide/SKILL.md +225 -0
- package/skills/domains/ai-ml/computer-vision-guide/SKILL.md +213 -0
- package/skills/domains/ai-ml/deep-learning-papers-guide/SKILL.md +200 -0
- package/skills/domains/ai-ml/llm-evaluation-guide/SKILL.md +194 -0
- package/skills/domains/ai-ml/prompt-engineering-research/SKILL.md +233 -0
- package/skills/domains/ai-ml/reinforcement-learning-guide/SKILL.md +254 -0
- package/skills/domains/ai-ml/transformer-architecture-guide/SKILL.md +233 -0
- package/skills/domains/biomedical/clinical-research-guide/SKILL.md +232 -0
- package/skills/domains/biomedical/clinicaltrials-api/SKILL.md +177 -0
- package/skills/domains/biomedical/epidemiology-guide/SKILL.md +200 -0
- package/skills/domains/biomedical/genomics-analysis-guide/SKILL.md +270 -0
- package/skills/domains/business/market-analysis-guide/SKILL.md +112 -0
- package/skills/domains/business/strategic-management-guide/SKILL.md +154 -0
- package/skills/domains/chemistry/computational-chemistry-guide/SKILL.md +266 -0
- package/skills/domains/chemistry/retrosynthesis-guide/SKILL.md +215 -0
- package/skills/domains/cs/algorithms-complexity-guide/SKILL.md +194 -0
- package/skills/domains/cs/dblp-api/SKILL.md +129 -0
- package/skills/domains/cs/software-engineering-research/SKILL.md +218 -0
- package/skills/domains/ecology/biodiversity-data-guide/SKILL.md +296 -0
- package/skills/domains/ecology/conservation-biology-guide/SKILL.md +198 -0
- package/skills/domains/ecology/gbif-api/SKILL.md +158 -0
- package/skills/domains/ecology/inaturalist-api/SKILL.md +173 -0
- package/skills/domains/economics/behavioral-economics-guide/SKILL.md +239 -0
- package/skills/domains/economics/development-economics-guide/SKILL.md +181 -0
- package/skills/domains/economics/fred-api/SKILL.md +189 -0
- package/skills/domains/education/curriculum-design-guide/SKILL.md +144 -0
- package/skills/domains/education/learning-science-guide/SKILL.md +150 -0
- package/skills/domains/finance/financial-data-analysis/SKILL.md +152 -0
- package/skills/domains/finance/quantitative-finance-guide/SKILL.md +151 -0
- package/skills/domains/geoscience/climate-science-guide/SKILL.md +158 -0
- package/skills/domains/geoscience/gis-remote-sensing-guide/SKILL.md +129 -0
- package/skills/domains/humanities/digital-humanities-guide/SKILL.md +181 -0
- package/skills/domains/humanities/philosophy-research-guide/SKILL.md +148 -0
- package/skills/domains/law/courtlistener-api/SKILL.md +213 -0
- package/skills/domains/law/legal-research-guide/SKILL.md +250 -0
- package/skills/domains/math/linear-algebra-applications/SKILL.md +227 -0
- package/skills/domains/math/numerical-methods-guide/SKILL.md +236 -0
- package/skills/domains/math/oeis-api/SKILL.md +158 -0
- package/skills/domains/pharma/clinical-pharmacology-guide/SKILL.md +165 -0
- package/skills/domains/pharma/drug-development-guide/SKILL.md +177 -0
- package/skills/domains/physics/computational-physics-guide/SKILL.md +300 -0
- package/skills/domains/physics/nasa-ads-api/SKILL.md +150 -0
- package/skills/domains/physics/quantum-computing-guide/SKILL.md +234 -0
- package/skills/domains/social-science/social-research-methods/SKILL.md +194 -0
- package/skills/domains/social-science/survey-research-guide/SKILL.md +182 -0
- package/skills/literature/discovery/citation-alert-guide/SKILL.md +154 -0
- package/skills/literature/discovery/conference-proceedings-guide/SKILL.md +142 -0
- package/skills/literature/discovery/literature-mapping-guide/SKILL.md +175 -0
- package/skills/literature/discovery/paper-tracking-guide/SKILL.md +211 -0
- package/skills/literature/discovery/rss-paper-feeds/SKILL.md +214 -0
- package/skills/literature/discovery/semantic-scholar-recs-guide/SKILL.md +164 -0
- package/skills/literature/fulltext/doaj-api/SKILL.md +120 -0
- package/skills/literature/fulltext/interlibrary-loan-guide/SKILL.md +163 -0
- package/skills/literature/fulltext/open-access-guide/SKILL.md +183 -0
- package/skills/literature/fulltext/pmc-oai-api/SKILL.md +184 -0
- package/skills/literature/fulltext/preprint-servers-guide/SKILL.md +128 -0
- package/skills/literature/fulltext/repository-harvesting-guide/SKILL.md +207 -0
- package/skills/literature/fulltext/unpaywall-api/SKILL.md +113 -0
- package/skills/literature/metadata/altmetrics-guide/SKILL.md +132 -0
- package/skills/literature/metadata/citation-network-guide/SKILL.md +236 -0
- package/skills/literature/metadata/crossref-api/SKILL.md +133 -0
- package/skills/literature/metadata/datacite-api/SKILL.md +126 -0
- package/skills/literature/metadata/doi-resolution-guide/SKILL.md +168 -0
- package/skills/literature/metadata/h-index-guide/SKILL.md +183 -0
- package/skills/literature/metadata/journal-metrics-guide/SKILL.md +188 -0
- package/skills/literature/metadata/opencitations-api/SKILL.md +128 -0
- package/skills/literature/metadata/orcid-api/SKILL.md +136 -0
- package/skills/literature/metadata/orcid-integration-guide/SKILL.md +178 -0
- package/skills/literature/search/arxiv-api/SKILL.md +95 -0
- package/skills/literature/search/biorxiv-api/SKILL.md +123 -0
- package/skills/literature/search/boolean-search-guide/SKILL.md +199 -0
- package/skills/literature/search/citation-chaining-guide/SKILL.md +148 -0
- package/skills/literature/search/database-comparison-guide/SKILL.md +100 -0
- package/skills/literature/search/europe-pmc-api/SKILL.md +120 -0
- package/skills/literature/search/google-scholar-guide/SKILL.md +182 -0
- package/skills/literature/search/mesh-terms-guide/SKILL.md +164 -0
- package/skills/literature/search/openalex-api/SKILL.md +134 -0
- package/skills/literature/search/pubmed-api/SKILL.md +130 -0
- package/skills/literature/search/scientify-literature-survey/SKILL.md +203 -0
- package/skills/literature/search/semantic-scholar-api/SKILL.md +134 -0
- package/skills/literature/search/systematic-search-strategy/SKILL.md +214 -0
- package/skills/research/automation/ai-scientist-guide/SKILL.md +228 -0
- package/skills/research/automation/data-collection-automation/SKILL.md +248 -0
- package/skills/research/automation/research-workflow-automation/SKILL.md +266 -0
- package/skills/research/deep-research/meta-synthesis-guide/SKILL.md +174 -0
- package/skills/research/deep-research/research-cog/SKILL.md +153 -0
- package/skills/research/deep-research/scoping-review-guide/SKILL.md +217 -0
- package/skills/research/deep-research/systematic-review-guide/SKILL.md +250 -0
- package/skills/research/funding/figshare-api/SKILL.md +163 -0
- package/skills/research/funding/grant-writing-guide/SKILL.md +233 -0
- package/skills/research/funding/nsf-grant-guide/SKILL.md +206 -0
- package/skills/research/funding/open-science-guide/SKILL.md +255 -0
- package/skills/research/funding/zenodo-api/SKILL.md +174 -0
- package/skills/research/methodology/action-research-guide/SKILL.md +201 -0
- package/skills/research/methodology/experimental-design-guide/SKILL.md +236 -0
- package/skills/research/methodology/grad-school-guide/SKILL.md +182 -0
- package/skills/research/methodology/grounded-theory-guide/SKILL.md +171 -0
- package/skills/research/methodology/mixed-methods-guide/SKILL.md +208 -0
- package/skills/research/methodology/qualitative-research-guide/SKILL.md +234 -0
- package/skills/research/methodology/scientify-idea-generation/SKILL.md +222 -0
- package/skills/research/paper-review/paper-reading-assistant/SKILL.md +266 -0
- package/skills/research/paper-review/peer-review-guide/SKILL.md +227 -0
- package/skills/research/paper-review/rebuttal-writing-guide/SKILL.md +185 -0
- package/skills/research/paper-review/scientify-write-review-paper/SKILL.md +209 -0
- package/skills/tools/code-exec/jupyter-notebook-guide/SKILL.md +178 -0
- package/skills/tools/code-exec/python-reproducibility-guide/SKILL.md +341 -0
- package/skills/tools/code-exec/r-reproducibility-guide/SKILL.md +236 -0
- package/skills/tools/code-exec/sandbox-execution-guide/SKILL.md +221 -0
- package/skills/tools/diagram/mermaid-diagram-guide/SKILL.md +269 -0
- package/skills/tools/diagram/plantuml-guide/SKILL.md +397 -0
- package/skills/tools/diagram/scientific-illustration-guide/SKILL.md +225 -0
- package/skills/tools/document/anystyle-api/SKILL.md +199 -0
- package/skills/tools/document/grobid-pdf-parsing/SKILL.md +294 -0
- package/skills/tools/document/markdown-academic-guide/SKILL.md +217 -0
- package/skills/tools/document/pdf-extraction-guide/SKILL.md +321 -0
- package/skills/tools/knowledge-graph/knowledge-graph-construction/SKILL.md +306 -0
- package/skills/tools/knowledge-graph/ontology-design-guide/SKILL.md +214 -0
- package/skills/tools/knowledge-graph/rag-methodology-guide/SKILL.md +325 -0
- package/skills/tools/ocr-translate/formula-recognition-guide/SKILL.md +367 -0
- package/skills/tools/ocr-translate/handwriting-recognition-guide/SKILL.md +211 -0
- package/skills/tools/ocr-translate/latex-ocr-guide/SKILL.md +204 -0
- package/skills/tools/ocr-translate/multilingual-research-guide/SKILL.md +234 -0
- package/skills/tools/scraping/academic-web-scraping/SKILL.md +326 -0
- package/skills/tools/scraping/api-data-collection-guide/SKILL.md +301 -0
- package/skills/tools/scraping/web-scraping-ethics-guide/SKILL.md +250 -0
- package/skills/writing/citation/bibtex-management-guide/SKILL.md +246 -0
- package/skills/writing/citation/citation-style-guide/SKILL.md +248 -0
- package/skills/writing/citation/reference-manager-comparison/SKILL.md +208 -0
- package/skills/writing/citation/zotero-api/SKILL.md +188 -0
- package/skills/writing/composition/abstract-writing-guide/SKILL.md +188 -0
- package/skills/writing/composition/discussion-writing-guide/SKILL.md +194 -0
- package/skills/writing/composition/introduction-writing-guide/SKILL.md +194 -0
- package/skills/writing/composition/literature-review-writing/SKILL.md +196 -0
- package/skills/writing/composition/methods-section-guide/SKILL.md +185 -0
- package/skills/writing/composition/response-to-reviewers/SKILL.md +215 -0
- package/skills/writing/composition/scientific-writing-guide/SKILL.md +152 -0
- package/skills/writing/latex/bibliography-management-guide/SKILL.md +206 -0
- package/skills/writing/latex/latex-drawing-guide/SKILL.md +234 -0
- package/skills/writing/latex/latex-ecosystem-guide/SKILL.md +240 -0
- package/skills/writing/latex/math-typesetting-guide/SKILL.md +231 -0
- package/skills/writing/latex/overleaf-collaboration-guide/SKILL.md +211 -0
- package/skills/writing/latex/tikz-diagrams-guide/SKILL.md +211 -0
- package/skills/writing/polish/academic-translation-guide/SKILL.md +175 -0
- package/skills/writing/polish/academic-writing-refiner/SKILL.md +143 -0
- package/skills/writing/polish/ai-writing-humanizer/SKILL.md +178 -0
- package/skills/writing/polish/grammar-checker-guide/SKILL.md +184 -0
- package/skills/writing/polish/plagiarism-detection-guide/SKILL.md +167 -0
- package/skills/writing/templates/beamer-presentation-guide/SKILL.md +263 -0
- package/skills/writing/templates/conference-paper-template/SKILL.md +219 -0
- package/skills/writing/templates/thesis-template-guide/SKILL.md +200 -0
- package/skills/writing/templates/thesis-writing-guide/SKILL.md +220 -0
- package/src/tools/arxiv.ts +131 -0
- package/src/tools/crossref.ts +112 -0
- package/src/tools/openalex.ts +174 -0
- package/src/tools/pubmed.ts +166 -0
- package/src/tools/semantic-scholar.ts +108 -0
- package/src/tools/unpaywall.ts +58 -0
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: interactive-viz-guide
|
|
3
|
+
description: "Interactive data visualization with Plotly, ECharts, and D3"
|
|
4
|
+
metadata:
|
|
5
|
+
openclaw:
|
|
6
|
+
emoji: "sparkle"
|
|
7
|
+
category: "analysis"
|
|
8
|
+
subcategory: "dataviz"
|
|
9
|
+
keywords: ["interactive visualization", "dynamic chart", "Plotly", "ECharts", "data visualization"]
|
|
10
|
+
source: "wentor-research-plugins"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Interactive Visualization Guide
|
|
14
|
+
|
|
15
|
+
Create interactive, publication-ready visualizations using Plotly, ECharts, Altair, and Bokeh for academic papers, presentations, and supplementary materials.
|
|
16
|
+
|
|
17
|
+
## When to Use Interactive Visualizations
|
|
18
|
+
|
|
19
|
+
| Scenario | Static | Interactive |
|
|
20
|
+
|----------|--------|-------------|
|
|
21
|
+
| Journal PDF figure | Preferred | Not supported |
|
|
22
|
+
| Supplementary materials | Optional | Excellent |
|
|
23
|
+
| Conference poster (digital) | Common | Increasingly popular |
|
|
24
|
+
| Presentation slides | Standard | Engaging |
|
|
25
|
+
| Online appendix / project website | Limited | Ideal |
|
|
26
|
+
| Exploratory data analysis | Quick | Detailed exploration |
|
|
27
|
+
|
|
28
|
+
## Plotly (Python)
|
|
29
|
+
|
|
30
|
+
Plotly produces interactive HTML charts with hover tooltips, zoom, pan, and export capabilities.
|
|
31
|
+
|
|
32
|
+
### Scatter Plot with Hover Details
|
|
33
|
+
|
|
34
|
+
```python
|
|
35
|
+
import plotly.express as px
|
|
36
|
+
import pandas as pd
|
|
37
|
+
|
|
38
|
+
# Example: visualize paper citations vs. year
|
|
39
|
+
df = pd.DataFrame({
|
|
40
|
+
"title": ["Paper A", "Paper B", "Paper C", "Paper D", "Paper E"],
|
|
41
|
+
"year": [2019, 2020, 2021, 2022, 2023],
|
|
42
|
+
"citations": [150, 320, 89, 450, 210],
|
|
43
|
+
"field": ["NLP", "CV", "NLP", "RL", "CV"],
|
|
44
|
+
"venue": ["ACL", "CVPR", "EMNLP", "NeurIPS", "ICCV"]
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
fig = px.scatter(
|
|
48
|
+
df, x="year", y="citations",
|
|
49
|
+
color="field", size="citations",
|
|
50
|
+
hover_data=["title", "venue"],
|
|
51
|
+
title="Citation Counts by Year and Field",
|
|
52
|
+
labels={"citations": "Citation Count", "year": "Publication Year"}
|
|
53
|
+
)
|
|
54
|
+
fig.update_layout(
|
|
55
|
+
template="plotly_white",
|
|
56
|
+
font=dict(size=14),
|
|
57
|
+
width=800, height=500
|
|
58
|
+
)
|
|
59
|
+
fig.write_html("citations_interactive.html")
|
|
60
|
+
fig.show()
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Grouped Bar Chart
|
|
64
|
+
|
|
65
|
+
```python
|
|
66
|
+
import plotly.graph_objects as go
|
|
67
|
+
|
|
68
|
+
methods = ["Baseline", "Method A", "Method B", "Ours"]
|
|
69
|
+
accuracy = [82.1, 85.3, 87.0, 89.4]
|
|
70
|
+
f1_score = [79.8, 83.1, 85.2, 87.9]
|
|
71
|
+
|
|
72
|
+
fig = go.Figure(data=[
|
|
73
|
+
go.Bar(name="Accuracy", x=methods, y=accuracy,
|
|
74
|
+
text=[f"{v}%" for v in accuracy], textposition="auto"),
|
|
75
|
+
go.Bar(name="F1 Score", x=methods, y=f1_score,
|
|
76
|
+
text=[f"{v}%" for v in f1_score], textposition="auto")
|
|
77
|
+
])
|
|
78
|
+
fig.update_layout(
|
|
79
|
+
barmode="group",
|
|
80
|
+
title="Model Performance Comparison",
|
|
81
|
+
yaxis_title="Score (%)",
|
|
82
|
+
yaxis_range=[70, 95],
|
|
83
|
+
template="plotly_white"
|
|
84
|
+
)
|
|
85
|
+
fig.write_html("comparison.html")
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Heatmap (Confusion Matrix)
|
|
89
|
+
|
|
90
|
+
```python
|
|
91
|
+
import plotly.figure_factory as ff
|
|
92
|
+
import numpy as np
|
|
93
|
+
|
|
94
|
+
z = [[85, 5, 3, 7],
|
|
95
|
+
[4, 90, 2, 4],
|
|
96
|
+
[6, 3, 88, 3],
|
|
97
|
+
[5, 2, 7, 86]]
|
|
98
|
+
labels = ["Class A", "Class B", "Class C", "Class D"]
|
|
99
|
+
|
|
100
|
+
fig = ff.create_annotated_heatmap(
|
|
101
|
+
z, x=labels, y=labels,
|
|
102
|
+
colorscale="Blues",
|
|
103
|
+
showscale=True
|
|
104
|
+
)
|
|
105
|
+
fig.update_layout(
|
|
106
|
+
title="Confusion Matrix",
|
|
107
|
+
xaxis_title="Predicted",
|
|
108
|
+
yaxis_title="Actual"
|
|
109
|
+
)
|
|
110
|
+
fig.write_html("confusion_matrix.html")
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Altair (Python - Declarative)
|
|
114
|
+
|
|
115
|
+
Altair uses Vega-Lite grammar for concise, declarative visualization.
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
import altair as alt
|
|
119
|
+
import pandas as pd
|
|
120
|
+
|
|
121
|
+
# Interactive scatter with selection
|
|
122
|
+
df = pd.DataFrame({
|
|
123
|
+
"x": range(100),
|
|
124
|
+
"y": [v**2 + 10 for v in range(100)],
|
|
125
|
+
"category": ["A" if i % 3 == 0 else "B" if i % 3 == 1 else "C" for i in range(100)]
|
|
126
|
+
})
|
|
127
|
+
|
|
128
|
+
selection = alt.selection_point(fields=["category"], bind="legend")
|
|
129
|
+
|
|
130
|
+
chart = alt.Chart(df).mark_circle(size=60).encode(
|
|
131
|
+
x="x:Q",
|
|
132
|
+
y="y:Q",
|
|
133
|
+
color="category:N",
|
|
134
|
+
opacity=alt.condition(selection, alt.value(1), alt.value(0.2)),
|
|
135
|
+
tooltip=["x", "y", "category"]
|
|
136
|
+
).add_params(
|
|
137
|
+
selection
|
|
138
|
+
).properties(
|
|
139
|
+
width=600, height=400,
|
|
140
|
+
title="Interactive Scatter with Legend Selection"
|
|
141
|
+
).interactive() # Enable zoom/pan
|
|
142
|
+
|
|
143
|
+
chart.save("altair_scatter.html")
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## ECharts (JavaScript)
|
|
147
|
+
|
|
148
|
+
Apache ECharts is a powerful JavaScript charting library ideal for web dashboards and complex visualizations.
|
|
149
|
+
|
|
150
|
+
```html
|
|
151
|
+
<!DOCTYPE html>
|
|
152
|
+
<html>
|
|
153
|
+
<head>
|
|
154
|
+
<script src="https://cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js"></script>
|
|
155
|
+
</head>
|
|
156
|
+
<body>
|
|
157
|
+
<div id="chart" style="width: 800px; height: 500px;"></div>
|
|
158
|
+
<script>
|
|
159
|
+
const chart = echarts.init(document.getElementById('chart'));
|
|
160
|
+
|
|
161
|
+
const option = {
|
|
162
|
+
title: { text: 'Research Output by Year', left: 'center' },
|
|
163
|
+
tooltip: {
|
|
164
|
+
trigger: 'axis',
|
|
165
|
+
axisPointer: { type: 'shadow' }
|
|
166
|
+
},
|
|
167
|
+
legend: { data: ['Papers', 'Citations'], top: 30 },
|
|
168
|
+
xAxis: {
|
|
169
|
+
type: 'category',
|
|
170
|
+
data: ['2019', '2020', '2021', '2022', '2023']
|
|
171
|
+
},
|
|
172
|
+
yAxis: [
|
|
173
|
+
{ type: 'value', name: 'Papers' },
|
|
174
|
+
{ type: 'value', name: 'Citations' }
|
|
175
|
+
],
|
|
176
|
+
series: [
|
|
177
|
+
{
|
|
178
|
+
name: 'Papers',
|
|
179
|
+
type: 'bar',
|
|
180
|
+
data: [12, 15, 18, 22, 28],
|
|
181
|
+
itemStyle: { color: '#3B82F6' }
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
name: 'Citations',
|
|
185
|
+
type: 'line',
|
|
186
|
+
yAxisIndex: 1,
|
|
187
|
+
data: [45, 120, 280, 450, 680],
|
|
188
|
+
itemStyle: { color: '#EF4444' },
|
|
189
|
+
smooth: true
|
|
190
|
+
}
|
|
191
|
+
],
|
|
192
|
+
dataZoom: [{ type: 'slider', start: 0, end: 100 }]
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
chart.setOption(option);
|
|
196
|
+
window.addEventListener('resize', () => chart.resize());
|
|
197
|
+
</script>
|
|
198
|
+
</body>
|
|
199
|
+
</html>
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## Network Visualization
|
|
203
|
+
|
|
204
|
+
### Plotly Network Graph
|
|
205
|
+
|
|
206
|
+
```python
|
|
207
|
+
import plotly.graph_objects as go
|
|
208
|
+
import networkx as nx
|
|
209
|
+
|
|
210
|
+
# Create a citation network
|
|
211
|
+
G = nx.karate_club_graph()
|
|
212
|
+
pos = nx.spring_layout(G, seed=42)
|
|
213
|
+
|
|
214
|
+
# Edge traces
|
|
215
|
+
edge_x, edge_y = [], []
|
|
216
|
+
for edge in G.edges():
|
|
217
|
+
x0, y0 = pos[edge[0]]
|
|
218
|
+
x1, y1 = pos[edge[1]]
|
|
219
|
+
edge_x.extend([x0, x1, None])
|
|
220
|
+
edge_y.extend([y0, y1, None])
|
|
221
|
+
|
|
222
|
+
edge_trace = go.Scatter(x=edge_x, y=edge_y, mode="lines",
|
|
223
|
+
line=dict(width=0.5, color="#888"), hoverinfo="none")
|
|
224
|
+
|
|
225
|
+
# Node traces
|
|
226
|
+
node_x = [pos[n][0] for n in G.nodes()]
|
|
227
|
+
node_y = [pos[n][1] for n in G.nodes()]
|
|
228
|
+
node_degree = [G.degree(n) for n in G.nodes()]
|
|
229
|
+
|
|
230
|
+
node_trace = go.Scatter(
|
|
231
|
+
x=node_x, y=node_y, mode="markers",
|
|
232
|
+
marker=dict(size=[d*3 for d in node_degree], color=node_degree,
|
|
233
|
+
colorscale="Viridis", showscale=True,
|
|
234
|
+
colorbar=dict(title="Connections")),
|
|
235
|
+
text=[f"Node {n}: {G.degree(n)} connections" for n in G.nodes()],
|
|
236
|
+
hoverinfo="text"
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
fig = go.Figure(data=[edge_trace, node_trace],
|
|
240
|
+
layout=go.Layout(title="Citation Network",
|
|
241
|
+
showlegend=False,
|
|
242
|
+
xaxis=dict(showgrid=False, zeroline=False, showticklabels=False),
|
|
243
|
+
yaxis=dict(showgrid=False, zeroline=False, showticklabels=False)))
|
|
244
|
+
fig.write_html("network.html")
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
## Exporting for Publication
|
|
248
|
+
|
|
249
|
+
### Static Export from Plotly
|
|
250
|
+
|
|
251
|
+
```python
|
|
252
|
+
# Export as high-res static image for journals
|
|
253
|
+
fig.write_image("figure.pdf", width=1200, height=800, scale=2) # Vector PDF
|
|
254
|
+
fig.write_image("figure.png", width=1200, height=800, scale=3) # 300 DPI PNG
|
|
255
|
+
fig.write_image("figure.svg", width=1200, height=800) # Vector SVG
|
|
256
|
+
|
|
257
|
+
# Requires: pip install kaleido
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### Embedding in Jupyter Notebooks
|
|
261
|
+
|
|
262
|
+
```python
|
|
263
|
+
# Plotly renders natively in Jupyter
|
|
264
|
+
fig.show()
|
|
265
|
+
|
|
266
|
+
# For Altair in Jupyter
|
|
267
|
+
chart # Just display the chart object
|
|
268
|
+
|
|
269
|
+
# For ECharts in Jupyter, use pyecharts
|
|
270
|
+
from pyecharts.charts import Bar
|
|
271
|
+
from pyecharts import options as opts
|
|
272
|
+
|
|
273
|
+
bar = (Bar()
|
|
274
|
+
.add_xaxis(["2019", "2020", "2021", "2022", "2023"])
|
|
275
|
+
.add_yaxis("Papers", [12, 15, 18, 22, 28])
|
|
276
|
+
.set_global_opts(title_opts=opts.TitleOpts(title="Research Output")))
|
|
277
|
+
bar.render_notebook()
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
## Best Practices
|
|
281
|
+
|
|
282
|
+
1. **Start with a static version**: Ensure your visualization works as a static figure first; interactivity is an enhancement, not a replacement.
|
|
283
|
+
2. **Meaningful tooltips**: Show relevant context on hover (paper title, exact values, metadata), not just coordinates.
|
|
284
|
+
3. **Responsive design**: Use percentage-based sizing or `window.addEventListener('resize')` for ECharts.
|
|
285
|
+
4. **Accessibility**: Provide text alternatives, use colorblind-friendly palettes, and ensure keyboard navigation.
|
|
286
|
+
5. **Performance**: For datasets over 10,000 points, use WebGL renderers (Plotly's `scattergl`, Deck.gl) or server-side aggregation.
|
|
287
|
+
6. **Reproducibility**: Save the data alongside the visualization so others can recreate it.
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: network-visualization-guide
|
|
3
|
+
description: "Visualize networks, graphs, citation maps, and relational data"
|
|
4
|
+
metadata:
|
|
5
|
+
openclaw:
|
|
6
|
+
emoji: "spider_web"
|
|
7
|
+
category: "analysis"
|
|
8
|
+
subcategory: "dataviz"
|
|
9
|
+
keywords: ["network visualization", "graph visualization", "citation network", "NetworkX", "social network", "node-link diagram"]
|
|
10
|
+
source: "wentor-research-plugins"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Network Visualization Guide
|
|
14
|
+
|
|
15
|
+
A skill for visualizing networks, graphs, and relational data in research. Covers NetworkX for analysis, layout algorithms, publication-quality styling, and tools for citation networks, social networks, and knowledge graphs.
|
|
16
|
+
|
|
17
|
+
## Network Basics
|
|
18
|
+
|
|
19
|
+
### When to Use Network Visualization
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
Network visualization is appropriate when your data involves relationships:
|
|
23
|
+
- Citation networks (papers citing other papers)
|
|
24
|
+
- Co-authorship networks (researchers who collaborate)
|
|
25
|
+
- Social networks (individuals connected by interactions)
|
|
26
|
+
- Biological networks (protein interactions, gene regulation)
|
|
27
|
+
- Knowledge graphs (concepts linked by relationships)
|
|
28
|
+
- Trade/flow networks (countries, organizations, resources)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Key Concepts
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
Nodes (vertices): The entities in your network
|
|
35
|
+
Edges (links): The relationships between entities
|
|
36
|
+
Directed: Edges have direction (A -> B)
|
|
37
|
+
Undirected: Edges are bidirectional (A -- B)
|
|
38
|
+
Weighted: Edges have a strength or value
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Building Networks with NetworkX
|
|
42
|
+
|
|
43
|
+
### Creating and Analyzing a Network
|
|
44
|
+
|
|
45
|
+
```python
|
|
46
|
+
import networkx as nx
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def build_citation_network(citations: list[tuple]) -> dict:
|
|
50
|
+
"""
|
|
51
|
+
Build and analyze a citation network.
|
|
52
|
+
|
|
53
|
+
Args:
|
|
54
|
+
citations: List of (citing_paper, cited_paper) tuples
|
|
55
|
+
"""
|
|
56
|
+
G = nx.DiGraph()
|
|
57
|
+
G.add_edges_from(citations)
|
|
58
|
+
|
|
59
|
+
metrics = {
|
|
60
|
+
"n_nodes": G.number_of_nodes(),
|
|
61
|
+
"n_edges": G.number_of_edges(),
|
|
62
|
+
"density": nx.density(G),
|
|
63
|
+
"most_cited": sorted(
|
|
64
|
+
G.in_degree(), key=lambda x: x[1], reverse=True
|
|
65
|
+
)[:10],
|
|
66
|
+
"most_citing": sorted(
|
|
67
|
+
G.out_degree(), key=lambda x: x[1], reverse=True
|
|
68
|
+
)[:10],
|
|
69
|
+
"connected_components": nx.number_weakly_connected_components(G)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
# PageRank (importance measure)
|
|
73
|
+
pagerank = nx.pagerank(G)
|
|
74
|
+
metrics["top_pagerank"] = sorted(
|
|
75
|
+
pagerank.items(), key=lambda x: x[1], reverse=True
|
|
76
|
+
)[:10]
|
|
77
|
+
|
|
78
|
+
return metrics
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Visualizing with Matplotlib
|
|
82
|
+
|
|
83
|
+
```python
|
|
84
|
+
import matplotlib.pyplot as plt
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
def plot_network(G: nx.Graph, layout: str = "spring",
|
|
88
|
+
node_size_attr: str = None,
|
|
89
|
+
title: str = "Network") -> None:
|
|
90
|
+
"""
|
|
91
|
+
Create a publication-quality network visualization.
|
|
92
|
+
|
|
93
|
+
Args:
|
|
94
|
+
G: NetworkX graph object
|
|
95
|
+
layout: Layout algorithm (spring, kamada_kawai, circular, spectral)
|
|
96
|
+
node_size_attr: Node attribute to scale node sizes by
|
|
97
|
+
title: Plot title
|
|
98
|
+
"""
|
|
99
|
+
layouts = {
|
|
100
|
+
"spring": nx.spring_layout(G, k=1.5, seed=42),
|
|
101
|
+
"kamada_kawai": nx.kamada_kawai_layout(G),
|
|
102
|
+
"circular": nx.circular_layout(G),
|
|
103
|
+
"spectral": nx.spectral_layout(G)
|
|
104
|
+
}
|
|
105
|
+
pos = layouts.get(layout, nx.spring_layout(G, seed=42))
|
|
106
|
+
|
|
107
|
+
# Node sizes based on degree if no attribute specified
|
|
108
|
+
if node_size_attr and nx.get_node_attributes(G, node_size_attr):
|
|
109
|
+
sizes = [G.nodes[n].get(node_size_attr, 10) * 50 for n in G.nodes]
|
|
110
|
+
else:
|
|
111
|
+
degrees = dict(G.degree())
|
|
112
|
+
sizes = [degrees[n] * 50 + 20 for n in G.nodes]
|
|
113
|
+
|
|
114
|
+
fig, ax = plt.subplots(figsize=(12, 10))
|
|
115
|
+
|
|
116
|
+
nx.draw_networkx_edges(G, pos, alpha=0.2, edge_color="gray", ax=ax)
|
|
117
|
+
nx.draw_networkx_nodes(G, pos, node_size=sizes,
|
|
118
|
+
node_color="steelblue", alpha=0.7, ax=ax)
|
|
119
|
+
|
|
120
|
+
# Label only high-degree nodes
|
|
121
|
+
threshold = sorted(dict(G.degree()).values(), reverse=True)[:10][-1]
|
|
122
|
+
labels = {n: n for n, d in G.degree() if d >= threshold}
|
|
123
|
+
nx.draw_networkx_labels(G, pos, labels, font_size=8, ax=ax)
|
|
124
|
+
|
|
125
|
+
ax.set_title(title, fontsize=14)
|
|
126
|
+
ax.axis("off")
|
|
127
|
+
plt.tight_layout()
|
|
128
|
+
plt.savefig("network.pdf", bbox_inches="tight", dpi=300)
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Layout Algorithm Selection
|
|
132
|
+
|
|
133
|
+
### Choosing the Right Layout
|
|
134
|
+
|
|
135
|
+
| Layout | Best For | Properties |
|
|
136
|
+
|--------|---------|------------|
|
|
137
|
+
| Spring (Fruchterman-Reingold) | General purpose | Clusters emerge naturally |
|
|
138
|
+
| Kamada-Kawai | Small-medium networks | Minimizes edge crossings |
|
|
139
|
+
| Circular | Comparing connectivity | All nodes equidistant from center |
|
|
140
|
+
| Spectral | Community structure | Based on graph Laplacian eigenvectors |
|
|
141
|
+
| Hierarchical (Sugiyama) | DAGs, trees | Top-down layered layout |
|
|
142
|
+
| Force Atlas 2 | Large networks | Gravity-based, good for Gephi |
|
|
143
|
+
|
|
144
|
+
## Specialized Tools
|
|
145
|
+
|
|
146
|
+
### Beyond Python
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
Gephi:
|
|
150
|
+
- Interactive exploration of large networks
|
|
151
|
+
- Force Atlas 2 layout, community detection
|
|
152
|
+
- Export publication-quality SVG/PDF
|
|
153
|
+
- Best for exploratory analysis
|
|
154
|
+
|
|
155
|
+
VOSviewer:
|
|
156
|
+
- Bibliometric networks (co-citation, co-authorship)
|
|
157
|
+
- Reads Web of Science and Scopus exports directly
|
|
158
|
+
- Density and overlay visualizations
|
|
159
|
+
- Standard tool in bibliometrics research
|
|
160
|
+
|
|
161
|
+
Cytoscape:
|
|
162
|
+
- Biological network visualization
|
|
163
|
+
- Extensive plugin ecosystem for bioinformatics
|
|
164
|
+
- Pathway analysis and enrichment
|
|
165
|
+
|
|
166
|
+
D3.js:
|
|
167
|
+
- Interactive web-based network diagrams
|
|
168
|
+
- Full customization via JavaScript
|
|
169
|
+
- Best for interactive publications
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Publication Tips
|
|
173
|
+
|
|
174
|
+
### Making Networks Readable
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
1. Reduce visual clutter:
|
|
178
|
+
- Filter: Show only edges above a weight threshold
|
|
179
|
+
- Aggregate: Collapse clusters into supernodes
|
|
180
|
+
- Prune: Remove isolates and low-degree nodes
|
|
181
|
+
|
|
182
|
+
2. Use visual encoding meaningfully:
|
|
183
|
+
- Node size = importance (degree, PageRank, citation count)
|
|
184
|
+
- Node color = community/category
|
|
185
|
+
- Edge width = relationship strength
|
|
186
|
+
- Edge color = relationship type
|
|
187
|
+
|
|
188
|
+
3. Always include:
|
|
189
|
+
- A legend explaining visual encodings
|
|
190
|
+
- Network statistics (N nodes, M edges, density)
|
|
191
|
+
- Description of the layout algorithm used
|
|
192
|
+
- Scale context (what does a node/edge represent?)
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
For networks with more than 500 nodes, static visualization becomes difficult to read. Consider interactive visualizations for supplementary materials, or show a filtered/aggregated view in the main paper with the full network available online.
|