Published
Edited
Apr 23, 2020
Importers
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
gameFilter = games.filter(d => d.Total_Shipped != "")
Insert cell
gameFilter2 = gameFilter.filter(d => d.Critic_Score != "")
Insert cell
y_variable = "Total_Shipped"
Insert cell
x_variable = "Critic_Score"
Insert cell
color_variable = "Name"
Insert cell
y_array = gameFilter2.map(d => d.Total_Shipped)
Insert cell
y_arrayTop10 = gameFilter2.filter(d => parseFloat(d.Total_Shipped) > 20)
Insert cell
y_arrayCheck = y_arrayTop10.map(d => parseFloat(d.Critic_Score))
Insert cell
check = d3.max(y_arrayCheck)
Insert cell
x_array = gameFilter2.map(d => d.Critic_Score)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
chart3 = {
const svg = d3.create("svg").attr("viewBox", [0, 0, width, height]);

svg.append("g").call(xAxis);
svg.append("g").call(yAxis);

return svg.node();
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
margin = ({ top: 25, right: 20, bottom: 35, left: 40 })
Insert cell
height = 500
Insert cell
chart5 = {
const svg = d3.create("svg").attr("viewBox", [0, 0, width, height]);

svg.append("g").call(xAxis);

return svg.node();
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import { legend } from '@d3/color-legend'
Insert cell
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more