Category | Type | Description | Example |
---|---|---|---|
Numerical (numbers) | Interval | Numeric scale with meaningful intervals | Temperature in Celsius |
Numerical (numbers) | Ratio | Numeric scale with a true zero point | Height |
Numerical (numbers) | Discrete | Countable number of values | Number of students |
Categorical (labeled) | Ordinal | Categories with a natural order, discrete, no necessarily meaningful intervals | Letter grades |
Categorical (labeled) | Nominal | Categories without a natural order, discrete | Music genres |
- Discrete: Number of items purchased in January
- Ordinal: Favorite cities
- Nominal: Last five cities visited
- Ratio: Land area of a country
- Interval: Temperature in Celsius
- Population: The entire group we are interested in
- Sample: A subset of the population (ideally representative and randomly selected)
- Population: All students in a school, number of snakes in the zoo
- Sample: Average of student grades in a classroom, opinion of visitors about the zoo
Bar plots can show Categorical (nominal or ordinal) and numerical (discrete) data. Rust file
Box-and-whisker plots can show numerical (interval or ratio) data. Rust file
Histograms can show numerical data, they are just like bar plots but categories are binned or bucketed. Rust file
Pie charts can show nominal, ordinal or discrete data representing a percentage of the whole for each category in a visual way since they are contained in a circle. There is a condition on data to be able to use pie charts, the data must sum up 1 (or 100%). Rust file
Lines can be used when we have many bars for the sake of simplicity and clarity (better resolution) or in-graph comparisons.