Data analysis
Clean, explore and explain data, from spreadsheets to databases, so the answer is clear.
- Python
- SQL
- Excel
I imagine it. Then I make it real.
Imagination is where everything begins. Before a film has a single frame, or a book has a single page, I can already see it in my mind. Even a spreadsheet hides a story, waiting for the right question. Imagination shows me what could exist, learning gives me the tools, and creating makes it real.
It starts as a scene, a character or a question. I see it clearly before it exists.
I learn the tools it needs: Python and SQL for data, AI tools for film and images, words and pictures for stories.
I build it piece by piece, films, books, dashboards and models, until it looks like what I imagined.
I put it out into the world. Then the next idea arrives, and it starts again.
Bring me an idea or a messy problem. These are the ways I can help.
Clean, explore and explain data, from spreadsheets to databases, so the answer is clear.
Turn numbers into dashboards and reports that people actually read and use.
Build models that find groups, make predictions and sort things into classes.
Short films, ads and explainers made with AI, from the first script to the final cut.
Write and illustrate picture books and adventure stories under my pen name, Layla Amari.
Set up AI tools and simple automations that take the repeat work off your plate.
Short films I write, design and direct with AI tools. Swipe to browse, then tap the film in front to watch it with sound.
I write books under my pen name. Picture books about kindness and courage in the desert, and an illustrated adventure. Swipe to browse, then tap the book in front to see it.
Pen nameLayla Amari
A shop has thousands of customers and no labels. How can it find the different types of customers hiding in its data? It lets the data sort itself.
When people hear “machine learning”, they picture something only experts can do. But clustering is something you already do every time you sort your clothes into piles. I wrote this guide to show that every step is simple on its own, and that the hard part isn’t the maths. It’s asking good questions about the groups you find.
— LVFollow one example all the way through: a café with 4,000 customers wants to send the right offer to the right people, but nobody has ever sorted them into types.
Start with a table where every row is one customer and every column describes them: how many times they visited this month, how much they spent, how long since their last visit. Computers can’t compare people, but they can compare numbers. Once each customer is a row of numbers, each one can be drawn as a dot on a chart, and customers who behave alike end up close together.
Think of it like a seating plan. Once everyone has a seat, you can see who sits near whom.
Customer A: 25 visits, AED 900. Customer B: 2 visits, AED 3,800. Customer C: 3 visits, AED 150. Three very different customers become three dots far apart.
Key idea: Similar customers become dots that sit close together.
k-means decides who is similar by measuring distances between dots. But spending can be in the thousands while visits only go up to about 30, so a difference of 500 dirhams would completely drown out a difference of 20 visits. Scaling fixes this by squeezing every column into the same range, usually 0 to 1, or by measuring how far each value is from the average.
Think of it like comparing a camel’s weight in kilograms with its height in metres. The kilograms always look bigger, even though both matter.
Visits 0–30 become 0–1, and spending 0–5,000 becomes 0–1. A customer with 15 visits and AED 2,500 becomes (0.5, 0.5).
Key idea: Without scaling, the biggest numbers decide everything.
You choose how many groups you want, called k. The algorithm drops k centres at random, then repeats two simple moves. First, every dot joins the centre closest to it. Second, each centre moves to the middle of the dots that joined it. After a few rounds the centres stop moving, and the groups are found. To choose k, people try several values and look for the point where adding one more group stops helping much. This is called the elbow method.
Think of it like a few tour guides holding up flags in a crowd. Everyone walks to the nearest flag, then each guide steps into the middle of their group. Repeat until nobody switches.
Round 1: the centres are random. Round 2: they slide towards the crowds. Round 3: nothing moves any more. Done.
Key idea: Join the nearest centre, move the centre to the middle, repeat.
The computer only says “group 1, 2 and 3”. People look at what is typical in each group, like the average visits and spending, and give it a name that means something. Then each group gets its own plan: rewards for loyal regulars, VIP offers for big spenders, a welcome gift for new visitors.
Think of it like sorting a pile of photos into albums. The computer makes the piles, but you write the album titles.
Group 1: many visits, medium spend → “Loyal regulars” → a rewards card.
Key idea: Clusters only become useful when someone turns them into actions.
This is how the whole guide looks as real code, using the free scikit-learn library.
import pandas as pd
from sklearn.preprocessing import StandardScaler
from sklearn.cluster import KMeans
df = pd.read_csv("customers.csv") # one row per customer
cols = ["visits", "spend", "days_since"]
X = StandardScaler().fit_transform(df[cols]) # same scale for all
km = KMeans(n_clusters=3, n_init=10, random_state=0)
df["group"] = km.fit_predict(X) # 0, 1 or 2 for each customer
print(df.groupby("group")[cols].mean()) # what is typical per group?What the code doesAnswer: Spending decides almost everything, because its differences are hundreds of times bigger. Visits barely count.
Answer: 3. After that, each extra group adds very little.
Turn each customer into numbers, scale them, let k-means find the groups, then name them and act on them.
Will this customer buy, yes or no? A decision tree answers by asking simple questions, one after another, like a game of twenty questions.
A decision tree is the model I’d show any beginner first, because you can actually read it. Most AI feels like a black box. A tree is a flowchart you could print out and check with a pen. I wrote this guide to show how such a simple idea becomes one of the most reliable tools in data science once many trees work together.
— LVFollow one example all the way through: an online shop wants to know, while someone is still browsing, whether that visitor is likely to buy.
Imagine a table of past website visitors, with columns like minutes on the site and number of visits, and a last column saying whether they bought. The tree tries every possible question, like “more than 3 minutes?”, “more than 4?”, “more than 5?”, and for each one counts how well it separates buyers from non-buyers. It keeps the question that makes the two sides the purest, meaning each side is mostly one answer.
Think of it like the game of twenty questions. “Is it an animal?” tells you far more than “Is it a pink flamingo?”
“More than 5 minutes?” Yes side: 18 bought, 2 didn’t. No side: 3 bought, 17 didn’t. A great split.
Key idea: The best question is the one that separates the answers most cleanly.
Each side is now a smaller table, and the tree repeats the same search on it: what is the best question for just these visitors? It keeps splitting until the boxes are pure enough, or until it reaches a limit you set, like a maximum depth. To predict for a new visitor, you simply follow the questions from the top down to a final box, called a leaf, and read its answer.
Think of it like a doctor narrowing things down: fever? then cough? then for how long? Each answer decides the next question.
More than 5 minutes? Yes → more than 2 visits? Yes → buys.
Key idea: A tree is a flowchart of questions that the computer writes for you.
If you let a tree keep splitting, it will eventually draw a tiny box around every odd example, including mistakes and coincidences. It then scores 100% on the data it learned from, but does worse on new visitors, because those odd cases don’t repeat. This is called overfitting. The fix is to stop earlier: limit the depth, or ask for a minimum number of examples in each box.
Think of it like a student who memorises last year’s exam answers: perfect on the old paper, lost on a new one.
No limit: 100% right on old data, 71% on new data, so it memorised. Depth limited to 3: 92% on old data, 89% on new data. Much better.
Key idea: A model that is perfect on old data but poor on new data has memorised, not learned.
A random forest trains hundreds of trees and makes each one a little different: every tree sees a random sample of the rows, and only a random choice of columns at each split. Each tree makes its own prediction, and the forest takes a vote. Single trees make different mistakes, so the mistakes cancel out, and the forest is usually far more accurate and stable than any one tree.
Think of it like asking a crowd to guess how many dates are in a jar. Single guesses are off, but the average is surprisingly close.
Five trees say: buys, buys, no, buys, no. Three votes to two, so the forest says buys.
Key idea: Many slightly different trees voting together beat one perfect-looking tree.
This is how the whole guide looks as real code, using the free scikit-learn library.
from sklearn.model_selection import train_test_split
from sklearn.tree import DecisionTreeClassifier
from sklearn.ensemble import RandomForestClassifier
X = df[["minutes", "visits"]] # what the questions can use
y = df["bought"] # the answer: 1 = bought, 0 = didn't
X_tr, X_te, y_tr, y_te = train_test_split(X, y, test_size=0.2)
tree = DecisionTreeClassifier(max_depth=3).fit(X_tr, y_tr)
forest = RandomForestClassifier(n_estimators=300).fit(X_tr, y_tr)
print("one tree:", tree.score(X_te, y_te)) # accuracy on new visitors
print("forest:", forest.score(X_te, y_te))What the code doesAnswer: It overfitted: it memorised odd examples instead of the general pattern. Limit its depth.
Answer: Buys, three votes to two.
A tree asks the best yes/no questions one after another; a forest asks many trees and lets them vote.
An abalone is a sea snail. Its age is found by counting the rings in its shell under a microscope, which is slow work. Can simple measurements predict the age instead?
Neural networks power the AI tools everyone talks about, including the ones I use to make films. But most explanations either skip what happens inside, or bury it in maths. I wrote this guide around a small, real problem, guessing a sea snail’s age, so you can follow every number from the input to the answer. Once this makes sense, the giant models are the same idea, just much bigger.
— LVFollow one example all the way through: a lab has thousands of shells and wants their ages without counting rings under a microscope.
Scientists find an abalone’s age by cutting the shell, staining it and counting the rings under a microscope, which is slow. But size and weight are quick to measure, and older shells tend to be bigger and heavier. So we collect a few thousand shells where we know both: the measurements and the real ring count. The measurements are the inputs, called features, and the ring count is the answer we want to predict, called the target.
Think of it like guessing a tree’s age from how thick its trunk is, instead of cutting it down to count the rings.
Length 0.52, diameter 0.41, height 0.14, weight 0.68 → rings: 10.
Key idea: Turn a slow measurement into a fast prediction, using examples where you know both.
The four measurements go into the first layer. Every unit in the next layer takes all four numbers, multiplies each by its own weight, adds them up and applies a small rule that lets it follow curves, not only straight lines. The results flow to the next layer, which mixes them again, and the last unit gives one number: the predicted ring count. The age is then roughly the rings plus 1.5 years.
Think of it like a panel of judges. Each one weighs the clues in their own way, and the next row of judges listens to them before giving one final score.
Inputs (0.52, 0.41, 0.14, 0.68) → hidden layers → 9.7 rings → about 11 years old.
Key idea: Each layer mixes the numbers in a new way until one prediction comes out.
At the start, all the weights are random, so the guesses are nonsense. After each guess the network measures its mistake: for example, it predicted 6 rings and the real answer was 10, an error of 4. It then works out which weights pushed the answer the wrong way and nudges each one slightly. Repeating this over all the shells, many times, is called training, and the average mistake drops round after round until it stops improving.
Think of it like tuning an oud by ear: pluck, hear how far off it is, turn the peg a little, and repeat until it sounds right.
Round 1: average error 5.8 rings. Round 50: 2.3 rings. Round 200: 1.6 rings.
Key idea: Training means: guess, measure the mistake, adjust, thousands of times.
Before training, we put aside some shells the network never sees, about one in five. After training, we test on those. If the error is about the same as on the training shells, the model has learned a real pattern. If it is much worse, the model memorised. A network that is too big for the amount of data tends to memorise, so the best model is often a middle size.
Think of it like a driving test. Practising on the same street every day doesn’t prove you can drive anywhere, so the test is on roads you haven’t seen.
Small network: 2.4 rings off on training shells, 2.5 on new shells. Just right: 1.6 and 1.7. Huge: 0.4 and 3.1, so it memorised.
Key idea: Always judge a model on data it has never seen.
This is how the whole guide looks as real code, using the free scikit-learn library.
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from sklearn.neural_network import MLPRegressor
from sklearn.metrics import mean_absolute_error
X = df[["length", "diameter", "height", "weight"]]
y = df["rings"]
X_tr, X_te, y_tr, y_te = train_test_split(X, y, test_size=0.2)
scale = StandardScaler().fit(X_tr)
net = MLPRegressor(hidden_layer_sizes=(16, 8), max_iter=500)
net.fit(scale.transform(X_tr), y_tr) # training happens here
pred = net.predict(scale.transform(X_te))
print("off by", mean_absolute_error(y_te, pred), "rings")What the code doesAnswer: To test the model on shells it has never seen. It’s the only fair way to know whether it learned or just memorised.
Answer: The network has started to memorise. Stop training earlier or use a smaller network.
Collect examples with answers, let the network learn by correcting its mistakes, and trust it only after it passes a test on data it has never seen.
Short lessons on the questions people ask me most, in plain words. Tap a card to open it: every step has its own animation, an everyday comparison, a real example and the key idea, with a quick check at the end. Below them: free books and a free video course.
Artificial intelligence (AI) is software that can do things we used to think only people could do, like recognising faces, understanding speech or writing text. Instead of following a fixed list of rules, it learns patterns from lots of examples.
Normal software follows rules that a person wrote, step by step. That works for a calculator, but nobody can write rules for every possible banana, face or voice. AI works differently: instead of rules, you give it examples, and it works out the rules by itself.
Think of it like teaching a child what a banana is. You don’t explain “yellow, curved, 15 cm”. You point at bananas, and soon they spot one they’ve never seen, even a green one.
A spam filter isn’t told every spam sentence. It sees thousands of emails marked spam or not spam, and learns the signs on its own.
Key idea: Normal software follows rules. AI learns the rules from examples.
First you collect lots of examples, ideally each with the right answer attached: photos labelled apple or banana, emails labelled spam or not spam. A learning program studies them and adjusts itself, again and again, until its guesses match the answers as often as possible.
Think of it like studying with flashcards: question on the front, answer on the back. After enough cards, you just know.
A photo app learns what a “beach” looks like from millions of pictures people have already tagged.
Key idea: The more good examples, the better it learns.
What the AI learns is saved as a model: a file full of numbers. Each number says how much something matters, like how important “yellow” is for spotting a banana. The examples themselves aren’t kept inside, only the pattern.
Think of it like a recipe card. You don’t keep every cake you ever baked, just the recipe that works.
The model behind face unlock is small enough to live on your phone, without your photos inside it.
Key idea: A model is the pattern, saved as numbers.
Now you can show the model something it has never seen, and it makes its best guess based on the pattern. It doesn’t truly understand bananas; it only knows what bananas usually look like. That’s why AI can be impressive and still make strange mistakes.
Think of it like a weather forecast: a smart guess based on patterns. Usually right, sometimes not.
You already use it: face unlock, maps that predict traffic, translation apps and chat assistants.
Key idea: AI makes predictions, not promises. Check what matters.
Good to know: AI does not understand the world the way you do. It is very good at patterns, so it can sound confident and still be wrong. Always double-check important answers.
Answer: From examples. It works out the rules itself by finding patterns.
Answer: No. It predicts what sounds likely from patterns, so it can be confidently wrong. Check important facts.
AI learns patterns from lots of examples, saves them as a model, and uses that model to make good guesses about new things.
Machine learning is the part of AI that does the learning. The computer makes a guess, measures how wrong it was, and nudges itself to be a little less wrong next time, thousands of times over.
Every machine learning project starts with a clear question, like “Is this email spam?”, and a pile of past examples where you already know the answer. The details the model looks at are called features (the words, the sender, the links), and the answer it must learn is called the label.
Think of it like a teacher’s answer key. Without the answers, the student can’t tell if they got it right.
10,000 old emails, each one marked spam or not spam by real people.
Key idea: A clear question, plus good examples with answers.
The model starts by guessing almost at random. It compares each guess with the real answer, measures how wrong it was, and nudges its numbers to be a little less wrong. Then it repeats this, thousands of times, until the mistakes stop shrinking.
Think of it like practising free throws. Every miss tells you to aim a bit higher, lower, left or right.
In the animation, the line keeps turning until it separates teal from orange with as few mistakes as possible.
Key idea: Learning means: guess, measure the mistake, adjust, repeat.
Before training, you put some examples aside. Afterwards you test the model on them. If it does well on examples it has never seen, it learned the real pattern. If it’s perfect on practice but poor on new ones, it only memorised. This is called overfitting.
Think of it like a student who memorised last year’s exam answers: perfect on the old paper, lost on a new one.
Train on 8,000 emails, then test on the 2,000 it never saw.
Key idea: Only new examples can prove that a model works.
Sometimes there are no answers to learn from. Then the model looks for structure on its own, like groups of similar customers. This is called unsupervised learning. A third kind, reinforcement learning, learns by trial and reward, like an AI learning to play a game.
Think of it like sorting a box of buttons by shape and colour, without anyone telling you the categories.
A shop discovers three types of customers it never knew it had.
Key idea: With answers it learns to predict. Without answers it finds groups.
Good to know: More good data usually beats a cleverer method. And bad data teaches bad lessons: if the examples are unfair or one-sided, the model will be too.
Answer: It overfitted: it memorised the practice examples instead of learning the real pattern.
Answer: Unsupervised learning, for example clustering to find groups of similar customers.
In machine learning, a model guesses, checks its mistakes against real answers, adjusts, and is finally tested on examples it has never seen.
A neural network is a model made of many small units arranged in layers. Each unit takes in numbers, weighs them, adds them up and passes the result on. Together, the layers can learn very complex patterns, like recognising a face or a voice.
A neural network is built from tiny units, often called neurons. Each one takes in a few numbers, multiplies each by a weight (how much that input matters), adds them up, and passes the result on. That’s all one unit does.
Think of it like deciding whether to go to the beach: sunshine matters a lot, wind a little, a free afternoon a lot. You weigh it all and decide.
Inputs 0.9, 0.7 and 1.0 with weights 0.8, 0.6 and 0.2 give 0.72 + 0.42 + 0.2 = 1.34, so this unit switches on.
Key idea: One unit: multiply by the weights, add up, pass it on.
Units are arranged in layers. The first layer gets the raw data, like the brightness of every pixel in a photo. Early layers notice simple things like edges and colours; later layers combine them into shapes like ears, eyes and whiskers. A network with many layers is called deep learning.
Think of it like reading: first you see letters, then words, then sentences, then the meaning.
In a photo app, early layers detect edges, middle layers detect eyes and noses, and the last layers recognise faces.
Key idea: Each layer builds on the one before.
The last layer turns everything into an answer, usually with a confidence, like “cat, 92% sure”. A network never says “I don’t know”; it always gives its best guess, so a low confidence is a useful warning sign.
Think of it like a panel of judges whose scores add up to one final result.
A voice assistant hears sounds and gives back the words it thinks you most likely said.
Key idea: The answer is a best guess, with a confidence.
When the answer is wrong, the network measures the error and sends it backwards through the layers. Every weight is adjusted a tiny bit, so the right answer becomes more likely next time. This is called backpropagation, and it repeats millions of times during training.
Think of it like tuning an oud by ear: pluck, hear how far off it is, turn the pegs a little, and repeat.
After millions of labelled photos, the weights settle into values that recognise cats very well.
Key idea: Mistakes flow backwards, and every weight gets a little better.
Good to know: The name comes from the brain, but these networks are maths, not brains. They need many examples and a lot of computing power to learn well.
Answer: How much one input matters for the result.
Answer: Because the networks have many layers, each one building on the one before.
A neural network passes numbers through layers of tiny weighted calculators, and learns by sending its mistakes backwards to adjust every weight.
A prompt is the instruction you give an AI tool. The AI only knows what you tell it, so the clearer and more specific your prompt, the closer the result is to what you imagined.
Start by telling the AI who to be and exactly what you want. A role sets the voice and the expertise: “You are a children’s author.” The task says what to make, how long, and in what form: “Write a four-line bedtime rhyme.”
Think of it like ordering coffee. “A coffee” gets you something. “A small karak, less sugar” gets you exactly what you wanted.
Weak: “Write a poem.” Better: “You are a children’s author. Write a four-line bedtime rhyme.”
Key idea: Say who it should be and exactly what to make.
The AI knows nothing about your situation unless you tell it. Who is it for? Why? What should it avoid? Context is often the difference between a generic answer and one that feels made just for you.
Think of it like briefing a new colleague. They’re smart, but they weren’t in yesterday’s meeting.
“For a five-year-old who is scared of the dark. Gentle, nothing spooky.”
Key idea: Tell it who it’s for, and why.
Describe the tone, the length and the layout you want: warm or formal, a list or a story, rhyming or not. You can also paste an example of something you like and say “in this style”.
Think of it like telling a tailor not just “a dress”, but the colour, the cut and the length.
“Warm, simple words, in rhyming couplets. Four lines only.”
Key idea: Tone, length and layout: say it, don’t hope for it.
The first answer is a draft. Read it, then ask for exactly what to change: shorter, funnier, add a character, remove a line. Each follow-up keeps what worked and improves the rest.
Think of it like working with a designer: you look, you point, and you say “a bit more of this”.
“Make it shorter and add a camel who shares her water.”
Key idea: Treat the first answer as a draft, not the final.
For images and video, describe what the camera sees: the subject, the place, the time of day, the style and the type of shot. Every detail you add removes one guess the AI would otherwise make for you.
Think of it like describing a photo to a painter over the phone.
“A camel in the desert at sunset, cinematic wide shot, golden light.”
Key idea: Subject, place, time, style, camera.
Good to know: Show examples of what you like, ask for a few different options, and always check facts, names and numbers.
Answer: Context: who it’s for, why you need it, and what to avoid.
Answer: Treat it as a draft. Ask for specific changes until it’s right.
A good prompt says who the AI should be, what to make, who it’s for and how it should look, and then improves the result with follow-ups.
SQL (Structured Query Language) is a simple language for asking questions of data stored in tables. You describe what you want, and the database finds it for you, even among millions of rows.
Databases store data in tables, a bit like spreadsheets. Each row is one record, for example one coffee order. Each column is one detail about it: the drink, the city, the price. A big company can have millions of rows.
Think of it like a school register: one row per student, one column per detail.
Table orders, row 1: Karak, Dubai, 6 dirhams.
Key idea: Rows are records. Columns are details.
Every question starts with SELECT, which lists the columns you want, and FROM, which names the table. SELECT * means “all the columns”.
Think of it like telling a librarian which shelf to look at, and which pages to copy for you.
SELECT drink, price FROM orders;
Key idea: SELECT what, FROM where.
WHERE keeps only the rows that match a rule. You can compare with =, > and <, and combine rules with AND and OR.
Think of it like a sieve that only lets the right rows through.
SELECT * FROM orders WHERE city = 'Dubai';
Key idea: WHERE decides which rows you get back.
GROUP BY puts rows that share a value into groups, and functions like COUNT, SUM and AVG turn each group into one row. This is how you get totals per city, per month or per product.
Think of it like sorting receipts into piles by city, then adding up each pile.
SELECT city, SUM(price) FROM orders GROUP BY city;
Key idea: Group the rows, then summarise each group.
ORDER BY sorts the result, for example biggest first with DESC. JOIN connects two tables that share a column, like orders and customers, so you can ask questions that need both.
Think of it like matching name tags to seats, using the seat number that both lists share.
Adding ORDER BY SUM(price) DESC puts the best-selling city on top.
Key idea: Sort with ORDER BY. Connect tables with JOIN.
Good to know: SQL reads almost like English and has barely changed in decades, which makes it one of the most useful skills in any data job.
Answer: WHERE picks the rows, SELECT picks the columns.
Answer: GROUP BY city, together with SUM(price).
SQL asks tables questions: SELECT the columns, FROM a table, WHERE rows match, GROUP BY to summarise and ORDER BY to sort.
Python is a programming language that reads almost like English. It is the most popular tool for data analysis and AI, because it is easy to learn and has ready-made libraries for almost everything.
Python on its own is a simple language. Its power comes from libraries: ready-made tools you bring in. pandas is the library for tables. One line brings it in, and one line opens a spreadsheet or CSV file as a table called a DataFrame.
Think of it like opening a toolbox and taking out exactly the right tool.
orders = pd.read_csv("orders.csv")
Key idea: Libraries give Python its superpowers.
Real data is messy: empty cells, typing mistakes, the same order recorded twice. Analysts often spend more time cleaning than analysing. pandas fixes these problems in a few lines, and the same lines work again next month.
Think of it like washing and chopping vegetables before you start cooking.
orders.drop_duplicates() removes repeated rows, and orders.dropna() removes rows with empty cells.
Key idea: Clean first, or every answer will be wrong.
Now you can ask questions: filter, group, count and average. groupby works like GROUP BY in SQL: it splits the table into groups and summarises each one.
Think of it like sorting receipts into piles and adding up each pile, in the blink of an eye.
orders.groupby("drink")["price"].mean() gives the average price of each drink.
Key idea: One line can answer a real business question.
A chart shows in one second what a table hides. Libraries like matplotlib and seaborn turn results into bar charts, line charts and maps.
Think of it like plating a dish: the same food, but now everyone wants to look at it.
result.plot(kind="barh") draws a bar chart like the one in the animation.
Key idea: Show the answer, don’t just calculate it.
With scikit-learn, the same table can train a machine learning model. Here, a model learns how the temperature affects cold drink sales, then predicts the sales for a hotter day it has never seen.
Think of it like noticing that every hot day sells more ice cream, and guessing tomorrow will too.
model.fit(X, y) learns the pattern; model.predict([[44]]) predicts the sales at 44°C.
Key idea: Load, clean, analyse, chart and predict, all in one language.
Good to know: You don’t need to be a “coder” to start. If you can write an Excel formula, you can learn Python.
Answer: A Python library for working with tables, which it calls DataFrames.
Answer: Empty cells, duplicates and typing mistakes lead to wrong answers.
Python with pandas loads and cleans your data, answers questions in a line or two, draws the charts, and can even train models that predict.
Every film starts with a story, not with a tool. AI helps me turn that story into pictures, movement and sound, but I still make every creative decision: what we see, how it feels and what it means.
I start with a feeling or a moment, then write a short story with a beginning, a middle and an end. If the story doesn’t work on paper, no tool can save it.
Think of it like building a house: the story is the foundation everything stands on.
Beginning: a girl finds a map. Middle: she follows it into the desert. End: the treasure isn’t what she expected.
Key idea: Story first, tools second.
I break the story into scenes and plan every shot: what we see, where the camera is, and how long it lasts. This list becomes the plan for everything I generate later.
Think of it like writing the recipe before you start cooking.
Shot 4: close-up of her hand opening the map, 2 seconds.
Key idea: Plan every shot before generating anything.
I design the characters and the world first, with reference images, colours and light, so every shot feels like it belongs to the same film. Keeping a face the same across many shots is one of the hardest parts of AI film.
Think of it like the costume and set designers, who work before filming even starts.
One reference sheet for the main character: her face, her clothes and the colours of her world.
Key idea: Consistency makes it feel like one film.
For each shot I write a detailed prompt, generate many versions, then choose and refine the best frame. One shot can take many tries before it feels right.
Think of it like a photographer taking many photos to get the one.
“Close-up of a girl in a black abaya holding a glowing lantern, desert at night, cinematic, soft blue light.”
Key idea: Many versions, one choice.
I turn the chosen still frames into short video clips with AI video tools, describing how the camera moves and what happens in the shot.
Think of it like bringing a puppet to life: you guide every movement.
A slow push-in towards her face while the wind moves her scarf.
Key idea: Guide the camera and the action, one clip at a time.
Voice, music and sound effects. Sound carries half of the emotion, so it gets as much care as the pictures.
Think of it like watching a scary film on mute: half the feeling disappears.
Wind, footsteps in the sand, a soft oud melody and a calm voice-over.
Key idea: Sound carries half the emotion.
I put it all together, cut the rhythm, adjust the colour and add titles, then watch it again and again and fix what doesn’t feel right.
Think of it like tailoring a dress: what you cut away matters as much as what you keep.
Trimming a shot by half a second can change how the whole scene feels.
Key idea: The film is really made in the edit.
Good to know: AI makes filmmaking faster, and possible for one person, but the most important parts, story and taste, still come from you.
Answer: The story. The tools only help to tell it.
Answer: Design the character and the look first, and use the same references in every prompt.
An AI film is made like any film, story, shots, look, images, motion, sound and edit, with AI as a fast crew and you as the director.
The Data Fluency series: my plain-English guides that take you from your first spreadsheet formula to real analysis in Python. Free PDFs, no sign up. Swipe, then tap the book in front to download it.
A free video course in seven short lessons with Sunny and Leo, following Data Fluency, Book 1: Excel, pivot tables, cleaning data and SQL, from your first formula to a real task. Free to watch. Swipe, then tap the lesson in front to play it.
Step-by-step guides to how real problems are solved with data. Each one follows a single story from start to finish: why it matters, every step with an animation and an everyday comparison, the real Python code, and a quick check at the end to test yourself.
How do you find groups of customers that nobody has labelled? You let the data sort itself.
Is one decision tree enough, or do many trees voting together make better calls?
An abalone’s age is counted from the rings in its shell. Can simple measurements predict it instead?
Small games about data, AI and code. No sign up, just tap and play.
Learn SQL and Python with a tiny coffee shop, from your first SELECT to joining two tables. Read the task, pick the line of code that does it, and watch the table answer. Three tiers, 15 levels: start at the beginning or jump to your level.
Build a prompt for one shot of an AI film. In free play, pick a card in each row and watch the scene change. In challenge mode, you get a target shot and must write the prompt that recreates it: subject, place, time of day and style.
Drag the white handles to draw a line with teal dots on one side and orange dots on the other. Finding that line is exactly what a simple AI model learns to do. Five rounds get harder: overlapping groups, noisy data, and a final shape no single line can split. Then let the machine try and compare scores.
A computer can sort things into groups without being told what the groups are. It’s called clustering, and shops use it to find different types of customers. Think of sorting a bowl of sweets by colour without anyone naming the colours. Here, you help the computer: spot the groups of dots and show it where they are.
Easy: 2 to 4 round clouds. Medium: clouds of different sizes. Hard: stretched clouds and stray dots.
The computer tried every number of groups from 1 to 6 and measured how messy the groups were. The line drops fast until it reaches the right number, then flattens. That bend is called the elbow, and it’s how data analysts choose the number of groups.
Write real Python code and watch it run. Guide a snake to the apples, level by level, from your first command to loops, if, while, functions and lists. Then program the snake’s brain so it plays a whole game by itself, or paint pixel art with code.