Simple tables in D3
This example demonstrates how to build a static HTML table using D3’s data-join pattern. It renders ten movie records—including title, year, length, budget, and rating—as table rows with formatted numbers, using `d3.format` for currency and one-decimal ratings, and a custom function for length as hours:minutes. The code constructs the table by appending `thead` and `tbody` elements, binding column definitions and row data via `selectAll` and `.data().enter()`, and applies CSS classes from the column definitions for alignment. The visualization relies on D3 v5 and the d3-jetpack helper library, with the data hardcoded in the script rather than loaded from a CSV.