Very good! one improvement can be to remove the weekly jumps with a moving average filter (aka sliding window aka low pass filter), search for it in cell suggestions to see how to apply it.
In your chart above it would mean wrapping line 4 in Plot.windowY( ) and then throwing in a window size parameter k like you are doing with groupX
cool ninja move with tickFormat!
not sure why would you try to do a data transformation in a separate csv file, you could just do it here (your data transformation in pizzaorder_3 is wrong anyway and you've lost the vegetarian line)
here i just copied the first chart code with a couple of changes: replaced x and y and expanded the domain of y
Plot.plot({
x: {label: null, tickFormat: (d) => ["Sun", "Mon","Tue","Wed","Thu","Fri","Sat"] [d]},
y: {label: "Total Orders", domain: [0, 200000]},
marks: [
Plot.line(pizzaorders,
Plot.groupX({y: "sum"},{x: "day_of_week", y:"orders", stroke: "category"})),
Plot.frame()
],
color: {legend: true}
})
this chart shows that the day profile is wrong either here or in the previous chart. in this case it's the previous chart. this is correct: weekends see more pizza orders