Skip to main content
100%

D3 Scatter Plot: eu_vaccinations.csv

✓ Published1🌍 Public
DDaniel Ribaudo
Last edited Sep 28, 2021
Created on Sep 15, 2021

This scatter plot displays EU vaccination data, plotting the week number on the x-axis against the number of first doses on the y-axis, with each point colored by vaccine type (AZ, COM, MOD, JANSS, UNK). The visualization uses D3 v6 with an SVG rendering, creating a linear scale for both axes via `d3.scaleLinear` and `d3.extent`. Data is loaded asynchronously from a CSV file hosted on GitHub Gist using `d3.csv`. The code maps each row to a circle with a fixed radius and opacity, using `d3.select` and `.join` to add marks to the SVG.

AI-generated description

A vanilla HTML implementation of a D3 scatter plot.

Forked and authored by Daniel Ribaudo.

The data comes from this Gist: EU Vaccinations

Within this dataset, city names are provided alongside their latitude, longitude, and population.

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 (color of the plot points, bounds of the margin to allow the full numbers to be displayed).

One issue with this data is that it needs to be aggregated in some way to work in this format. One way of doing this would be to sum rows which have the same YearWeekISO and Vaccination type, as these are only different by area. As of right now, there is too much going on in this one graph.

MIT Licensed

Similar vizzes