Introduction to Data Visualization
Data visualization is the practice of presenting information with charts, graphs and maps so that people can understand it quickly. Our brains process pictures far faster than tables of numbers, so a good visual can reveal in seconds what raw data hides for hours.
The classic proof: Anscombe's quartet
Four small datasets have almost the same mean, variance and correlation, yet when plotted they look completely different - a clean line, a curve, a line with one outlier, and a vertical stack with one leverage point. Summary numbers alone can mislead; plots do not.
Main types of visualization
1. Charts and graphs Compare categories, show change over time or reveal relationships. Examples: bar chart, line chart, pie chart, scatter plot, histogram, box plot.
2. Maps Show geographical data and give spatial context. Examples: choropleth (coloured regions), point maps, heat maps.
3. Dashboards Combine many visuals into one interactive page with filters and near real-time updates, for example a sales dashboard used by a manager every morning.
Why visualization is important
- Simplifies complex data - large tables become easy-to-read shapes.
- Reveals patterns and trends - seasonality, growth, clusters, outliers.
- Saves time - key information can be seen at a glance.
- Improves communication - non-technical people can understand the insight.
- Tells a story - guides the audience step by step towards a decision.
Choosing a chart: quick guide
| I want to show... | Use |
|---|---|
| Comparison between categories | Bar chart |
| Trend over time | Line chart |
| Distribution of one numeric variable | Histogram, box plot, violin plot |
| Relationship between two numeric variables | Scatter plot |
| Parts of a whole (few parts) | Pie / donut chart, stacked bar |
| Correlations among many variables | Heatmap |
| Geographical pattern | Map |
Real-world use cases
- Business analytics: tracking KPIs, sales and customer metrics.
- Healthcare: watching disease outbreaks, hospital occupancy and patient vitals.
- Sports: player statistics, shot maps and match outcomes.
- Retail and e-commerce: sales, customer preferences and inventory levels.
- Government and journalism: election results, budgets, population change.
Python visualization ecosystem
| Library | Best for |
|---|---|
| Matplotlib | Full control, publication-quality static plots |
| Seaborn | Statistical plots with beautiful defaults |
| Plotly | Interactive charts and dashboards |
| Altair | Declarative, grammar-of-graphics style |
| Folium / GeoPandas | Maps |