Binding Data
This example shows the maximum longevity of various animal species as horizontal bars, sorted from highest to lowest, with each bar’s length proportional to longevity in years. Hovering over a bar reveals a tooltip with the common name and exact value. The visualization uses D3 v3’s `d3.csv` to load the data, then binds it to SVG `rect` elements via `data()`, `enter()`, and `append()`. Bar width is set with `attr("width", ...)` based on the `MaximumLongevity` field, and sorting is done with `d3.descending`.