The right chart depends first on the type of data. Four main types are used.
Numerical Data
Numerical (quantitative) data are measured or counted numbers on which arithmetic is meaningful. Discrete values are counted whole numbers (number of students), while continuous values can take any value in a range (height, temperature, revenue). Numerical data are shown with histograms, scatter plots, line charts and bar charts of totals or averages.
Categorical Data
Categorical (qualitative) data place items into groups. Nominal categories have no order (city, colour, product type). Ordinal categories have a natural order (low, medium, high; grades A, B, C). Categories are shown with bar charts, column charts, pie charts (only for few parts) and tables.
Temporal Data
Temporal (time-series) data record values at points in time: daily sales, monthly rainfall, hourly website visits. Time has a direction, so the natural display is a line chart with time on the horizontal axis, which shows trend, seasonality and sudden changes. Dates can also be grouped into year, quarter, month and day for analysis.
Geographical Data
Geographical (spatial) data are tied to locations, such as countries, states, cities or latitude and longitude. They are shown on maps: a filled map (choropleth) colours regions by value, a bubble map puts sized circles on locations and a heat map shows density. Spatial data must be stored with correct location names or coordinates.
Definition: Data type. The kind of values a field holds (numerical, categorical, temporal or geographical), which decides how it can be analysed and which visual suits it.
Table 1.3: Data types and suitable charts
| Type | Example | Typical chart | Note |
|---|---|---|---|
| Numerical | Marks, price | Histogram, scatter | Arithmetic is meaningful |
| Categorical | City, grade | Bar chart | Nominal or ordinal |
| Temporal | Monthly sales | Line chart | Shows trend over time |
| Geographical | State, latitude | Map | Needs location data |
Example 1.3: Classifying the fields of a sales table
Problem: A table has the fields OrderDate, Region, Product, Quantity, Amount and City. Classify each and suggest a chart.
Solution:
- OrderDate is temporal: a line chart of sales over time.
- Region and Product are categorical (nominal): bar charts of sales by category.
- Quantity is numerical (discrete) and Amount is numerical (continuous): a scatter plot of Quantity against Amount, or a histogram of Amount.
- City is geographical: a map with bubbles sized by sales.
Result: One temporal, two categorical, two numerical and one geographical field, each with its own natural chart.
import pandas as pd
df = pd.DataFrame({
"OrderDate": pd.to_datetime(["2026-01-05", "2026-01-20",
"2026-02-11"]),
"Region": ["North", "South", "North"],
"Quantity": [3, 1, 4],
"Amount": [450.5, 120.0, 610.25]})
print(df.dtypes.to_string())
print("Sales by month:")
print(df.groupby(df["OrderDate"].dt.month)["Amount"].sum())
Output
OrderDate datetime64[ns]
Region object
Quantity int64
Amount float64
Sales by month:
OrderDate
1 570.50
2 610.25
Name: Amount, dtype: float64
Common mistakes
- Treating numeric codes (such as pin codes) as numbers to add or average.
- Using a pie chart for numerical or time data.
- Plotting time on a bar chart in random order instead of a line chart in sequence.
- Mapping data without verifying the location names.
Key takeaways
- Numerical: discrete or continuous. Categorical: nominal or ordinal.
- Temporal data go on a line chart with time left to right.
- Geographical data go on maps (choropleth, bubble, heat).
- The data type decides the chart.
Practice questions
- What is ordinal data?
- Which chart suits temporal data?
- Name two map types for geographical data.
Answers to the practice questions
- Categorical data with a natural order, such as low, medium, high.
- A line chart.
- Choropleth (filled) map and bubble map.
Sources
- Official BCA syllabus Data Visualization, course code 26BCA404DSE11, Unit I
