Excel is the most familiar data tool. Almost everyone has it, and for small and medium data it is often enough.
Charts in Excel
Excel offers column, bar, line, pie, area, scatter, histogram, box-and-whisker, map and combination charts. A chart is created by selecting a data range and choosing Insert > Charts; the Recommended Charts feature suggests suitable types. Titles, axes, labels, colours and gridlines are edited through the chart elements. Sparklines are tiny line or column charts inside a single cell that show a trend beside each row.
PivotTables and PivotCharts
A PivotTable summarises a large table by dragging fields into Rows, Columns, Values and Filters: for example total sales by region and product. Values can be summed, counted or averaged. A PivotChart draws the PivotTable as a chart, and slicers and timelines are clickable filters that make the report interactive.
Conditional Formatting and Dashboards
Conditional formatting colours cells by rule: colour scales, data bars and icon sets show high and low values inside the table itself. Combining PivotCharts, slicers and formatted cells on one sheet gives a simple dashboard.
Strengths and Limits
Excel is widely available, easy to learn and flexible for ad hoc analysis. It is limited by size (about one million rows per sheet), by manual refresh unless connected through Power Query, by less polished interactivity and by the risk of formula errors in shared files.
Definition: PivotTable. An Excel tool that summarises a large table by grouping and aggregating fields chosen by dragging them into rows, columns, values and filters.
Table 2.1: Excel visualization features
| Feature | Purpose | Example |
|---|---|---|
| Charts | Plot a data range | Column chart of sales by region |
| PivotTable | Summarise by groups | Sales by region and product |
| Slicer | Interactive filter | Click a year to filter the report |
| Sparkline | Trend inside a cell | Monthly trend beside each product |
| Conditional formatting | Colour by rule | Data bars on the revenue column |
Example 2.1: A PivotTable by hand
Problem: Sales rows are (North, Pen, 100), (North, Book, 150), (South, Pen, 80), (South, Book, 120) and (East, Pen, 60). Build the PivotTable of total sales by region and product.
Solution:
- Put Region in rows, Product in columns and Amount in values, summed.
- North: Pen 100, Book 150, total 250. South: Pen 80, Book 120, total 200. East: Pen 60, Book none, total 60.
- Column totals: Pen 240 and Book 270. The grand total is 510.
Result: Totals by region are North 250, South 200 and East 60; the grand total is 510.
import pandas as pd
df = pd.DataFrame({
"Region": ["North", "North", "South", "South", "East"],
"Product": ["Pen", "Book", "Pen", "Book", "Pen"],
"Amount": [100, 150, 80, 120, 60]})
pt = pd.pivot_table(df, index="Region", columns="Product",
values="Amount", aggfunc="sum", fill_value=0,
margins=True, margins_name="Total")
print(pt)
Output
Product Book Pen Total
Region
East 0 60 60
North 150 100 250
South 120 80 200
Total 270 240 510
Common mistakes
- Using a pie chart in Excel for more than a few categories.
- Leaving default chart styles with clutter and 3D effects.
- Forgetting to refresh a PivotTable after the data change.
- Typing totals by hand instead of using formulas or a PivotTable.
Key takeaways
- PivotTable groups and aggregates; PivotChart draws it.
- Slicers and timelines add interactivity.
- Conditional formatting: colour scales, data bars and icon sets.
- Excel is easy and flexible but limited for very large data.
Practice questions
- What are the four areas of a PivotTable field list?
- What is a slicer?
- Name one limitation of Excel.
Answers to the practice questions
- Rows, columns, values and filters.
- A clickable visual filter for PivotTables and charts.
- A size limit of about a million rows per sheet, or manual refresh.
Sources
- Official BCA syllabus Data Visualization, course code 26BCA404DSE11, Unit II
