Skip to main content
100%

D3 Scatter Plot: vgsales.csv

✓ Published3🌍 Public
DDaniel Ribaudo
Last edited Sep 28, 2021
Created on Sep 15, 2021
Forked from D3 Scatter Plot

This scatter plot visualizes video game sales data from the vgsales.csv dataset, plotting each game’s release year on the x-axis against its global sales on the y-axis. Rendered as an SVG using D3 v6, the code applies `d3.scaleLinear` for both axes and draws semi-transparent circles with a radius of 4. The data is loaded via `d3.csv`, and axes are generated with `d3.axisLeft` and `d3.axisBottom`, with tick formatting modified to prevent commas in the year labels.

AI-generated description

A vanilla HTML implementation of a D3 scatter plot.

Forked and authored by Daniel Ribaudo.

I added comments to this file to demonstrate understanding of various pieces of code. I edited the required segments (import, circle radius, and circle opacity) as well as other segments (changing the map function whilst importing rows and changing the tickFormat on the x-axis to prevent years from having commas within them).

The data visualized comes from this gist: Video Game Sales

Within this dataset, there is a listing of video game sales per country. Each video game listed is labelled with a genre, year, publisher, and platform.

MIT Licensed

Similar vizzes