2.1: Data Types
- Page ID
- 48024
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\dsum}{\displaystyle\sum\limits} \)
\( \newcommand{\dint}{\displaystyle\int\limits} \)
\( \newcommand{\dlim}{\displaystyle\lim\limits} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\(\newcommand{\longvect}{\overrightarrow}\)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\ket}[1]{\left| #1 \right>}\)
\(\newcommand{\bra}[1]{\left< #1 \right|}\)
\(\newcommand{\braket}[2]{\left< #1 \vphantom{#2} \right| \left. #2 \vphantom{#1} \right>}\)
\(\newcommand{\braopket}[3]{\left< #1 \vphantom{#2}\vphantom{#3} \right| #2 \vphantom{#1}\vphantom{#3} \left| #3 \vphantom{#1}\vphantom{#2} \right>}\)
\(\newcommand{\qmvec}[1]{\mathbf{\vec{#1}}}\)
\(\newcommand{\op}[1]{\hat{\mathbf{#1}}}\)
\(\newcommand{\expect}[1]{\langle #1 \rangle}\)
\(\newcommand{\dfn}[1]{\emph{\textbf{#1}}}\)
Data Types
Given that data comes in many forms and classifications, understanding data types is essential for choosing appropriate analysis methods and tools. In this section, we define major categories of data: structured, semi-structured, and unstructured data (based on format and schema), quantitative vs. qualitative data (based on content and measurement), and the levels of measurement (nominal, ordinal, interval, ratio) used in statistics. Clear definitions and examples are provided for each category.
2.1.1 Structured, Semi-Structured, and Unstructured Data
Structured data refers to information that is organized in a fixed schema or format, making it easily searchable and analyzable by computers and humans. Structured data is typically arranged in tabular forms (rows and columns) such as relational databases or spreadsheets [1].
For example, a table of customer records with columns for Name, Phone Number, and Purchase Amount is structured data. Because of its predefined model, structured data can be efficiently queried using languages like SQL and processed by traditional analytics tools. Common examples include financial transaction records, inventory databases, and sensor readings that fit a fixed format.
Unstructured data, by contrast, has no predefined schema or inherent tabular structure. It is often text-heavy or multimedia data that does not fit neatly into relational tables. Examples of unstructured data include free-text documents, social media posts, emails, images, audio files, and video recordings. Such data holds rich information but is more complex to parse and analyze, often requiring advanced tools (e.g. natural language processing for text, computer vision for images) to extract insights. Notably, unstructured data constitutes an estimated 80–90% of data in organizations, especially with the rise of big data sources like social media and IoT device streams. Despite lacking formal structure, unstructured data can contain both qualitative information (e.g. text comments) and quantitative information embedded within (e.g. numbers in a report).
Semi-Structured data falls between these two extremes. It does not conform to a rigid tabular schema, yet it contains organizational markings (tags or hierarchies) that provide some structure. Examples include data formatted in JSON or XML, where tags and nesting impose a hierarchical structure on the data elements, and CSV files, where delimiter-separated values provide a simple structure. Email is a classic example of semi-structured data: each email has structured header fields (sender, recipient, timestamp) but an unstructured message body. Semi-structured data uses metadata (e.g. keys or tags) to label elements, making it more easily searchable than pure unstructured data. Many web-scraped datasets are semi-structured; for instance, an HTML page has a tree-like DOM structure with tags, even if the text content is unstructured. Semi-structured data is often stored in non-relational databases or data lakes which can accommodate flexible schemas.
In practice, organizations deal with all three types. For example, a healthcare provider has structured data in patient databases (billing codes, lab results), semi-structured data in the form of medical device outputs or JSON-formatted health sensor feeds, and unstructured data such as physician notes or medical imaging files. Each type requires different processing: structured data yields readily to SQL queries and traditional statistics, while unstructured data demands preprocessing (like text mining or image processing) to become analyzable. Choosing appropriate tools for each data type is a fundamental skill in data analytics. Table 2.1 below summarizes the key differences:

Why this matters: The classification of data as structured, semi-structured, or unstructured has practical implications. Structured data is efficient for storage and querying but can be limiting in the richness of information captured (often quantitative or categorical information). Unstructured data is information-rich (think of the insights in millions of customer product reviews or in satellite images) but requires significant processing to analyze. Semi-structured data often serves as a compromise, retaining flexibility while imposing some order [4]. Modern data analytics and big data platforms (like Hadoop or NoSQL databases) are designed to handle semi-structured and unstructured data at scale. For example, a social media analytics project might store tweets (unstructured text) and metadata about the tweets (semi-structured JSON) in a data lake for sentiment analysis. Analysts and data engineers need to recognize data types to choose appropriate storage (relational database vs. data lake), processing techniques, and quality checks.
2.1.2 Quantitative vs. Qualitative Data
Another fundamental way to classify data is by whether it is quantitative or qualitative in nature. This distinction focuses on the content and measurement of the data rather than its format.
-
Quantitative data refers to data that represents quantities or numerical measures. These data are expressed in numbers and arise from counting or measuring attributes. Examples include a person's age in years, the revenue of a company, the number of clicks on a website, or the temperature recorded by a sensor. Quantitative data can be discrete (taking integer values, such as count of customers) or continuous (any value in a range, such as temperature or height). Because of their numeric nature, quantitative data lend themselves to statistical analysis, mathematical operations, and visualization in charts. In an analytics context, quantitative data answers questions like "how many?", "how much?", or "how often?".
-
Qualitative data refers to data that represent categories, labels, or qualities and are not inherently numeric. This is sometimes called categorical data. Qualitative data describe attributes or properties such as names, types, or classifications. Examples: customer satisfaction level (e.g. "satisfied", "neutral", "dissatisfied"), a person's blood type (A, B, AB, O), product categories (electronics, clothing, groceries), or free-text responses to a survey. Even if numbers are used as labels (e.g., coding "1" for male and "2" for female in a dataset), the data can be qualitative because the numbers are arbitrary labels, not numerical measures. Qualitative data addresses questions like "what type?", "which category?", or "what kind?".
It is important to recognize whether a variable is quantitative or qualitative before analysis, because this affects what statistical methods or visualizations are appropriate. For instance, calculating an average only makes sense for quantitative data, not for qualitative categories like eye color or product type. Sometimes the same phenomenon can be captured in both forms: e.g. weather can be recorded qualitatively as "rainy/sunny/cloudy" or quantitatively as inches of rainfall.
Example: Consider data about a car: the make and model of the car is qualitative (categorical), while the price and engine horsepower are quantitative. In a healthcare scenario, a patient's diagnosis is qualitative (a category like diabetes, hypertension, etc.), whereas their blood pressure reading is quantitative. In education, a student major (e.g., Biology, History) is qualitative, but GPA is quantitative.
Often, qualitative and quantitative data are used together to provide a fuller picture. For example, a survey might collect a quantitative rating (e.g., 1–5 stars) alongside a qualitative comment from each respondent. In data analytics, combining these can be powerful: the quantitative ratings can be summarized statistically, while qualitative comments can be text-mined for themes. Indeed, research methods like mixed-methods analysis explicitly integrate qualitative and quantitative data to enrich insights.
2.1.3 Levels of Measurement: Nominal, Ordinal, Interval, Ratio
When dealing with data (especially quantitative or categorical data), it's useful to know the level of measurement of the variable. The classic framework (proposed by psychologist S.S. Stevens) defines four levels: nominal, ordinal, interval, and ratio. These describe how data values can be categorized and what mathematical operations make sense on them. The levels build from least to most quantitative:
-
Nominal level: Data can only be categorized into distinct groups, with no inherent order. Nominal data are purely qualitative labels. Examples: gender, nationality, blood type, product ID, or job title. There is no logical ranking to these categories (for instance, "Brazil" is not higher or lower than "Canada"; they are just different categories). With nominal data, you can count frequencies (how many of each category) or mode (most common category), but cannot sort or do arithmetic. Binary data (e.g. 0/1, true/false) is a special case of nominal data (two categories).
-
Ordinal level: Data can be categorized and ranked in a meaningful order, but the differences between ranks are not equal or quantified. Ordinal data often appears as scaled ratings or ordered categories.
Examples: survey responses like poor < fair < good < excellent are ordinal, as are military ranks or class standings (freshman, sophomore, etc.). We know the order (excellent is better than good) but the intervals between are not consistent or known. For ordinal data, one can use median or percentile and non-parametric statistics, but mean or standard deviation may not be meaningful because numeric differences are not uniform. -
Interval level: Data can be categorized and ranked, and the intervals between values are equal and meaningful, but there is no true zero point. This is quantitative data on a scale with consistent differences.
Classic example: temperature in Celsius or Fahrenheit – the difference between 20°C and 30°C is the same interval as between 30°C and 40°C (10 degrees), which makes sense; however, 0°C is not an absolute zero of "no temperature" (it is arbitrary, as 0°C is the freezing point of water). Interval data allows addition and subtraction operations. We can compute mean temperature, for instance, but since there’s no true zero, ratios are not meaningful (40°C is not "twice as hot" as 20°C in an absolute sense). -
Ratio level: This is the most informative level – data can be categorized, ordered, with equal intervals, and has a true zero point. Most continuous quantitative data fall here.
Examples: mass, length, time duration, financial values. A true zero means none of the quantity (e.g., $0 revenue means no revenue, 0 kg means no weight). All mathematical operations make sense – you can compare differences and also ratios ("€100 is twice €50" is meaningful). Ratio data supports the full range of descriptive and inferential statistical techniques.
In summary, each level up retains properties of the previous and adds more: nominal (distinct categories only) < ordinal (+order) < interval (+equal intervals) < ratio (+absolute zero).

Knowing the level of measurement guides the choice of statistical methods. For instance, calculating a mean or standard deviation is appropriate for interval/ratio data but not for nominal data; using a nonparametric test might be necessary for ordinal data.
Examples to illustrate: In business analytics, consider customer satisfaction data: - If categorized as "satisfied/unsatisfied," that's nominal. - If rated as "low, medium, high," that's ordinal. - If scored on a 0–100 scale, that could be an interval (assuming no true zero for satisfaction). - If measuring something such as, number of purchases, that would be a ratio (0 purchases is none, and 4 purchases is twice 2 purchases) classification.
In a hospital, patient diagnoses (disease categories) are nominal, pain severity rated 1-10 is ordinal, temperature in °C is interval, and blood concentration levels (e.g., glucose mg/dL) are ratio. Each type demands appropriate handling – e.g., you might compute average blood glucose (ratio data), but you would not compute an "average diagnosis". Instead, you'd report the count or percentage of each diagnosis category.
Understanding these fundamental data type distinctions ensures that analysts apply valid techniques and correctly interpret results. Using a wrong assumption (like treating ordinal survey data as numeric and averaging it) can lead to misleading conclusions.


