ingesting data with d3
This example demonstrates how to ingest a CSV file into a web page using D3 version 7, displaying demographic data as an HTML table. The code loads `data.csv` via `d3.csv` and maps each row into a structured object with renamed properties like `year`, `total`, and `hispanic`. Using D3’s data join, it programmatically builds a table with `<thead>` and `<tbody>` elements, populating cells with values for selected columns. The example uses `d3.select`, `append`, `selectAll`, and `.data` to render the tabulated data, with the imported module `index.js` importing from `d3`.