Hiring Partners
Segilola Resources Operating LimitedTaviatech TechnologiesFCMBMTN NigeriaAdvans La Fayette Microfinance BankAboki AfricaFirst Bank of NigeriaOPay
← AI-Powered Data Analytics · Lesson 3 of 9

Module Two

📖 Every lesson in this course is free to read right here, no account needed. Create a free account to track your progress, take the exam, and earn your certificate.
3
Module 2: Collecting and Cleaning Data · AI for Kids

📥 Module 2: Collecting and Cleaning Data – The Detective’s First Step

🔍 How to gather good information and make it sparkly clean for AI!

🧭 Module Introduction

Hello, young detective! In Module 1, we learned that data is information, and AI is a computer that learns from data. But where does data come from? And what if the data is messy – like a room full of toys thrown everywhere?

In this module, we will become data collectors and data cleaners. We will learn how to gather information carefully and how to clean it so that AI can understand it perfectly. Just like a chef washes and chops vegetables before cooking, we must clean data before giving it to AI.

By the end, you will know how to collect data from your school, home, and community, and you will be able to remove mistakes – making your data ready for AI to use!

🎯 Learning Objectives

After this module, you will be able to:

  • ✅ Explain what data collection means.
  • ✅ Name three ways to collect data (surveys, observation, sensors).
  • ✅ Describe why clean data is important.
  • ✅ Identify common data problems (missing values, duplicates, wrong formats).
  • ✅ Apply simple cleaning steps (fix spelling, remove blanks, standardise).
  • ✅ Give Nigerian examples of data collection and cleaning.
  • ✅ Draw a simple flowchart of the data cleaning process.

📖 Warm‑up Story: The Mixed‑Up Market

In a busy market in Onitsha, Mama Ngozi sold oranges. She wrote down her sales every day in a notebook. But her handwriting was messy – some numbers were missing, and she wrote “50” as “5O” (with a letter O instead of zero).

Her son, Chinonso, wanted to help her know which day sold the most oranges. He looked at the notebook and said: “Mummy, this data is dirty! We need to clean it.”

Together, they fixed the mistakes: they replaced “5O” with “50”, filled in missing days, and wrote everything neatly. Now they could see clearly that Saturdays sold the most oranges. Mama Ngozi started ordering more oranges on Fridays, and she made more money!

Chinonso cleaned the data – and that’s exactly what we will learn to do!

📚 Main Lessons

📘 Lesson 1: What is Data Collection?

Data collection is the process of gathering information. It’s like being a detective and gathering clues. You can collect data by asking questions, watching, or using machines.

School example: Your teacher asks everyone in class what their favourite subject is. She is collecting data.

Home example: You count how many pairs of shoes your family has. That’s collecting data.

Nigerian example: A hospital records the number of patients who come each day. That’s data collection.

📋 Ways to collect data:
+------------------+
| Ask people       |  (surveys, interviews)
| Watch and record |  (observation)
| Use sensors      |  (thermometers, cameras)
+------------------+

Mini summary: Data collection = gathering information from the world around us.

📘 Lesson 2: Surveys – Asking People

A survey is when you ask people questions and write down their answers. It’s a very common way to collect data.

Real-life: Before a new movie is released, companies ask people: “What kind of movie do you like?”

Nigerian: A school in Kano asks parents: “What time is best for parent‑teacher meetings?”

📝 Survey Example:
Question: What is your favourite fruit?
Answers: Apple, Banana, Orange, Mango

Mini summary: Surveys = asking questions to get answers (data).

📘 Lesson 3: Observation – Watching and Recording

Observation means watching something carefully and writing down what you see. No questions, just watching.

Fun: You watch the birds in your garden and count how many come to the feeder each morning.

Nigerian: A farmer watches the sky to see if it rains, and writes down the rainfall each day.

👀 Observation Log:
Day 1: 10 birds
Day 2: 12 birds
Day 3: 8 birds

Mini summary: Observation = watching and recording without asking questions.

📘 Lesson 4: Sensors – Machines that Collect Data

Sensors are devices that automatically collect data – like thermometers, cameras, or even your phone’s step counter.

