Command Palette

Search for a command to run...

Hectal
Phase 5: D3 Core: Selections and the Data Join
Data Visualization · Exercise 5 of 5 Previous
Advanced

Top five stations of a month

Build a piece of the dashboard. Read station-month.csv and draw the five busiest stations of the month chosen in #month as horizontal bars (width = rides ÷ 40), keyed by station id. Changing the select must update the same chart.

For a month with no rows (the select also offers Smarch), draw no bars and put No data in #msg. The starter draws July once and ignores the select.

What Check tests

  1. July shows 5 bars and the longest is S06 (7,260 rides)
  2. Choosing January redraws: the longest is S01 (2,994 rides)
  3. Smarch has no rows: no bars and No data
  4. Back to July the chart returns
  5. No attribute holds NaN

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.

Your page

Press Run to see the page.

Console

Nothing logged yet.