Viewing a saved revision (read-only)
69333698caaa437b8ead0e7ead9983d3
This example loads a car sales dataset from a local CSV file and renders its raw, parsed contents in a `<pre>` element. It uses D3 v7 methods `csvParse`, `select`, and `join` to fetch, parse, and display the data, coercing date and numeric fields into their proper types. The visualization acts as a data-cleaning step, transforming annual income and price values into numbers and the date into a `Date` object, while preserving all categorical attributes. The display updates whenever the state changes, showing the current data structure.
AI-generated descriptionCar Sales Report
Description:
This dataset contains records of car sales transactions,
including customer demographics, dealer information, and
vehicle attributes.
It can be used to study sales trends, customer purchase
behavior, brand/vehicle performance, and dealer
distribution.
Source:
Kaggle – Car Sales Report (missionjee)
Attributes:
- Car_id → Categorical (Nominal): unique identifier for each transaction.
- Date → Time: date of the transaction (month/day/year).
- Customer Name → Categorical (Nominal): name of the customer.
- Gender → Categorical (Nominal): customer gender.
- Annual Income → Quantitative (Continuous): customer’s annual income.
- Dealer_Name → Categorical (Nominal): dealer company name.
- Company → Categorical (Nominal): car brand (e.g., Ford, Toyota, Dodge).
- Model → Categorical (Nominal): specific car model.
- Engine → Categorical (Nominal): engine type/description.
- Transmission → Categorical (Nominal): type of transmission (Automatic/Manual).
- Color → Categorical (Nominal): vehicle color.
- Price ($) → Quantitative (Continuous): car sale price in U.S. dollars.
- Dealer_No → Categorical (Nominal): dealer identification number.
- Body Style → Categorical (Nominal): vehicle body style (SUV, Hatchback, Passenger, etc.).
- Phone → Categorical (Nominal): dealer phone number.
- Dealer_Region → Categorical (Nominal): dealer region or city name.