Home: Your smartwatch counts your steps. That’s a sensor.

Nigerian: Some farms use soil sensors to check if the ground is dry and needs watering.

📡 Sensor data:
Temperature: 32°C
Humidity: 70%
Soil moisture: 40%

Mini summary: Sensors are machines that collect data automatically.

📘 Lesson 5: What is Dirty Data?

Dirty data is data that has mistakes – like missing numbers, spelling errors, or wrong formats. It’s like a puzzle with missing pieces.

Type of dirty dataExample
Missing valuesAge: _____
Spelling errors“Lagos” written as “Lagosss”
Wrong format“10” written as “ten”
DuplicatesSame name appears twice

Mini summary: Dirty data has mistakes; we must clean it.

📘 Lesson 6: Why Clean Data is Important

If we give dirty data to AI, it will make mistakes – like using a bad recipe to bake a cake. Clean data helps AI give correct answers.

Dirty data ➜ AI makes errors ❌
Clean data  ➜ AI is smart ✅

Mini summary: Clean data = correct predictions. Dirty data = wrong predictions.

📘 Lesson 7: How to Clean Data – Step 1: Find Mistakes

The first step is to look at your data and find problems. Look for missing values, spelling mistakes, and duplicates.

School: Your class list has “Ahmad” written twice. That’s a duplicate.

Home: Your shopping list has “milk” and “MILK” – they are the same but written differently.

🔍 Finding mistakes:
1. Scan each row
2. Look for blanks
3. Check spelling
4. Remove repeats

📘 Lesson 8: How to Clean Data – Step 2: Fix Spelling and Formats

Make sure all words are spelled the same way. Use one format for everything – e.g., always write “10” not “ten”.

Before: "Lagos", "lagos", "LAGOS"
After:  "Lagos"  (all the same)

Mini summary: Standardise spelling and formats.

📘 Lesson 9: How to Clean Data – Step 3: Handle Missing Values

If some data is missing, you can either remove that row, or fill in a sensible guess (like the average).

Missing age:  ____
Option: remove the row or fill with average age (e.g., 12)

Mini summary: Deal with missing data by removing or filling.

📘 Lesson 10: How to Clean Data – Step 4: Remove Duplicates

If the same piece of data appears twice, delete the extra one. Keep only one copy.

Names: Amina, Ade, Amina, Bola
After cleaning: Amina, Ade, Bola

Mini summary: Duplicates = keep only one.

📘 Lesson 11: Data Collection in Nigeria – Examples

  • Agriculture: Farmers collect data on crop yields, rainfall, and pests.
  • Health: Hospitals record patient data to track diseases like malaria.
  • Transport: Data on traffic patterns helps improve roads in Lagos.
🇳🇬 Nigerian Data Collection
+------------------+------------------+
| Sector           | Data collected   |
+------------------+------------------+
| Farming          | Rainfall, harvest|
| Health           | Patients, illness|
| Education        | Test scores      |
+------------------+------------------+

📘 Lesson 12: Tools for Cleaning Data

You can clean data using simple tools like spreadsheets (Excel) or special software. For now, we can do it by hand for small data.

Fun: Imagine you have a box of mixed beans and you separate the black beans from the white beans – that’s cleaning!

📘 Lesson 13: The Data Cleaning Cycle

Data cleaning is not a one‑time job. You may need to clean data again if you add new information. It’s like sweeping the floor – you do it regularly.

Collect ➜ Clean ➜ Use ➜ Collect more ➜ Clean again

📘 Lesson 14: Being Honest with Data

When you collect and clean data, you must be honest. Don’t change numbers to make them look better. Always tell the truth.

Mini summary: Honesty is very important in data work.

📘 Lesson 15: Practice – Clean This Data!

Try cleaning this list: “Age: 10, 12, ten, 15, 12”. Fix it so all are numbers.

Answer: 10, 12, 10, 15, 12  (write "ten" as 10)

📖 Key Vocabulary (with simple definitions)

  • Data collection – gathering information.
  • Survey – asking questions to collect data.
  • Observation – watching and recording.
  • Sensor – a device that collects data automatically.
  • Dirty data – data with mistakes.
  • Clean data – data that is correct and ready to use.
  • Duplicate – an extra copy of the same data.
  • Missing value – a blank where data should be.

