Make code less verbose
I think the draw_by_group
function isn't needed and we can just call data_to_sxpline
directly. That will save some lines of code. Also we should move some of the code at the top of the app down into the expressions where it's actually used.