Types and Structures of Data
Data can represent categories, quantities, text, images, measurements, documents, signals, or events. Understanding its type and structure determines how it should be stored, analyzed, and interpreted.
What you will learn and create
This lesson introduces the major ways data is classified and organized.
Qualitative and quantitative data
Recognize whether a variable describes a category or measures a numerical quantity.
Data structure
Identify structured, semi-structured, and unstructured information.
Measurement scales
Explain how nominal, ordinal, interval, and ratio variables differ.
A data classification guide
Classify variables from a real-world dataset by type, structure, and measurement scale.
Variables carry different kinds of meaning
A variable is a characteristic recorded for an observation. Age, diagnosis, temperature, product category, travel time, and customer comments are all variables, but they do not represent information in the same way.
The type of a variable affects which summaries, visualizations, and analytical methods are appropriate. A category such as blood type should not be treated like a numerical measurement such as body temperature.
Core idea
Before analyzing a variable, determine what it means—not merely how it appears in a file.
Qualitative and quantitative data
Qualitative data
Qualitative data represents qualities, names, groups, labels, or categories.
- Blood type
- Department name
- Product category
- Diagnosis
- Customer feedback
Quantitative data
Quantitative data represents amounts, counts, measurements, or numerical values.
- Age
- Weight
- Temperature
- Number of purchases
- Travel time
Structured, semi-structured, and unstructured data
Structured data
Information organized into clearly defined rows, columns, fields, and data types. Examples include spreadsheets, relational databases, and transaction tables.
Semi-structured data
Information that does not follow a traditional table but contains labels, keys, tags, or markers that provide organization. Examples include JSON, XML, emails, and system logs.
Unstructured data
Information without a fixed row-and-column format. Examples include clinical notes, documents, photographs, medical images, audio recordings, and videos.
Four common measurement scales
Measurement scales describe the meaning and relationships contained within recorded values.
| Scale | Meaning | Example | Important property |
|---|---|---|---|
| Nominal | Names or categories | Blood type | No natural order |
| Ordinal | Ordered categories | Pain: mild, moderate, severe | Order exists, distance is uncertain |
| Interval | Equal numerical intervals | Temperature in Celsius | Zero does not mean absence |
| Ratio | Equal intervals with a true zero | Weight or duration | Ratios are meaningful |
Practice: Classify each variable
For each variable below, identify whether it is qualitative or quantitative and determine its likely measurement scale.
- Patient identification number
- Age in years
- Satisfaction rating: poor, fair, good, excellent
- Appointment date
- Diagnosis category
- Travel distance in miles
- Written clinical note
Create a data classification guide
Use the small dataset you created in Module 1 or choose another everyday dataset. Create a table with these columns:
| Variable | Meaning | Qualitative or quantitative | Measurement scale | Structure or format |
|---|---|---|---|---|
| Date | When the event occurred | Quantitative or temporal | Interval | Structured |
| Event type | Category of event | Qualitative | Nominal | Structured |
| Duration | Length of the event | Quantitative | Ratio | Structured |
Add at least five variables. For each one, explain why you selected that classification.
Questions to deepen your understanding
- Can a number function as a label rather than a measurement?
- Could the same variable be stored differently in two systems?
- What analytical mistakes could occur when an ordinal variable is treated as a precise numerical measurement?
- Why is unstructured data often more difficult to analyze?
Why data type matters in real work
Healthcare systems contain numerical measurements, diagnosis categories, medical images, clinical notes, timestamps, and signals. Business systems may contain transaction tables, customer comments, emails, product images, and activity logs.
Each type requires different methods for storage, preparation, visualization, and analysis. Correctly identifying data type is therefore one of the first responsibilities in any data science project.