Cars Scatter plot with drop down
This scatter plot visualizes fuel consumption data from a Kaggle dataset, showing relationships between continuous variables such as fuel consumption, CO2 emissions, and engine cylinders. The visualization uses drop-down menus to let users select which attributes appear on the x and y axes, updating the scatter plot dynamically. Built with React and D3 v5, the code uses `scaleLinear`, `extent`, and `csv` from D3 to process the data, while custom SVG components (`AxisBottom`, `AxisLeft`, `Marks`) render the axes and circles. The plot uses a `ReactDropdown` component for interactive axis selection, with tooltips displaying formatted tick values on hover.
AI-generated descriptionA scatter plot of the fuel consumption I have added drop down menu for the x axis and y axis where the x axis and y axis represent continuous variables. The original data comes from here.
My next step in this would be to implement ordinal and categorical variables as well that will accomodate other types of plots.