From Data to Information
Information
Information is the collection of facts and patterns extracted from data. Data provide opportunities for identifying trends, making connections, and addressing problems.The size of a data set affects the amount of information that can be extracted from it. A popular subfield of computer science is data science, where large data sets are processed and analysed.
So the two words are not synonyms, and the difference between them is a direction of travel. The readings are the data. The sentence you can write once you have read them is the information, and somebody had to extract it.
Programs turn data into information
Programs can be used to process data to acquire information.Programs such as spreadsheets (for example, Excel) help efficiently organise and find trends in information. Excel can process tabular data, or 2D data with mixed datatypes: a grid of rows and columns in which one column holds text, the next holds numbers and the next holds dates.
Tools of this kind let us:
• gain insight and knowledge that are obtained from translating and transforming digitally represented information
• see patterns when data are transformed
• filter, modify, combine and compare data
• visualise data through charts, graphs, tables and other visualisations
Four ways to process data
Some processes that can be used to extract or modify information from data come up again and again. Here is each one applied to the practice log.| Process | What it does | On the practice log |
|---|---|---|
| Transforming | Changes every element of the data set in the same way | Converting every session's minutes into hours |
| Filtering | Keeps only the elements that pass a test | Keeping only the violin sessions, or only the sessions over 30 minutes |
| Combining or comparing | Brings elements together into one result, or measures them against each other | Adding up all the minutes; finding the member with the most minutes; putting the sessions in order from longest to shortest, which compares them |
| Visualising | Shows the data as a chart, graph or other picture | A bar chart of total minutes for each instrument |
Data filtering systems are important tools for finding information and recognising patterns in data. The pattern about exam weeks shows up once a filter picks out the sessions just before each exam and they are set beside the rest. Search tools are useful for efficiently finding information. A search of the log for double bass finds its last session at once; reading every row by eye would take far longer. And tables, diagrams, text and other visual tools can be used to communicate the insight and knowledge gained from data. A finding usually leaves the program as a chart or a sentence.
Programs are used in an iterative and interactive way when processing information. The user runs a step, looks at the result, and chooses the next step because of it. Filter to the week before exams, notice that the sessions are short, then compare the instruments to see whether every one of them drops. Programmers also use programs to filter and clean digital data before any of that, and the cleaning is part of how the insight is gained.
Correlation and causation
Digitally processed data may show correlation between variables: as one of them changes, the other tends to change with it, either both rising together or one falling as the other rises. A correlation found in data does not necessarily indicate that a causal relationship exists.Additional research is needed to understand the exact nature of the relationship. Two measurements can change together because the first causes the second, or because the second causes the first. Or some third thing drives both of them, and neither touches the other at all. The data on its own does not say which of the three is happening, and reading it as if it did is the standard mistake made with a large data set.
Often, a single source does not contain the data needed to draw a conclusion. It may be necessary to combine data from a variety of sources to formulate a conclusion.
The figure shows one such pattern in the music club: members who practise more minutes each week tend to get higher marks on their performance exam. Practice may raise the marks, good marks may make members want to practise more, or a third thing, such as having private lessons, may drive both.
Combining, clustering, classifying
Combining data sources, clustering data, and classifying data are parts of the process of using programs to gain insight and knowledge from data.Combining data sources is a different job from combining the elements of one data set. It has a check of its own: a person who appears in both sources is still one person. Suppose the practice log names 18 members, the ensemble list names 12, and 7 names are on both. The combined record holds 18 plus 12 minus 7, which is 23 different people.
Clustering is letting a program group records that resemble one another, with nobody deciding in advance what the groups will be. The groups come out of the data. Classifying is putting each record into one of a set of categories that were fixed before the program ran.
The two are easy to tell apart by asking one question: did the categories exist before the program did its work?
Cleaning data
The ability to process data depends on the capabilities of the users and their tools. A spreadsheet has a limit on how many rows one sheet can hold. A person who has never written a filter has to read every row by eye.Data sets pose challenges regardless of size, such as:
• the need to clean data
• incomplete data
• invalid data
• data that is not uniform (spellings, abbreviations, capitalisations)
• the need to combine data sources
Depending on how data were collected, they may not be uniform. For example, if users enter data into an open field, the way they choose to abbreviate, spell, or capitalise something may vary from user to user.
A simple step in the data cleaning process is to make the data uniform without changing their meaning, for example by replacing all equivalent abbreviations, spellings and capitalisations with the same word.
| Challenge | In the practice log | What it means for the work |
|---|---|---|
| Incomplete | A session whose minutes field was left empty | The row is there but part of it is not. Every count made from that column has to allow for the gap. |
| Invalid | A session recorded as minus 20 minutes | No session can run for minus 20 minutes, so the entry cannot be true whatever else is in the row. |
| Not uniform | Vln, violin and Violin all typed into the instrument field | Three spellings, one instrument. A program counting instruments finds three unless they are made uniform. |
| Needs another source | The log never records which ensemble a member plays in | That fact lives in the ensemble list, a different file. Neither file answers the question alone. |
The program below holds a community garden's harvest log, one record per picking: the gardener, the crop as it was typed, and the kilograms picked. It totals the tomatoes twice, once as typed and once after a cleaning step writes Tomato and TOMATO as tomato. A tomatillo is a different plant from a tomato. Run it, then change it and run it again:
• Add the record
{ gardener: "Nell", crop: "Tom.", kilos: 4 } to the end of the array.• Then change the cleaning line to
if (crop === "Tomato" || crop === "TOMATO" || crop === "Tom.") {.• Press Reset, then add
|| crop === "tomatillo" to the cleaning line, before its closing parenthesis.let harvest = [
{ gardener: "Ivy", crop: "tomato", kilos: 4 },
{ gardener: "Hugo", crop: "Tomato", kilos: 3 },
{ gardener: "Nell", crop: "beans", kilos: 2 },
{ gardener: "Ivy", crop: "TOMATO", kilos: 6 },
{ gardener: "Sami", crop: "tomatillo", kilos: 2 },
{ gardener: "Hugo", crop: "tomato", kilos: 7 },
];
function tomatoKilos(records) {
let total = 0;
for (const record of records) {
if (record.crop === "tomato") {
total = total + record.kilos;
}
}
return total;
}
console.log("Tomato kilos as typed:", tomatoKilos(harvest));
let cleaned = [];
for (const record of harvest) {
let crop = record.crop;
if (crop === "Tomato" || crop === "TOMATO") {
crop = "tomato";
}
cleaned.push({ gardener: record.gardener, crop: crop, kilos: record.kilos });
}
console.log("Tomato kilos after cleaning:", tomatoKilos(cleaned));
Output
Press Run to see what this program prints.
Note: This IDE is for experimenting with the code in this lesson. Your changes are not saved, and refreshing the page puts back the original lesson code.