Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Free lesson

6.1 (2 of 4): Where data comes from

The whole lesson, free. Read it and have a go at the activities. To work the tasks and labs in the real lesson, press Start lab, with no account needed.

40 minutes

A quick check that you are not a bot, then your own lab opens on the interactive lesson.

Already have an account? Sign in

Who is making data right now?

You wake up. Your watch tracked your sleep. Your smart speaker hears your alarm. You buy a coffee with your card. You fill in a form to join the gym. You watch a video and the app picks the next one.

Before breakfast, five different things made data about you. Where does data come from?

Key words

WordWhat it meansExample
Data sourceA place or thing that makes or collects data.A till in a shop
SurveyA set of questions that people answer.How do you travel to college?
FormA page with boxes where a person types or picks answers.A sign up form
SensorA small device that measures something in the real world.A temperature sensor
Internet of thingsEveryday objects that connect to the internet and send data (IoT for short).A smart light
TransactionOne act of buying or paying.Buying a bus ticket
Artificial intelligenceA computer system that does jobs that normally need a person to think (AI for short).A voice assistant
Machine learningA part of AI where a computer learns from patterns in data.A video app that picks your next video
Feedback loopA result that goes back in as new input, so it repeats.You watch football, so you get more football

The cells students fill in are left blank in this preview.

Match the example to its source

Have a go

Loading…

Your answers are marked here and are not kept. A college account keeps every student’s marks.

People answer surveys and forms

The oldest source is a person. A person answers a survey or types into a form.

This data is useful because people can say what they think. But people make mistakes. They type the wrong date. They skip a question. Some people do not tell the truth.

Sensors measure the real world

A sensor measures the real world and turns it into a number.

A temperature sensor measures heat. An accelerometer measures how fast something speeds up or shakes, so your phone knows when you walk. A vibration sensor feels shaking in a machine. A sound sensor hears noise. A light sensor measures brightness. A pressure sensor measures how hard something pushes.

Sensors and what they measure

SensorIt measuresWhere you meet it
TemperatureHow hot or coldOven, fridge, weather app
AccelerometerMovement and tiltPhone screen turns when you turn the phone
VibrationShakingA washing machine that checks its own motor
SoundHow loudA voice assistant waiting to hear its name
LightHow brightPhone screen gets darker at night
PressureHow hard something pushesTyre pressure warning in a car

The cells students fill in are left blank in this preview.

Quick check: which sensor?

Have a go

Quick check: which sensor?

4 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

IoT objects send data all day

The Internet of things (IoT) is everyday objects with a sensor and an internet connection.

A smart thermostat sends the room temperature and tells your phone. Smart lights report when they are on. A security camera sends video. A fitness tracker sends your steps. Each is a small computer that makes data all day.

Think about privacy

Warning

Many people think a smart object only does its one job. It also collects data about you, because it lives in homes, bedrooms and pockets. The data can show when you are at home and where you go. The company that collects it must keep it safe.

Every sale is a transaction

A transaction is one act of buying or paying. Every time you tap your card, the shop records it.

A shop learns a lot: who the customer is, if they are a member, the time, and the basket. The basket is the list of things in one purchase. A shop that sees bread and milk bought together can put them close together.

Your turn: the basket

A shop records each sale as a basket. A basket is a list of pairs: the item name and the price. Fill in the three functions. The first counts the items. The second adds up the prices. The third says what kind of source a device is. Press Run Tests to check.

Code: python
def items_in_basket(basket):
    # basket is a list of pairs: (item name, price in pounds).
    # Give back how many items are in the basket.
    return -1


def basket_total(basket):
    # Give back the total price of the basket.
    return -1


def source_of(device):
    # Say where the data from a device comes from.
    # "thermostat" and "smart light" give back "iot".
    # "survey" and "sign up form" give back "human".
    # "till" and "online checkout" give back "transaction".
    # "light meter" and "accelerometer" give back "sensor".
    # Anything else gives back "unknown".
    return ""

Make a free account to save your work, or press Start lab to work through the whole lesson.

AI makes new data from patterns

Machine learning is a part of artificial intelligence (AI). A computer looks at lots of data and finds patterns.

It makes new data too. A video app guesses what you like. It writes a list of videos for you. This new list is data made by the computer, not by a person.

The danger: a feedback loop

Important

A feedback loop can trap a system. You watch one football video. The app shows more football. You watch more. The app learns that you only like football. Soon it shows nothing else, even if you like other things.

Try it: a feedback loop

Code: python
shown = {"football": 1, "music": 1, "cooking": 1}

for day in range(5):
    best = "football"
    for topic in shown:
        if shown[topic] > shown[best]:
            best = topic             # the topic shown most so far
    shown[best] = shown[best] + 2    # the app shows it more
    print("Day", day + 1, shown)

# Which topic wins? Now change "music": 1 to "music": 3 and run it again.

Make a free account to save your work and track your progress.

Sort the sources

Have a go

Sort the sources

4 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Key words crossword

Have a go

Loading…

Your answers are marked here and are not kept. A college account keeps every student’s marks.

Watch: five sources of data

Press Play on the short film below. It names the five sources of data and what sensors measure. Then it follows a sale and a feedback loop. Listen for the myth about sensors and IoT.

Film: Where data comes from

Where data comes from

Every scene, as text

  1. Who is making data right now? People: a human source (makes: answers to surveys and forms). Sensors (makes: measurements of the real world). IoT (makes: data sent over the internet). Transactions (makes: a record of every sale). AI (makes: new data from patterns).
  2. Myth (false): a sensor and IoT are the same. That is not true: a sensor measures, and IoT also connects to the internet. Temperature sensor (sensor: measures how hot or cold). Smart thermostat (IoT: a sensor and an internet connection; has: a temperature sensor; sends: the room temperature to your phone).
  3. Sensors and what they measure. Accelerometer (measures: movement and tilt). Light sensor (measures: how bright). Vibration sensor (measures: shaking). Pressure sensor (measures: how hard the air in a tyre pushes).
  4. Every sale is a transaction. Tap your card (transaction: one act of buying or paying). The customer, member or not, and the time (recorded: with every sale). Bread and milk, bought together (basket: the list of things in one purchase). The shop can put them close together.
  5. The danger: a feedback loop. A list of videos for you (new data: made by the computer). You watch football. It shows more football. You watch more. An arrow goes from you watching more back to watching football (feedback loop: the result goes back in). Soon it shows nothing else.

Final check

Have a go

Final check

5 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Remember

Tip

Five sources: people, sensors, IoT, transactions and AI. People make mistakes. Sensors measure. AI can make a feedback loop.

Teach this lesson with your class

On a college account your students work the tasks and the labs as well, and every mark is kept for you.