Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

Unit 1 — Types of Data

Lesson 3 of 46 in the free Introduction to Data Analytics notes on Siksha Sarovar, written by Rohit Jangra.

Types of Data

Data is classified along several independent axes. Every axis matters, because the type of data decides which statistical measure and which chart is valid. Using a mean on nominal data or a pie chart on continuous data is a classic mistake.

1. Classification by Structure

TypeDescriptionStorageExamplesShare of world data
StructuredFixed schema; organised in rows and columnsRelational databases (SQL), spreadsheetsBank transactions, student records, sensor logs~20%
Semi-structuredHas tags/markers giving partial structure but no rigid schemaNoSQL, filesJSON, XML, emails, log files~10%
UnstructuredNo predefined model or organisationData lakes, object storageImages, video, audio, free text, social media posts~70–80%
# STRUCTURED — every record has the same fields
students = [
    {"roll": 101, "name": "Riya",  "marks": 88},
    {"roll": 102, "name": "Zoya",  "marks": 76},
]

# SEMI-STRUCTURED — JSON: self-describing, but records may differ
order = {
    "id": "ORD-9012",
    "items": [{"sku": "A1", "qty": 2}, {"sku": "B7", "qty": 1}],
    "gift_wrap": True          # this key may be absent in other orders
}

# UNSTRUCTURED — free text; no fields at all
review = "Delivery was quick but the packaging was torn on one side."

2. Classification by Nature

Qualitative (Categorical) data describes qualities or categories — it labels rather than measures.

Quantitative (Numerical) data describes quantities — it can be counted or measured, and arithmetic on it is meaningful.

QualitativeQuantitative
Also calledCategoricalNumerical
Answers"What kind?""How much / how many?"
Arithmetic valid?NoYes
Sub-typesNominal, OrdinalDiscrete, Continuous
ExamplesGender, blood group, city, courseAge, marks, salary, temperature
Typical chartsBar chart, pie chartHistogram, box plot, line chart

Discrete vs Continuous:

DiscreteContinuous
ValuesCountable, whole, finite gaps between valuesAny value in a range, infinitely divisible
Obtained byCountingMeasuring
ExamplesNumber of students, cars sold, defects foundHeight, weight, time, temperature
Can be fractional?No (2.5 students is meaningless)Yes (2.5 kg is meaningful)

3. Classification by Measurement Scale — NOIR

This is the most examined classification. Remember the mnemonic NOIR: Nominal, Ordinal, Interval, Ratio.

ScaleOrder?Equal intervals?True zero?Valid operationsExamples
Nominal=, ≠, counting, modeGender, blood group, PIN code, religion
OrdinalAbove + <, >, median, percentileRanks (1st/2nd), Likert scale, grades A/B/C
IntervalAbove + +, −, mean, SDTemperature in °C/°F, calendar dates, IQ score
RatioAbove + ×, ÷, all statisticsHeight, weight, income, age, marks, distance

Why "true zero" matters: 40 °C is not "twice as hot" as 20 °C, because 0 °C is an arbitrary reference point, not an absence of temperature — so temperature in Celsius is interval. But ₹40,000 is exactly twice ₹20,000, because ₹0 means genuinely no money — so income is ratio.

import pandas as pd

df = pd.DataFrame({
    "student":   ["Riya", "Zoya", "Kabir", "Aarav"],   # Nominal
    "grade":     ["A", "B", "A", "C"],                 # Ordinal
    "temp_c":    [36.8, 37.2, 36.5, 38.1],             # Interval
    "marks":     [88, 76, 91, 54],                     # Ratio
})

print(df["student"].mode()[0])   # nominal -> mode only
print(df["grade"].value_counts()) # ordinal -> counts/median rank
print(df["marks"].mean())         # ratio -> mean is valid: 77.25
# df["student"].mean()  ->  MEANINGLESS: never average a nominal column

4. Classification by Source

TypeMeaningCollected byCost & timeExamples
Primary dataCollected first-hand for the current problemThe analyst/researcher themselvesHighSurveys, interviews, experiments, observations, sensor readings
Secondary dataAlready collected by someone else, reusedThird partyLowCensus reports, Kaggle datasets, government open data, company archives

5. Other Important Data Types in Analytics

TypeDescriptionExample
Time-series dataObservations indexed in time orderDaily stock prices, hourly temperature
Cross-sectional dataMany subjects observed at a single point in timeMarks of all students in one exam
Panel (longitudinal) dataMany subjects observed over multiple time pointsYearly income of 500 families over 10 years
Spatial / geospatial dataData tied to geographic locationGPS traces, delivery heat maps
Metadata"Data about data"Image resolution, file creation date, column data types
Big dataVolume/velocity/variety beyond conventional toolsSocial media firehose, IoT sensor streams (Unit 4)

Choosing Techniques by Data Type

Data typeValid central tendencyTypical visualizationTypical model (Unit 3)
NominalModeBar chart, pie chartClassification
OrdinalMode, medianOrdered bar chartClassification / ordinal regression
IntervalMode, median, meanHistogram, line chartRegression
RatioAll, plus geometric meanHistogram, box plot, scatterRegression, clustering

Getting this classification right in the first lesson of a project saves an enormous amount of rework later — it determines your cleaning strategy (Unit 1), your summary statistics and charts (Unit 2), and even which algorithm can legally consume the column (Unit 3).