Unit 9: Data Science and Data Gathering

Class 9 Computer Science · Punjab Board · Session 2026-27 · PECTAA syllabus

Data is all around us: marks in school, weather readings, online orders, and messages on a phone. Data science is the study of data — collecting it, cleaning it, studying it, and using it to find useful information and make better decisions. In this chapter we learn how data is gathered, how it is cleaned, and how charts and graphs help us understand it.

What is Data and Data Science?

Data means facts, numbers, words, images, or measurements that are collected and used to learn something. For example, a list of student marks, the daily temperature, and the number of books in a library are all data. Data science is the study of data. It includes collecting data, cleaning it, studying it, and using the results to find useful information and make better decisions. A school can use data to see which subjects need more help, a shop can use data to see which items sell most, and a hospital can use data to plan its work. Data science helps us move from guessing to deciding with evidence.

Data Gathering and Its Sources

Data gathering is the first step in data science. It means collecting data from different sources. Data can be gathered through surveys, which ask people a set of questions, and through interviews, where a person answers questions face to face. It can also be gathered by observation, by watching and recording what happens, and by sensors, which are devices that measure things such as temperature or movement. Data is also gathered from online sources, such as websites and forms, and from records, such as school registers and hospital records. Good data gathering needs a clear purpose, so we know what information we need and why.

Types of Data: Structured and Unstructured

Data comes in two main types. Structured data is organised in rows and columns, so it is easy to read, search, and use. A spreadsheet with student names and marks is structured data, and so is a table in a database. Unstructured data has no fixed format. Examples are photos, videos, voice recordings, emails, and social media posts. Both types are useful, but unstructured data is harder to organise and study because it does not fit neatly into rows and columns. Before data is used, it is often organised and cleaned so that it is correct and ready to study.

Data Cleaning

Data that is collected is not always ready to use. It may have errors, repeated entries, or missing values. Data cleaning is the process of finding and fixing these problems. For example, a name may be spelled in two different ways, a mark may be missing, or the same student may appear twice in a list. Cleaning means correcting mistakes, removing duplicates, and filling in or marking missing values. Clean data gives correct results. If the data is wrong, the result of the study will also be wrong, even if the method used is correct. This is why cleaning is done before data is studied.

Data Analysis and Data Visualisation

After data is cleaned, it is studied to find patterns and useful information. This study is called data analysis. The results are then shown in a way that is easy to understand, which is called data visualisation. Common charts are the bar chart, which compares values across categories; the pie chart, which shows parts of a whole; and the line graph, which shows how values change over time. For example, a bar chart can compare marks in different subjects, a pie chart can show the share of students in each class, and a line graph can show temperature over a week. A good chart has a clear title and labels so anyone can read it.

Using Data Responsibly

Data often belongs to people, so it must be handled with care. Personal information, such as names, addresses, and phone numbers, should be collected only with permission and kept private. Data should not be shared without a good reason, and it should not be used in a way that harms anyone. When a survey is made, the questions should be clear and fair, and people should not be forced to answer. Good data work is honest: results should be shown as they are, without hiding or changing them to suit a purpose.

Key definitions

TermDefinition
Data ScienceThe study of data: collecting it, cleaning it, studying it, and using it to find useful information and make better decisions.
DataFacts, numbers, words, images, or measurements that are collected and used to learn something or make a decision.
Data GatheringThe process of collecting facts and information from different sources, such as surveys, sensors, and websites.
Structured DataData that is arranged in rows and columns, such as a table or a spreadsheet, so it is easy to read and use.
Unstructured DataData that has no fixed format, such as text messages, photos, videos, and social media posts.
Data CleaningFinding and fixing errors, removing duplicates, and filling in missing values in data so that it is correct and ready to use.
Data VisualisationShowing data with charts and graphs, such as bar charts and pie charts, so that patterns and results are easy to understand.

Important points

  • Data science is about collecting, cleaning, studying, and using data to find useful information.
  • Data gathering is the first step: collecting data from different sources.
  • Data can come from surveys, interviews, observations, sensors, and online sources.
  • Structured data is organised in rows and columns, such as a spreadsheet.
  • Unstructured data has no fixed format, such as photos, videos, and text messages.
  • Data cleaning means fixing errors, removing duplicates, and filling missing values.
  • A bar chart is used to compare values across categories.
  • A pie chart shows parts of a whole, as percentages or shares.
  • A line graph shows how values change over time.
  • Data should be collected with permission and kept private where needed.
  • A survey is a set of questions used to collect information from people.
  • Wrong or dirty data can lead to wrong results and wrong decisions.
  • Data visualisation makes patterns and results easy to see and understand.
  • A spreadsheet is a common tool for storing and working with structured data.

