@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,230 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: color-accessibility-guide
|
|
3
|
+
description: "Colorblind-friendly palettes and accessible visualization design"
|
|
4
|
+
metadata:
|
|
5
|
+
openclaw:
|
|
6
|
+
emoji: "palette"
|
|
7
|
+
category: "analysis"
|
|
8
|
+
subcategory: "dataviz"
|
|
9
|
+
keywords: ["colorblind-friendly palette", "accessible color scheme", "visualization principles", "data-ink ratio"]
|
|
10
|
+
source: "wentor-research-plugins"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Color Accessibility Guide
|
|
14
|
+
|
|
15
|
+
Design data visualizations that are accessible to colorblind readers and follow best practices for clarity, using tested palettes and encoding principles.
|
|
16
|
+
|
|
17
|
+
## Color Vision Deficiency Overview
|
|
18
|
+
|
|
19
|
+
Approximately 8% of males and 0.5% of females have some form of color vision deficiency (CVD). The most common types:
|
|
20
|
+
|
|
21
|
+
| Type | Prevalence (Male) | Affected Colors | Commonly Confused |
|
|
22
|
+
|------|-------------------|-----------------|-------------------|
|
|
23
|
+
| Deuteranomaly (green-weak) | 5% | Green | Red and green |
|
|
24
|
+
| Protanomaly (red-weak) | 1% | Red | Red and green |
|
|
25
|
+
| Deuteranopia (no green) | 1% | Green | Red and green |
|
|
26
|
+
| Protanopia (no red) | 1% | Red | Red and green |
|
|
27
|
+
| Tritanopia (no blue) | 0.003% | Blue | Blue and yellow |
|
|
28
|
+
| Monochromacy | Very rare | All | All colors |
|
|
29
|
+
|
|
30
|
+
**Key takeaway**: Never rely solely on a red-green distinction to convey information. About 1 in 12 male readers cannot distinguish them.
|
|
31
|
+
|
|
32
|
+
## Recommended Colorblind-Safe Palettes
|
|
33
|
+
|
|
34
|
+
### Qualitative Palettes (Categorical Data)
|
|
35
|
+
|
|
36
|
+
#### Wong (2011) Nature Palette (8 colors)
|
|
37
|
+
|
|
38
|
+
Widely recommended for scientific publications:
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
# Wong's colorblind-friendly palette
|
|
42
|
+
wong_palette = {
|
|
43
|
+
"black": "#000000",
|
|
44
|
+
"orange": "#E69F00",
|
|
45
|
+
"sky_blue": "#56B4E9",
|
|
46
|
+
"bluish_green":"#009E73",
|
|
47
|
+
"yellow": "#F0E442",
|
|
48
|
+
"blue": "#0072B2",
|
|
49
|
+
"vermillion": "#D55E00",
|
|
50
|
+
"reddish_purple":"#CC79A7"
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
#### Okabe-Ito Palette
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
okabe_ito = ["#E69F00", "#56B4E9", "#009E73", "#F0E442",
|
|
58
|
+
"#0072B2", "#D55E00", "#CC79A7", "#000000"]
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
#### Tol's Qualitative Palette
|
|
62
|
+
|
|
63
|
+
```python
|
|
64
|
+
# Paul Tol's qualitative palette (up to 12 distinct colors)
|
|
65
|
+
tol_qualitative = ["#332288", "#88CCEE", "#44AA99", "#117733",
|
|
66
|
+
"#999933", "#DDCC77", "#CC6677", "#882255",
|
|
67
|
+
"#AA4499", "#661100", "#6699CC", "#888888"]
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Sequential Palettes (Ordered Data)
|
|
71
|
+
|
|
72
|
+
For continuous data, use perceptually uniform colormaps:
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
import matplotlib.pyplot as plt
|
|
76
|
+
|
|
77
|
+
# Recommended sequential colormaps
|
|
78
|
+
# These are perceptually uniform and colorblind-safe:
|
|
79
|
+
good_cmaps = ["viridis", "plasma", "inferno", "magma", "cividis"]
|
|
80
|
+
|
|
81
|
+
# Avoid these (not perceptually uniform, not colorblind-safe):
|
|
82
|
+
bad_cmaps = ["jet", "rainbow", "hsv"] # NEVER use these
|
|
83
|
+
|
|
84
|
+
# Example usage
|
|
85
|
+
import numpy as np
|
|
86
|
+
data = np.random.randn(10, 10)
|
|
87
|
+
fig, ax = plt.subplots(figsize=(8, 6))
|
|
88
|
+
im = ax.imshow(data, cmap="viridis")
|
|
89
|
+
plt.colorbar(im)
|
|
90
|
+
plt.title("Use viridis, not jet")
|
|
91
|
+
plt.savefig("heatmap.pdf", dpi=300, bbox_inches="tight")
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Diverging Palettes (Data with Meaningful Center)
|
|
95
|
+
|
|
96
|
+
```python
|
|
97
|
+
# Colorblind-safe diverging palettes
|
|
98
|
+
# Blue-to-Red via white (good for temperature, correlation)
|
|
99
|
+
import matplotlib.colors as mcolors
|
|
100
|
+
|
|
101
|
+
# Built-in matplotlib options:
|
|
102
|
+
diverging_safe = ["RdBu_r", "PuOr_r", "BrBG"]
|
|
103
|
+
|
|
104
|
+
# Custom two-color diverging (Tol):
|
|
105
|
+
tol_diverging = ["#364B9A", "#4A7BB7", "#6EA6CD", "#98CAE1", "#C2E4EF",
|
|
106
|
+
"#EAECCC", "#FEDA8B", "#FDB366", "#F67E4B", "#DD3D2D", "#A50026"]
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Design Principles for Accessible Visualization
|
|
110
|
+
|
|
111
|
+
### 1. Data-Ink Ratio
|
|
112
|
+
|
|
113
|
+
Edward Tufte's principle: maximize the proportion of ink used to display actual data.
|
|
114
|
+
|
|
115
|
+
```python
|
|
116
|
+
import matplotlib.pyplot as plt
|
|
117
|
+
|
|
118
|
+
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12, 5))
|
|
119
|
+
|
|
120
|
+
# BAD: Low data-ink ratio (chartjunk)
|
|
121
|
+
ax1.bar(range(5), [3, 7, 2, 5, 8], color="blue", edgecolor="black",
|
|
122
|
+
linewidth=2)
|
|
123
|
+
ax1.set_facecolor("#EEEEEE")
|
|
124
|
+
ax1.grid(True, color="white", linewidth=2)
|
|
125
|
+
ax1.set_title("Before: Low Data-Ink Ratio")
|
|
126
|
+
|
|
127
|
+
# GOOD: High data-ink ratio
|
|
128
|
+
ax2.bar(range(5), [3, 7, 2, 5, 8], color="#0072B2", edgecolor="none")
|
|
129
|
+
ax2.spines["top"].set_visible(False)
|
|
130
|
+
ax2.spines["right"].set_visible(False)
|
|
131
|
+
ax2.set_title("After: High Data-Ink Ratio")
|
|
132
|
+
|
|
133
|
+
plt.tight_layout()
|
|
134
|
+
plt.savefig("data_ink_ratio.pdf", dpi=300)
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### 2. Redundant Encoding
|
|
138
|
+
|
|
139
|
+
Never use color as the sole channel for conveying information. Combine color with at least one other visual channel:
|
|
140
|
+
|
|
141
|
+
| Channel | Examples |
|
|
142
|
+
|---------|----------|
|
|
143
|
+
| Shape | Circles, squares, triangles for different groups |
|
|
144
|
+
| Pattern | Solid, dashed, dotted lines |
|
|
145
|
+
| Fill pattern | Hatching, cross-hatching for bar charts |
|
|
146
|
+
| Label | Direct text labels on or near data points |
|
|
147
|
+
| Position | Separate panels (facets) for each group |
|
|
148
|
+
| Size | Varying point sizes |
|
|
149
|
+
|
|
150
|
+
```python
|
|
151
|
+
import matplotlib.pyplot as plt
|
|
152
|
+
|
|
153
|
+
markers = ['o', 's', '^', 'D'] # Different shapes
|
|
154
|
+
colors = ['#0072B2', '#D55E00', '#009E73', '#CC79A7']
|
|
155
|
+
labels = ['Group A', 'Group B', 'Group C', 'Group D']
|
|
156
|
+
|
|
157
|
+
fig, ax = plt.subplots(figsize=(8, 6))
|
|
158
|
+
for i in range(4):
|
|
159
|
+
ax.scatter(x[i], y[i], c=colors[i], marker=markers[i],
|
|
160
|
+
s=80, label=labels[i], edgecolors='black', linewidth=0.5)
|
|
161
|
+
|
|
162
|
+
ax.legend()
|
|
163
|
+
ax.set_xlabel("X Variable")
|
|
164
|
+
ax.set_ylabel("Y Variable")
|
|
165
|
+
plt.savefig("redundant_encoding.pdf", dpi=300)
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### 3. Line Style Differentiation
|
|
169
|
+
|
|
170
|
+
```python
|
|
171
|
+
line_styles = ['-', '--', '-.', ':', (0, (3, 1, 1, 1))]
|
|
172
|
+
colors = ['#0072B2', '#D55E00', '#009E73', '#CC79A7', '#E69F00']
|
|
173
|
+
|
|
174
|
+
fig, ax = plt.subplots(figsize=(8, 5))
|
|
175
|
+
for i in range(5):
|
|
176
|
+
ax.plot(x, data[i], color=colors[i], linestyle=line_styles[i],
|
|
177
|
+
linewidth=2, label=f"Method {i+1}")
|
|
178
|
+
|
|
179
|
+
ax.legend()
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## Checking Your Visualizations
|
|
183
|
+
|
|
184
|
+
### Simulation Tools
|
|
185
|
+
|
|
186
|
+
| Tool | Platform | URL |
|
|
187
|
+
|------|----------|-----|
|
|
188
|
+
| Coblis | Web | color-blindness.com/coblis |
|
|
189
|
+
| Color Oracle | Desktop (Win/Mac/Linux) | colororacle.org |
|
|
190
|
+
| Sim Daltonism | macOS | michelf.ca/projects/sim-daltonism |
|
|
191
|
+
| Colorblindly | Chrome extension | Chrome Web Store |
|
|
192
|
+
| Matplotlib CVD simulation | Python | See code below |
|
|
193
|
+
|
|
194
|
+
### Programmatic CVD Simulation
|
|
195
|
+
|
|
196
|
+
```python
|
|
197
|
+
from colorspacious import cspace_convert
|
|
198
|
+
import numpy as np
|
|
199
|
+
|
|
200
|
+
def simulate_cvd(rgb_hex, deficiency="deuteranomaly", severity=100):
|
|
201
|
+
"""Simulate how a color appears to someone with CVD."""
|
|
202
|
+
# Convert hex to RGB [0,1]
|
|
203
|
+
rgb = np.array([int(rgb_hex[i:i+2], 16)/255 for i in (1, 3, 5)])
|
|
204
|
+
|
|
205
|
+
# Convert using colorspacious
|
|
206
|
+
cvd_space = {"name": "sRGB1+CVD",
|
|
207
|
+
"cvd_type": deficiency,
|
|
208
|
+
"severity": severity}
|
|
209
|
+
rgb_cvd = cspace_convert(rgb, cvd_space, "sRGB1")
|
|
210
|
+
rgb_cvd = np.clip(rgb_cvd, 0, 1)
|
|
211
|
+
|
|
212
|
+
return "#{:02x}{:02x}{:02x}".format(*[int(c*255) for c in rgb_cvd])
|
|
213
|
+
|
|
214
|
+
# Test your palette
|
|
215
|
+
for color in ["#FF0000", "#00FF00", "#0072B2", "#D55E00"]:
|
|
216
|
+
sim = simulate_cvd(color)
|
|
217
|
+
print(f"{color} -> {sim} (deuteranomaly)")
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## Quick Reference: Do's and Don'ts
|
|
221
|
+
|
|
222
|
+
| Do | Don't |
|
|
223
|
+
|----|-------|
|
|
224
|
+
| Use Wong or Okabe-Ito palettes | Use red vs. green to distinguish categories |
|
|
225
|
+
| Use viridis/cividis colormaps | Use jet/rainbow colormaps |
|
|
226
|
+
| Add shape/pattern as redundant encoding | Rely on color alone |
|
|
227
|
+
| Use direct labels when possible | Force readers to match colors to legend repeatedly |
|
|
228
|
+
| Test with CVD simulators | Assume your color choices work for everyone |
|
|
229
|
+
| Use high contrast (WCAG AA: 4.5:1 ratio) | Use light colors on white backgrounds |
|
|
230
|
+
| Keep maximum 7-8 colors in categorical charts | Use 15+ colors that are impossible to distinguish |
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: geospatial-viz-guide
|
|
3
|
+
description: "Create maps, choropleths, and spatial data visualizations for research"
|
|
4
|
+
metadata:
|
|
5
|
+
openclaw:
|
|
6
|
+
emoji: "world_map"
|
|
7
|
+
category: "analysis"
|
|
8
|
+
subcategory: "dataviz"
|
|
9
|
+
keywords: ["geospatial", "choropleth", "maps", "GIS", "spatial visualization", "geopandas"]
|
|
10
|
+
source: "wentor-research-plugins"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Geospatial Visualization Guide
|
|
14
|
+
|
|
15
|
+
A skill for creating maps, choropleths, and spatial data visualizations for research publications. Covers coordinate systems, choropleth maps, point maps, Python geospatial libraries, and cartographic best practices for academic papers.
|
|
16
|
+
|
|
17
|
+
## Geospatial Data Fundamentals
|
|
18
|
+
|
|
19
|
+
### Common Spatial Data Formats
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
Vector data (discrete features):
|
|
23
|
+
- Shapefile (.shp): Legacy standard, multi-file
|
|
24
|
+
- GeoJSON (.geojson): Web-friendly, single file
|
|
25
|
+
- GeoPackage (.gpkg): Modern SQLite-based, recommended
|
|
26
|
+
- KML (.kml): Google Earth format
|
|
27
|
+
|
|
28
|
+
Raster data (continuous surfaces):
|
|
29
|
+
- GeoTIFF (.tif): Georeferenced image
|
|
30
|
+
- NetCDF (.nc): Climate and atmospheric data
|
|
31
|
+
- HDF5 (.h5): Satellite and remote sensing data
|
|
32
|
+
|
|
33
|
+
Key concepts:
|
|
34
|
+
- CRS (Coordinate Reference System): How 3D Earth maps to 2D
|
|
35
|
+
- EPSG:4326 (WGS84): Latitude/longitude (most GPS data)
|
|
36
|
+
- EPSG:3857: Web Mercator (Google Maps, web tiles)
|
|
37
|
+
- Always check and document your CRS
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Choropleth Maps
|
|
41
|
+
|
|
42
|
+
### Building a Choropleth with GeoPandas
|
|
43
|
+
|
|
44
|
+
```python
|
|
45
|
+
import geopandas as gpd
|
|
46
|
+
import matplotlib.pyplot as plt
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def create_choropleth(shapefile_path: str, data_column: str,
|
|
50
|
+
title: str, cmap: str = "YlOrRd") -> None:
|
|
51
|
+
"""
|
|
52
|
+
Create a choropleth map from a shapefile.
|
|
53
|
+
|
|
54
|
+
Args:
|
|
55
|
+
shapefile_path: Path to shapefile or GeoPackage
|
|
56
|
+
data_column: Column name to visualize
|
|
57
|
+
title: Map title
|
|
58
|
+
cmap: Matplotlib colormap name
|
|
59
|
+
"""
|
|
60
|
+
gdf = gpd.read_file(shapefile_path)
|
|
61
|
+
|
|
62
|
+
fig, ax = plt.subplots(1, 1, figsize=(12, 8))
|
|
63
|
+
|
|
64
|
+
gdf.plot(
|
|
65
|
+
column=data_column,
|
|
66
|
+
cmap=cmap,
|
|
67
|
+
linewidth=0.5,
|
|
68
|
+
edgecolor="0.5",
|
|
69
|
+
legend=True,
|
|
70
|
+
legend_kwds={
|
|
71
|
+
"label": data_column,
|
|
72
|
+
"orientation": "horizontal",
|
|
73
|
+
"shrink": 0.6,
|
|
74
|
+
"pad": 0.05
|
|
75
|
+
},
|
|
76
|
+
ax=ax
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
ax.set_title(title, fontsize=14, fontweight="bold")
|
|
80
|
+
ax.axis("off")
|
|
81
|
+
plt.tight_layout()
|
|
82
|
+
plt.savefig("choropleth.pdf", bbox_inches="tight", dpi=300)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Joining Data to Geometries
|
|
86
|
+
|
|
87
|
+
```python
|
|
88
|
+
import pandas as pd
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def join_data_to_map(gdf: gpd.GeoDataFrame,
|
|
92
|
+
data: pd.DataFrame,
|
|
93
|
+
geo_key: str,
|
|
94
|
+
data_key: str) -> gpd.GeoDataFrame:
|
|
95
|
+
"""
|
|
96
|
+
Join tabular data to geographic features.
|
|
97
|
+
|
|
98
|
+
Args:
|
|
99
|
+
gdf: GeoDataFrame with polygons (e.g., country boundaries)
|
|
100
|
+
data: DataFrame with your research data
|
|
101
|
+
geo_key: Column in gdf to join on (e.g., 'ISO_A3')
|
|
102
|
+
data_key: Column in data to join on (e.g., 'country_code')
|
|
103
|
+
"""
|
|
104
|
+
merged = gdf.merge(data, left_on=geo_key, right_on=data_key, how="left")
|
|
105
|
+
|
|
106
|
+
missing = merged[merged[data.columns[1]].isna()]
|
|
107
|
+
if len(missing) > 0:
|
|
108
|
+
print(f"Warning: {len(missing)} regions have no data (will appear blank)")
|
|
109
|
+
|
|
110
|
+
return merged
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Point Maps and Proportional Symbols
|
|
114
|
+
|
|
115
|
+
### Mapping Research Sites or Events
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
def create_point_map(gdf_base: gpd.GeoDataFrame,
|
|
119
|
+
points: gpd.GeoDataFrame,
|
|
120
|
+
size_column: str = None,
|
|
121
|
+
color_column: str = None) -> None:
|
|
122
|
+
"""
|
|
123
|
+
Create a point map with proportional symbols.
|
|
124
|
+
|
|
125
|
+
Args:
|
|
126
|
+
gdf_base: Base map (country or region polygons)
|
|
127
|
+
points: GeoDataFrame with point geometries
|
|
128
|
+
size_column: Column to scale point sizes
|
|
129
|
+
color_column: Column to color points
|
|
130
|
+
"""
|
|
131
|
+
fig, ax = plt.subplots(figsize=(12, 8))
|
|
132
|
+
|
|
133
|
+
# Base map
|
|
134
|
+
gdf_base.plot(ax=ax, color="lightgray", edgecolor="white", linewidth=0.5)
|
|
135
|
+
|
|
136
|
+
# Points
|
|
137
|
+
sizes = points[size_column] * 2 if size_column else 30
|
|
138
|
+
colors = points[color_column] if color_column else "red"
|
|
139
|
+
|
|
140
|
+
points.plot(
|
|
141
|
+
ax=ax,
|
|
142
|
+
markersize=sizes,
|
|
143
|
+
color=colors,
|
|
144
|
+
alpha=0.6,
|
|
145
|
+
edgecolor="black",
|
|
146
|
+
linewidth=0.3
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
ax.axis("off")
|
|
150
|
+
plt.tight_layout()
|
|
151
|
+
plt.savefig("point_map.pdf", bbox_inches="tight", dpi=300)
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Interactive Maps with Folium
|
|
155
|
+
|
|
156
|
+
```python
|
|
157
|
+
import folium
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
def create_interactive_map(center: tuple = (20, 0),
|
|
161
|
+
zoom: int = 2) -> folium.Map:
|
|
162
|
+
"""
|
|
163
|
+
Create an interactive web map (useful for supplementary materials).
|
|
164
|
+
|
|
165
|
+
Args:
|
|
166
|
+
center: (latitude, longitude) center point
|
|
167
|
+
zoom: Initial zoom level
|
|
168
|
+
"""
|
|
169
|
+
m = folium.Map(location=center, zoom_start=zoom,
|
|
170
|
+
tiles="CartoDB positron")
|
|
171
|
+
|
|
172
|
+
# Add markers, choropleth layers, or heatmaps as needed
|
|
173
|
+
# folium.Marker([lat, lon], popup="Label").add_to(m)
|
|
174
|
+
|
|
175
|
+
return m
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## Cartographic Best Practices
|
|
179
|
+
|
|
180
|
+
### Publication Standards
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
1. Projection choice:
|
|
184
|
+
- Global maps: Robinson or Equal Earth (not Mercator for thematic maps)
|
|
185
|
+
- Country/region: Appropriate local projection
|
|
186
|
+
- Mercator distorts area -- misleading for choropleths
|
|
187
|
+
|
|
188
|
+
2. Color schemes:
|
|
189
|
+
- Sequential: Low-to-high values (YlOrRd, Blues, Viridis)
|
|
190
|
+
- Diverging: Values around a midpoint (RdBu, BrBG)
|
|
191
|
+
- Qualitative: Categorical data (Set2, Paired)
|
|
192
|
+
- Use colorbrewer2.org for perceptually uniform palettes
|
|
193
|
+
- Test for colorblind accessibility
|
|
194
|
+
|
|
195
|
+
3. Required map elements:
|
|
196
|
+
- Title
|
|
197
|
+
- Legend with units
|
|
198
|
+
- Scale bar
|
|
199
|
+
- North arrow (if orientation is non-standard)
|
|
200
|
+
- Data source attribution
|
|
201
|
+
- CRS/projection information
|
|
202
|
+
|
|
203
|
+
4. Ethical considerations:
|
|
204
|
+
- Disputed borders: Use dashed lines or note in caption
|
|
205
|
+
- Data gaps: Show "no data" regions explicitly (do not leave blank)
|
|
206
|
+
- Privacy: Aggregate point data to protect individual locations
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## Free Data Sources
|
|
210
|
+
|
|
211
|
+
| Source | Data | Format |
|
|
212
|
+
|--------|------|--------|
|
|
213
|
+
| Natural Earth | Country/region boundaries, physical features | Shapefile, GeoJSON |
|
|
214
|
+
| GADM | Administrative boundaries (all countries, all levels) | GeoPackage, Shapefile |
|
|
215
|
+
| OpenStreetMap | Roads, buildings, land use | PBF, Shapefile |
|
|
216
|
+
| WorldPop | Population density grids | GeoTIFF |
|
|
217
|
+
| NASA SEDAC | Socioeconomic and environmental data | GeoTIFF, Shapefile |
|
|
218
|
+
| USGS Earth Explorer | Satellite imagery, elevation | GeoTIFF |
|