🧠 Important Concepts

  • Data comes from many places: people, observations, and machines.
  • Dirty data is common: almost every dataset has mistakes.
  • Cleaning takes time: but it is essential for good AI.
  • Honesty matters: never fake data.
  • Clean data = trustworthy answers.

🪜 Step-by-Step: Data Cleaning Process

  1. Collect your data (survey, observation, or sensor).
  2. Examine the data – look for missing spots, errors, or repeats.
  3. Fix spelling and make formats the same.
  4. Handle missing values (remove or fill).
  5. Remove duplicates (keep only one copy).
  6. Double‑check your work – is it clean now?
  7. Save the clean data for AI to use.

🌍 Real‑life Examples

  • Weather forecast: Data from weather stations is cleaned before making predictions.
  • E‑commerce: Online shops clean customer addresses to deliver packages correctly.
  • Healthcare: Hospitals clean patient records to avoid giving wrong medicines.

🇳🇬 Nigerian Examples

  • Agriculture: Farmers in Kaduna collect data on rainfall and clean it to know the best planting time.
  • Schools: Teachers collect test scores and clean the data to see which subjects need more teaching.
  • Market traders: They collect daily sales data and clean it to know which goods sell fastest.

🎈 Fun Examples children can relate to

  • Card collection: You collect football cards – some are repeated (duplicates), you remove them.
  • Sticker book: You collect stickers, some are missing (missing data), you try to get them.
  • Video game: You keep track of your high scores – if you write “20” as “2O” (with letter O), you fix it.

🏠 Everyday Examples

  • Morning: You count how many eggs are in the fridge – that’s collecting data.
  • Afternoon: You notice some eggs are cracked – you remove them (cleaning).
  • Evening: You tell your mum the number of good eggs – that’s clean data.

👩‍🏫 Teacher Notes

  • Encourage students to bring examples of data they have collected.
  • Use hands‑on activities like cleaning a “dirty” dataset on the board.
  • Emphasise that cleaning is a normal and important step – not a boring chore.

👨‍👩‍👦 Parent Tips

  • Help your child collect data around the house – e.g., weekly grocery spending.
  • Practice cleaning: find errors in a simple list and fix them together.
  • Talk about honesty in data – why it’s bad to make up numbers.

✨ Interesting Facts

  • 🌍 Data scientists spend 80% of their time cleaning data!
  • 🧹 Dirty data costs businesses billions of dollars every year.
  • 📱 Your phone’s autocorrect is a form of cleaning – it fixes your spelling mistakes.

💡 Did You Know?

  • Did you know that NASA cleans space data to make sure rocket launches are safe?
  • Did you know that some Nigerian startups use AI to clean data about traffic in Lagos?

🧩 Remember This

  • Collect data carefully – garbage in, garbage out.
  • Clean data is the secret to smart AI.
  • Always check for missing values and duplicates.

❌ Common Mistakes

  • Mistake: Forgetting to check for duplicates.
  • Mistake: Changing data to make it look better (dishonest).
  • Mistake: Not fixing spelling – e.g., leaving “Lagos” and “Lagosss”.

✅ Best Practices

  • Always check your data for errors before using it.
  • Keep a copy of the original (dirty) data in case you need it.
  • Use consistent formats (e.g., all names capitalised).
  • Document what changes you made (so you can explain).

🖼️ ASCII Diagrams & Flowcharts

📊 The Data Cleaning Flowchart
+------------------+
| Collect Data     |
+--------+---------+
         |
         V
+------------------+
| Find Mistakes    |  (missing, duplicates, spelling)
+--------+---------+
         |
         V
+------------------+
| Fix Mistakes     |
+--------+---------+
         |
         V
+------------------+
| Clean Data Ready |
+------------------+
🔍 Dirty vs Clean Data
Dirty Data:
Name     Age    City
Amina    10     Lagos
Ade      12     lagos
Amina    10     Lagos
Ade      12     (missing city)

Clean Data:
Name     Age    City
Amina    10     Lagos
Ade      12     Lagos

