🔍 How to gather good information and make it sparkly clean for AI!
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!
After this module, you will be able to:
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!
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.
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).
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.
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.
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 data | Example |
|---|---|
| Missing values | Age: _____ |
| Spelling errors | “Lagos” written as “Lagosss” |
| Wrong format | “10” written as “ten” |
| Duplicates | Same name appears twice |
Mini summary: Dirty data has mistakes; we must clean it.
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.
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
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.
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.
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.
🇳🇬 Nigerian Data Collection +------------------+------------------+ | Sector | Data collected | +------------------+------------------+ | Farming | Rainfall, harvest| | Health | Patients, illness| | Education | Test scores | +------------------+------------------+
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!
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
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.
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)
📊 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
| Dirty Data | Clean Data |
|---|---|
| Has missing values | All values filled |
| Spelling errors | Spelling corrected |
| Duplicates | Duplicates removed |
| Wrong formats | Standard formats |
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.
| Term | Match with |
|---|---|
| 1. Survey | A. Watches and records |
| 2. Sensor | B. Data with mistakes |
| 3. Dirty data | C. Asks questions |
| 4. Observation | D. Device that collects data |
| 5. Duplicate | E. A repeated value |
Answers: 1-C, 2-D, 3-B, 4-A, 5-E
Scenario: A school collected data on students’ favourite meals. The list includes: “Rice”, “rice”, “Beans”, “Beans”, “Yam”, “yam”, “Rice”, “Rice”.
Questions:
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.
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.
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.
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: 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.
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! 🎉