Unit 5: Data analysis · Data tools

Article

Metadata: data about data

6 min read

You open a photo on your phone and swipe up. It says "12 March, 4:32 pm, Jaipur, 3.1 MB". None of that is in the picture you were looking at. It is information about the photo. Information about data has its own name: metadata.

Data and data about data

Metadata is data that describes other data. The photo itself (the colours of its pixels) is the data. Everything that describes the photo is metadata.

One photo file

A photo
  • The data

    • the pixels that make the picture
  • The metadata

    • date and time taken
    • place taken
    • file size
    • camera model
    • width and height
Metadata is stored with the file, but it is not part of the picture you see.

Almost every kind of file has metadata:

The dataIts metadata
A photodate taken, place, camera, size, width and height
A songtitle, artist, album, length, year
A videolength, size, quality, upload date
A web pagetitle, author, short description, date
A text documentauthor, date last changed, number of words
A phone callwho called, the time, how long (not what was said)

Check your understanding

Which of the following is metadata of a video file?

What metadata is for

Metadata helps you find, organise and use data.

  • Find. Search for photos taken in Jaipur, or songs by one artist. A program checks the metadata and never has to open the picture or play the song.
  • Organise. Sort a music library by year, or group files by author.
  • Use. The file size tells you if it will fit on your phone. The file type tells your computer which app can open it.

Metadata is often stored as a table, with one record for each file. Run this code. It finds photos using only their metadata:

Runs in your browser

The fields are name, place, date and size in MB. Change "Jaipur" to "Goa" and run it again.

Changing metadata does not change the data

The data and its metadata are separate. If you rename a photo, fix its date or delete its location tag, the pixels do not change. The picture looks exactly the same. If you change a song's artist name, the sound is not changed.

This works one way only. If you delete the data (the photo), the metadata that described it is no longer useful.

Using only metadata

Here is the metadata of four song files:

titleartistlength_syear
Blue DoorSana Rao2152021
Night BusThe Pines1802019
Hello RainSana Rao2422023
Paper KitesLeo Park1982019
QuestionCan the metadata answer it?
How many songs are by Sana Rao?Yes: 2
How long does it take to play all four?Yes: 215 + 180 + 242 + 198 = 835 seconds
Which song came out most recently?Yes: Hello Rain (2023)
What are the words of Night Bus?No: the words are the data, and they are not in this table
Is Paper Kites a happy song?No: nothing here describes the mood

Check your understanding

This is the metadata of four photos.

filedateplacesize_mb
IMG_112026-01-04Goa2.2
IMG_122026-01-04Goa3.0
IMG_132026-01-09Pune1.8
IMG_142026-02-01Goa2.6

Which of the following can be determined using only this metadata?

Metadata can reveal more than you think

A photo's place and time can show where a person lives or where they were last Tuesday. Metadata can also be wrong: a camera with its clock set wrongly stamps every photo with the wrong date. So check the metadata, and think about what you share.

Common mistakes

  • Thinking metadata is part of the picture. It is stored with the file, but it is separate from the data.
  • Thinking that changing metadata changes the data. Renaming a photo does not change its pixels.
  • Calling a data value metadata. The words of a song are data, and the song's length is metadata.
  • Thinking metadata is not private. A place and time can say a lot about a person.
  • Trusting it blindly. Metadata can be missing or wrong.

On the exam

Look for "Which of the following is an example of metadata?" The answer describes the data (date, size, place, author). It is not the content itself. Another favourite is "Which can be determined using only the metadata?" Check each answer against the fields shown. You may also be asked what happens to the data when the metadata is changed. Nothing happens to it.

Key words

Metadata: data about data, such as the date, place and size of a photo.

Data: the content itself, such as the pixels of a photo or the sound of a song.

AP® is a trademark registered by the College Board, which is not affiliated with, and does not endorse, this site. All lessons and questions here are written by JrCodex.