Data Visualization · Exercise 1 of 4Next
Beginner
Name the kind of a column
Write kindOf(values), which takes an array of strings (a CSV column) and returns "time", "quantitative" or "categorical".
A column is "time" when every value looks like an ISO date (2025-06-02). It is "quantitative" when every value is a number and none starts with a zero followed by another digit (an ID such as 07790 is a label). Everything else is "categorical". Ignore empty strings (missing values).
What Check tests
- Dates in ISO form are "time"
- Numbers are "quantitative" (a missing value is ignored)
- Station codes are "categorical"
- Numbers with a leading zero are labels
- An empty column is "categorical", not an error
Stuck? One hint at a time
The solution unlocks after your first Check. Try first: that is where the learning happens.
Runs in your browser. Your code is saved here.
Press Run to see the page.
Console
Nothing printed yet.