Data Visualisation (Chart Types)
Context: FIT1043_MOC Β· picking a chart by data type Β· a preliminary form of analysis Β· rendered in matplotlib
Quick Revision
- π― Objective: choose the chart that matches the data type β numeric β histogram/boxplot; categorical β bar/pie/frequency table.
- π¦ Core Components: histogram (continuous) vs bar chart (categorical) | pie (β€6 categories) | motion chart (5-D).
- β‘ Key Constraint: visualisation is preliminary β it gives a βfeelβ and reveals patterns, but a flat screen limits you to ~2 dimensions.
π How It Works
1. Purpose
- Preliminary analysis β get a βfeelβ for the data; can quickly reveal patterns.
- Dimension limit β paper/screen is 2-D; tricks push to 5β7 dims (colour/size/time), but readability drops.
2. Charts by Data Type
- Numeric (discrete + continuous) β histograms, box plots, motion charts.
- Categorical β frequency tables (a summary, not a graph), bar graphs, pie charts.
- Bar chart β compares groups or shows change over time.
- Pie chart β proportions of a whole; usable for β€6 categories (more becomes unreadable).
3. Histograms (bin continuous data)
- Definition β a bar chart of bin counts for continuous data (bar charts alone are for categorical).
- Bins β equally spaced bins of width ; bin count .
- Choosing β too few hides shape, too many looks ragged (e.g. 20 β 50 smoother β 100 ragged).
4. Motion Charts
- What β interactive multi-dimensional viz (GapMinder, Hans Rosling; Google renamed them bubble charts).
- Five dimensions β x-axis, y-axis, bubble size, bubble colour, and time.
- Trade-off β + deep trends, good for exploration, intuitive; β not for static media, controls complex/overwhelming.
βοΈ Core Decision Matrix
| Data type | Charts | Note |
|---|---|---|
| Numeric-continuous | histogram, box plot | histogram needs binning |
| Numeric (either) | motion/bubble chart | multi-dimensional/time |
| Categorical | bar graph, frequency table | bar compares groups |
| Categorical (proportions) | pie chart | β€6 categories only |
When It Flips: a histogram and a bar chart look alike but differ by data type β histograms bin continuous numeric data (bars touch, order matters), bar charts show categorical counts (bars separate, order free).
π Exam Execution Trace
Applied Exercise
Problem: Data spans , , using bins. Bin width? Which bin holds ? Derivation Proof / Hand-Calculation Walkthrough:
Final Extracted Output: width ; falls in bin 10 (the 45β50 interval).
π§ Active Recall
A histogram and a bar chart look identical β what actually distinguishes them?
- Hint: Continuous vs categorical.
Answer
- Short answer: A histogram bins continuous numeric data (adjacent, ordered bins); a bar chart shows categorical counts (separate bars, no inherent order).
- Why: Binning β histogram bars represent ranges ; bar-chart bars represent discrete categories.
Why cap pie charts at ~6 categories, and what five dimensions can a motion chart show?
- Hint: Readability + encoding channels.
Answer
- Short answer: Beyond ~6 sectors the eye canβt compare relative sizes; a motion chart encodes x, y, bubble size, bubble colour, and time.
- Why: Perceptual limits β too many sectors/dimensions overwhelm interpretation.