📊 Comparison Tables

Dirty DataClean Data
Has missing valuesAll values filled
Spelling errorsSpelling corrected
DuplicatesDuplicates removed
Wrong formatsStandard formats

📝 End‑of‑Module Summary

  • Data collection is how we gather information – by surveys, observation, or sensors.
  • Dirty data has mistakes: missing values, duplicates, spelling errors.
  • Cleaning means fixing these mistakes so AI can work well.
  • We clean data by: finding errors, fixing spelling, handling missing values, and removing duplicates.
  • In Nigeria, data is collected in farming, health, and education, and it must be cleaned.
  • Always be honest and careful when working with data.

❓ Frequently Asked Questions

Q1: What is data collection?

A1: Data collection means gathering information from the world.

Q2: Why do we need to clean data?

A2: So that AI can learn correctly and not make mistakes.

Q3: What are common data problems?

A3: Missing values, duplicates, spelling errors, and wrong formats.

Q4: How do we fix missing values?

A4: We can remove that row or fill it with a sensible guess.

Q5: What is a duplicate?

A5: When the same data appears more than once.

Q6: Can we clean data without a computer?

A6: Yes, we can clean small data by hand using a table.

Q7: Why is honesty important in data cleaning?

A7: Because faking data leads to wrong decisions.

Q8: How do sensors collect data?

A8: Sensors automatically measure things like temperature or steps.

Q9: What is a survey?

A9: A survey is a set of questions you ask people to collect data.

Q10: How does clean data help farmers?

A10: It helps them know when to plant and how much to water.

🔍 Review Questions

  1. What is data collection?
  2. Give three ways to collect data.
  3. What is dirty data?
  4. Why is cleaning data important?
  5. What is a missing value?
  6. What is a duplicate?
  7. How do you fix a spelling error in data?
  8. Name one Nigerian example of data collection.
  9. What is a sensor?
  10. What should you do with duplicates?
  11. What is a survey?
  12. How do you handle missing data?
  13. Why do we keep a copy of the original data?
  14. What is the first step in cleaning data?
  15. Can AI work with dirty data?

✏️ Fill‑in‑the‑Blank

  1. Data collection means gathering _______________.
  2. Dirty data has _______________, duplicates, and spelling errors.
  3. To clean data, we must _______________ mistakes.
  4. A _______________ is a device that collects data automatically.
  5. When the same data appears twice, we call it a _______________.

✔️ True or False

  1. Dirty data is perfect for AI. (False)
  2. We can collect data by watching and recording. (True)
  3. Duplicates are good because they give more data. (False)
  4. We should never change data to make it look better. (True)
  5. Sensors are only used in space. (False)

📝 Multiple Choice Questions

  1. What is data collection?
    A) Playing games B) Gathering information C) Eating D) Sleeping
    Answer: B
  2. Which is a way to collect data?
    A) Survey B) Observation C) Sensor D) All of the above
    Answer: D
  3. What is dirty data?
    A) Clean data B) Data with mistakes C) Data with only numbers D) Data from Nigeria
    Answer: B
  4. Why do we clean data?
    A) To make it look nice B) So AI can learn correctly C) To delete it D) To hide mistakes
    Answer: B
  5. What is a missing value?
    A) A number B) A blank where data should be C) A word D) A sensor
    Answer: B
  6. What is a duplicate?
    A) A new piece of data B) A repeated piece of data C) A missing piece D) A wrong format
    Answer: B
  7. How do you fix “Lagos” and “lagos”?
    A) Delete both B) Make them the same (Lagos) C) Change to Abuja D) Ignore
    Answer: B
  8. What is a sensor?
    A) A person B) A device that collects data C) A question D) A school
    Answer: B
  9. Which is a Nigerian example of data collection?
    A) Collecting rainfall data B) Counting stars C) Playing football D) Singing
    Answer: A
  10. What should you do with a duplicate?
    A) Keep both B) Remove one C) Change it D) Ignore it
    Answer: B
  11. What is a survey?
    A) A machine B) A set of questions C) A type of food D) A game
    Answer: B
  12. How do you handle missing data?
    A) Remove or fill B) Add more C) Delete all D) Do nothing
    Answer: A
  13. Why keep a copy of original data?
    A) To delete it B) In case you need to check C) To throw away D) For decoration
    Answer: B
  14. What is the first step in cleaning?
    A) Remove duplicates B) Find mistakes C) Fill missing D) Fix spelling
    Answer: B
  15. Can AI use dirty data?
    A) Yes, perfectly B) No, it makes mistakes C) Sometimes D) Only in Nigeria
    Answer: B

