Data Types, Types of Data

Joana Owusu-Appiah
5 min readAug 8, 2023

--

Data types and Types of Data? I might have considered both terms mere linguistic nuances some years ago. However, it’s important to note that data types and types of data hold distinct meanings. In this blog, we’ll embark on a journey to uncover these differences and explore their respective sub-categories. Keep reading and don’t miss out on the engaging activity awaiting you at the end.

Types of Data

In my previous article, “The Influence of Data on Decision Making,” I took a deep dive into the world of qualitative and quantitative data. But hold onto your seats, because today, we’re about to unlock the next level of understanding. Get ready to unravel the intriguing subtypes that lie within both the realms of quantitative and qualitative data!

designed by me in Draw.io

The types of Data are: Qualitative and Quantitative

As a recap,

Qualitative data is descriptive and provides a subjective assessment of an object. This type of data organizes objects into categories, which is why it is also called Categorical data. Examples include gender, marital status, groups of colors, and customer satisfaction levels (e.g., good, very good, bad, very bad). Categorical data can be further divided into two types: Nominal and Ordinal.

Nominal data

This categorical data has classes that have no meaningful order. Example Gender (male and female), marital status(single, married, divorced)

Ordinal data

On the other hand, ordinal data is categorical data with a meaningful order. It is often used for observations, but no arithmetic calculations can be performed on it. Examples include ranks (1st, 2nd, 3rd) and satisfaction levels (satisfied, very satisfied, not satisfied). The intervals between the various scales are usually unequal, making it difficult to determine the exact reference points between them. Gauging the impact of “satisfied” and “very satisfied” on a survey wouldn’t be fruitful because of the subjective nature of the comment, however, the order is important.

Moving on to Quantitative or numerical data, it objectively represents “how many,” “how often,” or “how much” of an object. Examples of quantitative data include height, weight, size, and length. This type of data can be further classified into two categories: Discrete and Continuous.

Discrete data

This type of data takes on a finite number of possible values. For instance, the number of students cannot be 1.5; it could either be 1 or 2. Discrete data does not have middle values.

Continuous data

Unlike discrete data, continuous data takes on an infinite number of probable values within a range. Examples include temperature on a scale and measuring distances.

why is it essential to know the type of data you’re working with?

As a data scientist, the kind of data you work with significantly impacts your choices in visualization, analysis, and interpretation. Hence, it is crucial to identify the kind of data you are dealing with.

Data Types

A data type refers to the value that a variable holds, affecting the operations that can be applied to it without encountering programming errors. These operations can be logical, mathematical, etc. Some common data types encountered throughout the data science process phases include:

Integers

Numeric data types for whole numbers without fractions, such as 7, 8, and 88.

x = 8

Floating-point

Numeric data types with fractions, like 6.7 and 9.0.

y = 9.0

Character

Represents single symbols and punctuation marks, such as ‘.’, ‘!’, ‘#’, and ‘$’.

String

A group of characters is always treated as text. ‘Names’, ‘1223’. You know it is a string variable when it is enclosed in quotation marks ( either double or single quotation marks)

series = 'Data Science Beginner Training'

Boolean

Boolean is the result of an operation that can take the form of only two values, True or false. Boolean logic considers and compares conditions applied on an operator and returns either a True or False.

5 > 3
operation in Google Colab Notebook

For example, there is a teenagers club and we would want to query the data based on some conditions, this is what the operators mean and the output they would return:

OR ( | ) — which returns a TRUE when either of the statements is TRUE and a false when both of the statements are false.

Girls OR Boys: would return all the girls and boys within the data

AND (&) — the AND operator returns a TRUE only when both statements are TRUE and False when otherwise

Girls AND below 15 years — would only return girls whose ages fall below 15

NOT (!) — the NOT operator takes a single input and negates it.

NOT Boys — will return all the girls

List

A list is a collection of things in the literal sense. In data science or programming a list contains other data types, enclosed in square brackets with the entries separated by commas. A typical list variable looks like this

carsList = ['Ford Raptor', 'BMW', 'Range Rover']

Dictionaries

A dictionary, like a list, is also used to store a collection of data types. The data is stored in a key: value pair. The key can be queried to output the values they are matched with. Dictionaries are enclosed in curly braces, the pairs are separated by commas and look like this…

CarsDictionary = { 'cars': 'raptor', 'colours':'purple', 'year': 2023}

Understanding data types ensures that data is collected in the preferred format and that the values are as expected. This understanding optimizes the data gathering and cleaning process.

Overall, being aware of the various types of data and their characteristics is crucial for conducting practical data analysis and drawing accurate conclusions.

Activity:

  1. Classify the following into Qualitative/ Quantitative and further classify them into nominal, ordinal, discrete, and continuous
  • Books in a library
  • eye color
  • heads in coin tosses
  • patients in a hospital
  • time
  • temperature
  • Nationality
  • Letters representing grades in an exam
  • Economic status

2. Check out the other articles in this series:

  • ‘Data’ Science and the Modern World
  • The Data Science Process — From the Perspective of a Junior Data Analyst

Resources:

  1. Influence of Data on Decision-Making
  2. Types of Data in Statistics
  3. 4 Types of Data
  4. What is a Data Type

--

--

Joana Owusu-Appiah
Joana Owusu-Appiah

Written by Joana Owusu-Appiah

Writer (because i write sometimes)| Learner (because I...) | Data Analyst (because ...) | BME Graduate | Basically documenting my Life!

No responses yet