Cars Scatter Plot
This scatter plot visualizes the relationship between horsepower and weight for a dataset of cars. The D3.js code (v5) loads auto-mpg data from a CSV file, parses the numeric columns, and renders circles with a semi-transparent steelblue fill. Axes are customized using D3’s `axisBottom` and `axisLeft`, which draw gridlines via negative tick sizes. Linear scales with `.nice()` set the plot’s domain and range, while SVG elements are managed through D3 selections and appended within a margined group.
AI-generated descriptionThis bar chart shows population of the top 10 most populous countries. The data comes from the year 2018 estimate in United Nations: World Population Prospects 2017. It also demonstrates customization of D3 axes.
See also the first bar chart visualization that this one builds on: Making a Bar Chart.