One data set, three questions, three charts
A correlation near 1 says the dots follow a line. It does not say warm weather causes rides: summer also has longer days and more tourists.
Start from the question, not from the chart type. Each kind of question (compare, change over time, part of a whole, distribution, relationship, ranking, where, flow) has a chart that answers it fastest, and sometimes the best answer is a table or one big number.
Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.
Ready for more? This phase has 4 hands-on exercises with automatic checks.
Practice questions
Write the code in the editor, run it, then open the model answer to compare.
Write bikesNeeded(station) that returns how many bikes a station needs to reach 50% full, and 0 if it is already above 50%. Use it for { name: "Clock Tower", bikes: 6, docks: 30 } and { name: "Quay", bikes: 12, docks: 12 }.
Rides on 2 June and 3 June are 2,979 and 3,992. Which element do you draw, and what shows before the data loads?
Explain it without notes
Priya asks which stations run out of bikes. Which chart do you draw, how do you sort it, and what measure do you use?
When is a table or a single number better than a chart?
Why is a line chart wrong for the 25 stations' ride totals?
Preview
Console
Nothing logged yet.Expected console output
busiest weekday on average: Fri 2771
busiest day of the year: 2025-07-18 4380
temperature vs rides, correlation: 0.84