Scatter Plot with D3
This scatter plot visualizes the correlation between city miles per gallon and engine horsepower for a dataset of cars from the CORGIS Dataset Project. The visualization reveals a moderate negative linear relationship between the two variables, shown as a dense cluster of points descending from the upper-left to lower-right. Built with D3 v7, the example uses `d3.scaleLinear` for both axes, `d3.axisBottom` and `d3.axisLeft` for tick marks, and renders circles as SVG elements. The code loads data via `d3.csv` and converts string values to numbers before plotting.
AI-generated descriptionCars CSV File From the CORGIS Dataset Project. https://corgis-edu.github.io/corgis/csv/cars/
Edited the dataset to have only 2 columns 'Fuel Information.City mpg' and 'Engine Information.Engine Statistics.Horsepower' to make a scatter plot to see the correlation between these 2 columns.
It seems to be a moderate negative linear correlation.