How to collect, clean, and understand the information that feeds AI.
Welcome to Module Two! In the first module, we learned that AI is a smart computer program that learns from data. Now, we will dive deeper into data itself. Data is like the food that AI eats. If the food is good, AI grows strong. If the food is bad, AI gets weak and makes mistakes.
In this module, you will learn how to collect, clean, organise, and understand data. You will also learn about analytics – which is the process of examining data to find useful patterns. By the end, you will know how to prepare data for AI projects – just like a chef prepares ingredients for a delicious meal.
We will use short sentences, simple words, lots of examples, and fun stories. Let's begin!
After this module, you will be able to:
Once upon a time in a small town in Oyo State, there was a baker named Mr. Ade. He made the most delicious cakes. But one day, his cakes started tasting terrible. Customers complained!
Mr. Ade was confused. He used the same recipe: flour, sugar, eggs, and butter. Then his daughter, Chidi, said: “Papa, let’s check the ingredients carefully.” They looked at the flour – it was old and had bugs. The sugar was lumpy. The eggs were not fresh.
Chidi said: “Our ingredients are bad, so the cakes are bad. We need fresh, clean ingredients.” Mr. Ade bought fresh flour, fine sugar, and fresh eggs. The cakes became delicious again!
This is exactly like data for AI. If the data is clean and fresh (accurate), the AI works well. If the data is dirty (wrong, incomplete, or old), the AI makes mistakes. In this module, you will learn how to prepare good data for your AI.
Definition: Data is raw information. It can be numbers, words, pictures, sounds, or anything that can be stored and used.
Why important? Data is the starting point for everything AI does. Without data, AI is blind.
Simple explanation: Think of data as the puzzle pieces that you put together to see the big picture.
Real-life example: A supermarket records each item sold – that is data.
School example: Your teacher writes down your test scores – that is data.
Home example: A list of what you need to buy from the market – that is data.
Nigerian example: The National Bureau of Statistics collects data about prices of goods in Lagos and Kano.
📊 DATA IS EVERYWHERE ---------------------- • Numbers: 12, 45, 100 • Words: "Lagos", "Mango" • Pictures: Photos of cars • Sounds: Voice messages
Mini summary: Data is raw information that we can use to learn and make decisions.
Definition: Data comes in different forms. The main types are: numbers (quantitative), categories (qualitative), text, images, and audio.
Why important? Different AI tools work with different types of data. We need to know which type we have.
Simple: Just like you use different tools for different jobs – a spoon for soup, a fork for noodles – AI uses different methods for different data.
Real: A weather station collects numbers (temperature) and text (weather descriptions).
School: Your report card has numbers (scores) and text (comments).
Home: Photos on your phone are image data. Voice messages are audio data.
Nigeria: Banks collect numbers (amounts), text (customer names), and images (passport photos).
📁 TYPES OF DATA ----------------- +-------------------+-------------------+ | Type | Example | +-------------------+-------------------+ | Numbers | 25, 100, 3.5 | | Categories | "Male/Female" | | Text | "Hello, world!" | | Images | Photos, drawings | | Audio | Voice, music | | Video | Movies, clips | +-------------------+-------------------+
Mini summary: Data can be numbers, text, pictures, sounds, or videos. Each type needs a different approach.
Definition: Analytics is the process of examining data to find patterns, answer questions, and make decisions.
Why important? Data alone is just raw facts. Analytics gives it meaning.
Simple: If you have a list of your test scores, that's data. When you find the average (mean) score, that is analytics.
Real: A shop owner analyses sales data to know which products are most popular.
School: Your teacher analyses exam results to see which topic the class found difficult.
Home: You analyse how much pocket money you spend each week.
Nigeria: A farmer analyses weather data to decide the best time to plant.
📈 ANALYTICS PROCESS --------------------- DATA → ANALYTICS → INSIGHTS → DECISION Raw Explore Findings Action facts patterns
Mini summary: Analytics is the process of turning raw data into useful insights and decisions.
Definition: The data lifecycle is the journey of data from creation to use and eventually archiving or deleting. It has several stages.
Why important? Understanding the lifecycle helps us manage data properly.
Simple: Think of data like a fruit – it is grown (collected), cleaned, cooked (analysed), eaten (used), and then the peel is thrown away (deleted).
Real: A hospital collects patient data, uses it for treatment, and stores it securely.
School: Data about students is collected at admission, used for reports, and kept for years.
Home: You take a photo (collect), edit it (clean), post it (use), and later delete it (archive).
Nigeria: INEC collects voter data, uses it for elections, and keeps records for future elections.
🔄 DATA LIFECYCLE ------------------ 1. COLLECT → 2. STORE → 3. CLEAN 4. ANALYSE → 5. USE → 6. ARCHIVE/DELETE
Mini summary: Data goes through a lifecycle: collect, store, clean, analyse, use, and then archive or delete.
Definition: Structured data is organised in rows and columns (like a table). Unstructured data is not organised in a fixed way (like text, images, or videos).
Why important? AI handles each type differently. Structured data is easier for computers to read. Unstructured data requires more advanced AI.
Simple: Structured data is like a neatly arranged bookshelf. Unstructured data is like a pile of books on the floor – you have to sort them.
Real: Excel spreadsheets have structured data. Social media posts are unstructured.
School: Your class timetable is structured. A student's handwritten essay is unstructured.
Home: A shopping list is structured. A family photo album is unstructured.
Nigeria: Bank transaction records are structured. Customer feedback in Yoruba is unstructured.
📋 STRUCTURED vs UNSTRUCTURED ------------------------------- +-------------------+-------------------+ | Structured | Unstructured | +-------------------+-------------------+ | Tables | Text | | Spreadsheets | Images | | Databases | Audio | | CSV files | Video | | Easy to search | Harder to search | +-------------------+-------------------+
Mini summary: Structured data is organised in rows and columns; unstructured data is free‑form like text and images.
Definition: Data sources are the places where we get data. They can be internal (within an organisation) or external (outside).
Why important? Knowing your data sources helps you collect the right data.
Simple: Data sources are like water taps – different taps give different types of water.
Real: A company gets sales data from its cash registers and customer data from its website.
School: The school gets data from attendance registers, exam results, and parent surveys.
Home: You get data from your daily activities, like how much water you drink.
Nigeria: The government gets data from census, tax records, and hospital reports.
🏷️ DATA SOURCES ---------------- INTERNAL: Sales, employee records, logs EXTERNAL: Public databases, surveys, social media PRIMARY: Collected first-hand (e.g., interviews) SECONDARY: Already collected (e.g., government stats)
Mini summary: Data comes from many sources – internal, external, primary, and secondary.
Definition: Data quality means how accurate, complete, and reliable the data is.
Why important? If data is poor, AI will make poor decisions – “garbage in, garbage out”.
Simple: Good data is like fresh, clean water. Bad data is like muddy water.
Real: A GPS with outdated maps can send you the wrong way.
School: If attendance records are wrong, the school might not have enough chairs.
Home: If your shopping list has wrong items, you might buy the wrong food.
Nigeria: If census data is incomplete, the government might not build enough schools.
✅ DATA QUALITY DIMENSIONS -------------------------- • Accuracy: Is it correct? • Completeness: Is it all there? • Consistency: Is it the same everywhere? • Timeliness: Is it up-to-date? • Validity: Does it follow rules?
Mini summary: Good data is accurate, complete, consistent, timely, and valid.
Definition: Data cleaning is the process of finding and fixing errors, duplicates, and missing values in data.
Why important? Clean data leads to reliable AI. Dirty data leads to wrong predictions.
Simple: Like washing vegetables before cooking – you remove dirt and bad parts.
Real: A bank removes duplicate customer records before using AI to detect fraud.
School: The school checks that all student names are spelled correctly in the system.
Home: You sort your toy box – removing broken toys and grouping similar ones.
Nigeria: Before elections, the electoral commission cleans the voter register to remove fake names.
🧹 DATA CLEANING STEPS ---------------------- 1. Remove duplicates 2. Fill or delete missing values 3. Fix spelling and format errors 4. Remove outliers (extreme values) 5. Standardise units (e.g., kg, cm)
Mini summary: Data cleaning means fixing errors and making data neat and correct.
Definition: Data transformation means changing data from one format or structure to another to make it useful.
Why important? AI tools often need data in a specific format.
Simple: Like converting a recipe from “cups” to “grams” – it is the same recipe, but in a different unit.
Real: Converting a list of dates from “DD/MM/YYYY” to “YYYY-MM-DD”.
School: Changing a student's percentage score to a letter grade (A, B, C).
Home: Converting your pocket money from naira to dollars for a game.
Nigeria: Converting price data from old naira notes to new notes.
🔄 DATA TRANSFORMATION ---------------------- Original: 25°C Transformed: 77°F Original: "12/31/2025" Transformed: "2025-12-31"
Mini summary: Data transformation changes data format to make it ready for analysis or AI.
Definition: EDA is the process of exploring data to understand its main characteristics, often using visuals and summaries.
Why important? It helps us discover patterns, trends, and outliers before building AI models.
Simple: Like looking at a map before a journey – you want to see the roads and landmarks.
Real: A shop owner plots daily sales on a chart to see which days are busiest.
School: Your teacher makes a bar chart of test scores to see the class average.
Home: You draw a table of how much time you spend on homework each day.
Nigeria: A public health official creates a chart of malaria cases by month.
📉 EDA TOOLS ------------- • Summary statistics (mean, median) • Charts: bar charts, line graphs, histograms • Tables of frequencies • Correlation heatmaps
Mini summary: EDA is exploring data using summaries and visuals to understand it better.
Definition: Descriptive analytics answers the question: “What happened?” It summarises past data.
Why important? It gives us a baseline to understand the present.
Simple: Like looking at your report card to see your past grades.
Real: A company reports that they sold 1,000 units of a product last month.
School: The school reports that 80% of students passed the exam.
Home: You count how many times you played football last week.
Nigeria: The government reports that 2 million people visited Lagos beaches last year.
📊 DESCRIPTIVE ANALYTICS ------------------------ • What happened? • Summarise data • Use averages, totals, percentages • Example: "Sales were 20% higher this quarter."
Mini summary: Descriptive analytics tells us what happened in the past.
Definition: Diagnostic analytics answers: “Why did it happen?” It digs deeper to find causes.
Why important? It helps us understand reasons behind events.
Simple: If you failed a test, you ask: “Why?” – maybe you didn't study enough.
Real: A company finds that sales dropped because a competitor lowered prices.
School: The principal finds that attendance dropped because the school bus broke down.
Home: You discover that you were late because your alarm didn't ring.
Nigeria: The government finds that malaria cases increased because of rainy season flooding.
🔍 DIAGNOSTIC ANALYTICS ---------------------- • Why did it happen? • Drill down into data • Find root causes • Example: "Sales dropped because of a supply shortage."
Mini summary: Diagnostic analytics helps us understand the reasons behind past events.
Definition: Predictive analytics answers: “What will happen next?” It uses historical data to forecast future events.
Why important? It helps us prepare for the future.
Simple: Looking at a weather forecast to know if you need an umbrella.
Real: An airline predicts how many passengers will book flights for the holidays.
School: The school predicts how many new students will enrol next year.
Home: You predict how much pocket money you will need for the week.
Nigeria: A bank predicts the number of loan defaults based on past data.
🔮 PREDICTIVE ANALYTICS ------------------------ • What will happen? • Use historical data • Build models (e.g., regression, ML) • Example: "We predict 500 students will enroll."
Mini summary: Predictive analytics uses past data to make predictions about the future.
Definition: Prescriptive analytics answers: “What should we do?” It recommends actions based on predictions.
Why important? It helps us make the best decision.
Simple: If the weather predicts rain, the recommendation is: “Take an umbrella.”
Real: A logistics company's system recommends the best delivery route to save fuel.
School: The system recommends extra classes for students who are struggling.
Home: A budgeting app recommends saving more money this month.
Nigeria: An AI system recommends the best fertiliser for a farmer's soil type.
💡 PRESCRIPTIVE ANALYTICS -------------------------- • What should we do? • Recommends actions • Example: "Increase inventory by 20% to meet demand."
Mini summary: Prescriptive analytics gives recommendations on what to do next.
Definition: Data governance is the set of rules, policies, and responsibilities for managing data.
Why important? It ensures data is used ethically, securely, and in compliance with laws.
Simple: Like having rules for who can borrow books from a library.
Real: A hospital has rules about who can access patient records.
School: The school has rules about sharing student information with third parties.
Home: Your family has rules about who can use the family computer.
Nigeria: NITDA (National Information Technology Development Agency) sets guidelines for data protection in Nigeria.
📜 DATA GOVERNANCE ------------------- • Who owns the data? • Who can access it? • How is it secured? • How long is it kept? • Who is responsible for data quality?
Mini summary: Data governance is the framework of rules and responsibilities for managing data.
DATA COLLECTION
|
V
DATA CLEANING
|
V
DATA TRANSFORMATION
|
V
ANALYTICS (EDA)
|
V
AI TRAINING
|
V
PREDICTIONS
+-------------------+-------------------+ | Level | Question | +-------------------+-------------------+ | Descriptive | What happened? | | Diagnostic | Why did it happen?| | Predictive | What will happen? | | Prescriptive | What should we do?| +-------------------+-------------------+
ACCURACY
|
V
COMPLETENESS
|
V
CONSISTENCY
|
V
TIMELINESS
|
V
VALIDITY
| Type | Description | Example |
|---|---|---|
| Quantitative | Numbers | Age: 12, 13, 14 |
| Categorical | Categories | Gender: Male/Female |
| Text | Words and sentences | "I love Lagos" |
| Image | Pictures | Photos of animals |
| Audio | Sound | Voice recordings |
In this module, we explored the world of data and analytics. We learned that data is raw information that comes in many types: numbers, text, images, audio, and video. We discovered that analytics is the process of examining data to find patterns and make decisions. We covered the four levels of analytics: descriptive (what happened), diagnostic (why), predictive (what will happen), and prescriptive (what to do).
We also learned about the data lifecycle: collect, store, clean, analyse, use, and archive. Data quality is crucial – data must be accurate, complete, consistent, timely, and valid. Data cleaning removes errors, and data transformation changes formats. Data governance ensures responsible management.
Remember: good data leads to good AI. In Nigeria, data is being used in banking, farming, traffic management, and more. Now you know how to handle data – you are ready for the next step!
1. What is the difference between data and information?
Data is raw; information is data that has been organised and given meaning.
2. Why is data cleaning important?
Clean data ensures AI makes accurate predictions. Dirty data leads to mistakes.
3. What is structured data?
Data organised in rows and columns, like a spreadsheet.
4. What is unstructured data?
Free-form data like text, images, and videos.
5. What is EDA?
Exploratory Data Analysis – exploring data with charts and summaries.
6. What is predictive analytics?
Using past data to predict future events.
7. What is prescriptive analytics?
Recommending actions based on predictions.
8. What is data governance?
Rules and policies for managing data responsibly.
9. How much data does AI need?
It depends – often thousands or millions of examples.
10. Can I collect data at home?
Yes! You can track your daily habits, weather, or your pet's activities.
Match the term with its definition:
| Term | Definition |
|---|---|
| 1. Structured data | A. Raw information |
| 2. Data | B. Organised in rows and columns |
| 3. Analytics | C. Fixing errors in data |
| 4. Data cleaning | D. Examining data to find patterns |
| 5. Predictive analytics | E. Forecasts the future |
Answers: 1-B, 2-A, 3-D, 4-C, 5-E
Scenario 1: A school wants to predict which students might need extra help in maths. They have data from the last three terms. What data would you collect? How would you clean it? What kind of analytics would you use?
Scenario 2: A small shop in Lagos wants to know which products sell best on weekends. They have sales records for six months. Describe how you would use analytics to help them.
Scenario 3: A hospital notices that many patients are coming in with malaria. They have data on patient visits, locations, and weather. How could they use data to understand why and predict future outbreaks?
In groups of 4, choose a topic (e.g., favourite foods, sports, or TV shows). Collect data from the whole class. Clean the data (check for mistakes). Then create a chart or table to present your findings. Discuss what your data tells you.
Keep a data diary for one week. Record something every day, e.g., the weather, what you eat, or how much time you spend on homework. At the end of the week, analyse your data – find an average, a total, or a pattern. Write a short summary.
Create a data dashboard for a fictional shop. Imagine you run a small store in Abuja. You sell drinks, snacks, and books. Collect imaginary data for one week (at least 10 entries). Clean the data, create a table, and draw a simple bar chart. Write a short report on which items sold most and when.
Find a public dataset online (or use a class survey). Download or copy it. List the type of data (numbers, text, etc.). Check for errors – are there any missing values? Duplicates? Write a one‑page report describing the data and how you would clean it.
Imagine you are the data analyst for Lagos State. You have traffic data from 50 locations for the last year. Design a plan to use this data to reduce traffic congestion. Include: what data you would analyse, what type of analytics you would use, and what actions you would recommend.
In Module Three, we will learn about AI tools and algorithms – the engines that power AI. We will explore different types of AI models, how they work, and how to choose the right one for your problem. For homework, think about a problem you would like to solve with AI and what data you would need.
Homework: Write down three problems in your community that data could help solve. Be ready to share your ideas in class.
🎉 Congratulations! You have completed Module Two. You are now a Data Analyst in training!