MCQs — test yourself

1. What is data science?

  1. Only writing computer programs
  2. Collecting, cleaning, studying, and using data
  3. Only building websites
  4. Repairing computers
Show answer

Answer: B — Collecting, cleaning, studying, and using data. Data science is about collecting, cleaning, studying, and using data to find useful information.

2. What is data gathering?

  1. Collecting data from different sources
  2. Drawing a chart
  3. Cleaning a spreadsheet
  4. Deleting old data
Show answer

Answer: A — Collecting data from different sources. Data gathering is the process of collecting facts and information from sources.

3. Which of the following is structured data?

  1. A photo
  2. A video
  3. A text message
  4. A table with rows and columns
Show answer

Answer: D — A table with rows and columns. Structured data is organised in rows and columns, like a table or spreadsheet.

4. Which of the following is unstructured data?

  1. A spreadsheet
  2. A table in a database
  3. A photo or video
  4. A marks register
Show answer

Answer: C — A photo or video. Photos, videos, and messages have no fixed row-and-column format, so they are unstructured.

5. What is data cleaning?

  1. Collecting new data
  2. Fixing errors and removing duplicates in data
  3. Drawing a pie chart
  4. Sharing data online
Show answer

Answer: B — Fixing errors and removing duplicates in data. Data cleaning fixes errors, removes duplicates, and fills in missing values.

6. A bar chart is used to:

  1. To show parts of a whole
  2. To show change over time
  3. To compare values across categories
  4. To store data in a table
Show answer

Answer: C — To compare values across categories. A bar chart compares values across different categories, such as marks in different subjects.

7. A pie chart is used to show:

  1. Parts of a whole
  2. Change over time
  3. Exact numbers in a table
  4. The largest value only
Show answer

Answer: A — Parts of a whole. A pie chart shows each part as a share of the whole, often as a percentage.

8. Which chart is best to show how temperature changes over a week?

  1. Parts of a whole
  2. Comparing categories
  3. Storing data
  4. Change over time
Show answer

Answer: D — Change over time. A line graph shows how a value changes over time, such as temperature over a week.

9. What is a survey?

  1. A chart
  2. A set of questions used to collect information
  3. A type of graph
  4. A data cleaning tool
Show answer

Answer: B — A set of questions used to collect information. A survey collects information by asking a set of questions to people.

10. Why is data cleaning important?

  1. It can lead to wrong results and decisions
  2. It makes charts look colourful
  3. It makes data bigger
  4. It protects privacy
Show answer

Answer: A — It can lead to wrong results and decisions. Dirty or wrong data leads to wrong results, so cleaning is needed before analysis.

Short questions

1. What is data science? Give one example of its use.

Data science is the study of data: collecting it, cleaning it, studying it, and using it to find useful information and make better decisions. For example, a school can use data to see which subjects need more help.

2. What is data gathering? Name any three sources of data.

Data gathering is the process of collecting facts and information from different sources. Common sources are surveys, interviews, observation, sensors, online forms, and records such as school registers.

3. What is the difference between structured and unstructured data? Give one example of each.

Structured data is organised in rows and columns, such as a spreadsheet of student marks. Unstructured data has no fixed format, such as photos, videos, and text messages.

4. What is data cleaning? Why is it important?

Data cleaning is the process of finding and fixing errors in data, removing duplicate entries, and dealing with missing values. It is important because wrong data leads to wrong results and wrong decisions.

5. Name three types of charts and state what each one is used for.

A bar chart compares values across categories, such as marks in different subjects. A pie chart shows parts of a whole, such as the share of students in each class. A line graph shows how values change over time, such as temperature over a week.

Summary

Data science is about collecting, cleaning, studying, and using data to make better decisions. Data is gathered from surveys, interviews, observation, sensors, and online sources. Structured data fits in rows and columns, while unstructured data, such as photos and videos, does not. After cleaning, data is studied and shown with charts such as bar charts, pie charts, and line graphs, and personal data must always be handled with care.

← Back to Class 9 Computer Science chapter list