Viewing a saved revision (read-only)
0b27bdf47f6945f687172e34e1b6eebc
Week 4 Iteration
This scatter plot visualizes the relationship between calories and average rating for 80 different cereals. Each point's color encodes sodium content using d3.interpolateLab, transitioning from green (low sodium) to red (high sodium), revealing that high-sodium cereals tend to cluster around average calorie values rather than showing a linear trend. Users can hover over individual points to see the cereal's name through a tooltip div. The visualization uses D3.js with a linear scale for both axes and data from a CSV file.
AI-generated descriptionA simple scatter plot with D3 showing the 80 Cereals dataset.
This iterates on the previous version of this
In this plot, we are comparing the calories in a single serving of each cereal rounded to the nearest 10 with the average rating given to a cereal in consumer reports on a scale of 1 to 100.
Surprisingly, this plot appears to show a general trend in which the highest-rated cereals tend to be those with lower calories! In particular, the highest rated cereal in the dataset by a significant margin is All-Bran with Extra Fiber, with only 50 calories per serving. This could show that consumers value healthiness of products, or that sugary, sweet cereals might actually be less tasty to consumers than less sweet cereals!