item explorer - data source - example 3
This example demonstrates how to preprocess a CSV file before passing it to the item explorer chart, converting all values from strings to numbers using a custom `convertToNumber` function. The chart visualizes customer counts across four binary item columns, showing patterns of co-occurrence. The code uses D3.js version 3.5.6 for CSV loading and parsing via `d3.csv`, while the `itemExplorerChart` from the external itemExplorer library handles rendering. Data is loaded from `items_small.csv` with 100,000 customers per row, and the preprocessing ensures numeric formatting before the visualization is appended to the body.
AI-generated descriptionAn example how to use item explorer with a csv file which needs to be processed before it is passed on to item explorer. The resulting data is assumed to be in the required format.
More examples
Complete list of examples:
- Data formatting
- basic data structure
- basic data structure with added colors
- basic data structure with long names
- basic data structure with dimensions
- basic data structure with all column features
- Including data
- standard reference to csv file
- reference to data embedded in html file
- preprocessing csv file before passing it on
- preprocessing embedded data before passing it on
- Visualization options