🔗 Matching Exercises

TermMatch with
1. SurveyA. Watches and records
2. SensorB. Data with mistakes
3. Dirty dataC. Asks questions
4. ObservationD. Device that collects data
5. DuplicateE. A repeated value

Answers: 1-C, 2-D, 3-B, 4-A, 5-E

📝 Short Answer Questions

  1. Explain data collection in your own words.
  2. Give two examples of dirty data.
  3. Why is clean data important for AI?
  4. Describe one Nigerian example of data cleaning.
  5. What steps do you take to clean data?

🎭 Scenario‑based Exercises

Scenario: A school collected data on students’ favourite meals. The list includes: “Rice”, “rice”, “Beans”, “Beans”, “Yam”, “yam”, “Rice”, “Rice”.

Questions:

  • What is dirty about this data?
  • How would you clean it?
  • What is the most popular meal after cleaning?

👫 Group Activity

Activity: Each group collects data on favourite animal in the class. Write the data on a paper. Then, clean it (fix spelling, remove duplicates, handle missing). Present the clean data to the class.

🧑‍🎓 Individual Activity

Activity: Write down 10 items in your room. Then write the same list again but with 2 mistakes (e.g., missing item, spelling error). Give it to a friend to clean.

💬 Classroom Discussion Questions

  • Why do you think data cleaning is often the most time‑consuming part of data work?
  • How can we encourage people to give accurate data?
  • What would happen if a doctor used dirty data to treat a patient?

🛠️ Mini Project

Project: “Clean the Market Data” – collect 20 items from a local market (or use a provided list) with prices. Create a table with some mistakes (missing prices, spelling errors, duplicates). Then clean the data and present the final clean table.

📋 Practical Assignment

Assignment: Visit a shop and write down the prices of 10 items. Then, find one mistake in your own data (e.g., a wrong spelling) and correct it. Submit both the original and cleaned data.

🏆 Challenge Exercise

Challenge: Imagine you have data on 100 students. 5 have missing ages, 10 have duplicate names, and 3 have wrong city names. Write a plan to clean this data in 5 steps.

🔑 Quiz Answers

  • MCQ answers: 1-B, 2-D, 3-B, 4-B, 5-B, 6-B, 7-B, 8-B, 9-A, 10-B, 11-B, 12-A, 13-B, 14-B, 15-B
  • Fill-in-the-blank: 1. information, 2. missing values, 3. find/fix, 4. sensor, 5. duplicate
  • True/False: 1-F, 2-T, 3-F, 4-T, 5-F

🎯 Key Takeaways

  • Data collection is the first step – we gather information.
  • Dirty data has errors – we must clean it.
  • Cleaning means fixing spelling, handling missing values, and removing duplicates.
  • Clean data leads to smart AI and good decisions.
  • In Nigeria, data cleaning helps farmers, doctors, and teachers.

🔜 Preparation for Module 3

In Module 3, we will learn how to explore data – we will use pictures (charts) to understand what the data is telling us. We will become data explorers, finding patterns and stories hidden in the numbers.

Tip: Start thinking about how you can show data in a picture – like drawing a bar chart of your favourite foods. See you in Module 3!


🎉 Well done! You are now a Data Collector and Cleaner. On to Module 3! 🎉

🏆 Get Certified

🔒

Earn this certificate

Every lesson is already free to read. Sign up, finish the lessons, pass the exam (₦2,000 or 20,000 coins), and get a verified certificate with your name on it.

🎓 Sign Up to Get Certified
🛠️ Practice Tools
Hands-on simulators & labs - subscription required.
→
🎯 Internship Tasks
Real-world tasks to build your portfolio - unlock them with a subscription.
→