How do you know which data visualization is appropriate to use? Here's a handy decision tree:
flowchart LR
A[What do you want to show?] --> B[Comparison]
A --> C[Distribution]
A --> D[Relationship]
A --> E[Composition]
A --> F[Process / Flow]
A --> G[Geography]
A --> H[Time]
%% ---------------- COMPARISON ----------------
B --> B1[Categories with numeric values?]
B1 -->|Yes| B2[Bar Chart]
B1 -->|Stacked categories?| B2a[Stacked Bar Chart]
B1 -->|Many categories or long labels| B3[Horizontal Bar Chart]
B1 -->|Few categories, simple| B4[Table]
B --> B5[Compare distributions across groups?]
B5 -->|Show summary + shape| B6[Violin Plot]
B5 -->|Show individual points| B7[Strip Plot]
B5 -->|Avoid overplotting| B8[Swarm Plot]
%% ---------------- DISTRIBUTION ----------------
C --> C1[Frequency of values?]
C1 -->|Yes| C2[Histogram]
C1 -->|Smooth density?| C2a[KDE Plot]
C --> C3[Spread, outliers, shape?]
C3 -->|Yes| C4[Box Plot]
C3 -->|Show full distribution| C4a[Violin Plot]
C --> C5[Large dataset?]
C5 -->|Avoid overplotting| C6[Hexbin Plot]
C --> C7[Distribution across 2D space?]
C7 -->|Yes| C8[2D KDE / Contour Plot]
%% ---------------- RELATIONSHIP ----------------
D --> D1[Two numeric variables?]
D1 -->|Yes| D2[Scatter Plot]
D1 -->|Add trend?| D2a[Regression Plot]
D1 -->|Check model fit?| D2b[Residual Plot]
D --> D3[Three numeric variables?]
D3 -->|Yes| D4[Bubble Chart]
D --> D5[Multidimensional comparison?]
D5 -->|Yes| D6[Radar Chart]
D --> D7[Joint distribution + marginals?]
D7 -->|Yes| D8[Joint Plot]
D --> D9[High-density points?]
D9 -->|Yes| D10[Hexbin Plot]
%% ---------------- COMPOSITION ----------------
E --> E1[Parts of a whole?]
E1 -->|Few categories| E2[Pie Chart]
E1 -->|More categories| E3[Donut Chart]
E1 -->|Hierarchical parts| E4[Tree Map]
E1 -->|Sequential drop-off| E5[Funnel Chart]
E --> E6[Composition over time?]
E6 -->|Yes| E7[Stacked Area Chart]
%% ---------------- PROCESS / FLOW ----------------
F --> F1[Steps or decisions?]
F1 -->|Yes| F2[Flowchart]
F --> F3[Classification path?]
F3 -->|Yes| F4[Dichotomous Key]
F --> F5[Task dependencies?]
F5 -->|Yes| F6[PERT Chart]
F --> F7[Network or graph structure?]
F7 -->|Yes| F8[Node-Link Diagram]
%% ---------------- GEOGRAPHY ----------------
G --> G1[Values by region?]
G1 -->|Yes| G2[Choropleth Map]
G --> G3[Locations only?]
G3 -->|Yes| G4[Geospatial Map]
G --> G5[Density over space?]
G5 -->|Yes| G6[Spatial Heatmap]
%% ---------------- TIME ----------------
H --> H1[Values over time?]
H1 -->|Trend| H2[Line Chart]
H1 -->|Cumulative or stacked| H3[Area Chart]
H1 -->|Events| H4[Timeline]
H1 -->|Multiple groups| H5[Multi-Series Line Chart]