Skip to content
Exit presentation

Data Handling I: Organizing & Visualizing Data

The chart the program drew

The shop's crate book holds one label per crate. A label names the kind, such as tomato or onion. Seventeen labels in all. A tally turns the book into one count per kind.

Loading lab…

Six kinds, no bars yet. Every count starts at 0.
Step 1 of 3
  1. Six kinds, no bars yet. Every count starts at 0.
  2. The tally runs. Bars grow to the printed counts.
  3. One onion label is lifted out. The onion bar falls to 4.

The rule

The bars are drawn from the numbers the program printed. Change the data, and the picture follows. The picture was always just those numbers.

A bar is a column of cells. The word print shows a value on the screen. counts[0] is the count for tomato, the first kind. So print(counts[0]); prints 4. The tomato column is four cells tall. There is one cell per crate.

A kind with no crates still has a column. The column is empty, with 0 under it.

The chart shows one shop's book. It does not prove more than that.

Jump to lesson

This track

  1. 0 Start here
  2. 1 One list holds the whole week
  3. 2 Every item has a position
  4. 3 A list the program builds itself
  5. 4 One box outside the loop
  6. 5 Total divided by count
  7. 6 The biggest, without sorting
  8. 7 One count per group
  9. 8 The chart the program drew
  10. 9 The big picture
  11. 10 Track quiz

Other tracks