Metadata

Part of: Data

Data About Data Metadata is data that describes other data. A photo file holds the image itself, but it also stores metadata: the date taken, camera model, resolution, file size, and sometimes GPS location. The picture is the data; the facts about the picture are the metadata. Everyday Examples - A music file: the song is the data; the title, artist, album, and length are metadata. - An email: the message body is the data; the sender, recipient, subject, and timestamp are metadata. - A web page: the content is the data; the author, language, and last-modified date are metadata. Metadata makes data findable, organized, and usable . Search engines rely on metadata to index pages; photo apps sort by date using metadata; libraries catalog books by author and subject metadata. Working With Metadata Metadata is often stored as labeled fields. Suppose each line of input is a key=value pair describing a file, and we want to report just the file's size: The program scans the metadata fields and pulls out the one it needs, ignoring the rest. Note the 1 in split("=", 1): it splits on only the first =, so a value that itself contains = (like a URL or a formula) stays intact. Plain split("=") w

Challenge: Read a Metadata Field