I was wondering what you think about a stepwise (?) interpolation for line charts (instead of linear)? I've been using it for election results recently as I think it's a better representation of the data (as the results do not change over time, but on election day).
I've also used it for displaying multiple results at a time, and while I was happy with the bar/density-like effect between the changes at first, I'm starting to think linear is somewhat clearer in this case.
@drawingdata I think steplines make sense for the right type of data (as you described). I agree that it falls apart with that many lines. I wonder if the only reason the linear interpolation feels better is the larger trend of the lines starts to emerge. Personally, I’d ask myself what I was trying to communicate with so many lines (maybe a comparison or trend) and see if there is a better way to communicate that (i.e aggregate the lines or plot a delta). Depends on what you are going for, tho
@awhildy thanks, I think you're right, the linear interpolation makes it easier to spot an overall picture and you can follow at least some lines.
In my case those lines represent partial results from municipalities which are part of an interactive overview that can be searched and highlighted, therefore I put them all together.
@drawingdata hm. Makes sense. Maybe you can start with one of the lines highlighted? Or really bring forward visually lines that are hovered on and/or selected, maybe even label those, and push back the other lines? Or, as a crazy out there thought...offset the lines from each other a little at each x axis tick, kind of how subway maps show lines that are going in the same direction (ex. https://goo.gl/images/PWrEMZ). Or keep with the linear :) Interesting challenge with steplines for sure.
@awhildy yes, for the moment I'm bringing the hovered lines to the front and added a name, for this vis (it's one chart in a series) it works I think. Interesting idea about the offset though, I'll definitely give it a try, thank you.
@drawingdata Lisa Rost has a good post here on steps vs. linear interpolation. I do agree steps are often a better choice. https://blog.datawrapper.de/weekly-chart-altitude/
@petulla thank you, I missed this post, it's a good read.
@tomshanleynz thanks for the feedback, you're right, this trend is rather important, so I'll go with the linear one
@drawingdata hello! Here's a few thoughts: with your data, I think I would go with linear interpolation, if I had to choose between the two, to show trends of how election results changed in time, with highlights+labels as you did later for steplines.
I like steplines bc when they are many, as in your case, the distribution at each step becomes very clear. I also agree with your thought "it's a better representation of the data" since it's not a continuous set of data but rather discrete. (1/2)
@drawingdata (2/2) Although I'm not sure that with what your data represent steplines are the best choice. Perhaps a stacked bar system could help maintain the time series in the way you are saying while producing a less crowded picture with no overlapping elements. This is a nice recent example of what I'm trying to say: https://www.theguardian.com/politics/ng-interactive/2018/may/04/local-council-election-results-2018-in-full
@ale_zotta thanks very much for your input and the link (it's a great overview). The stacked bars are an interesting idea, I didn't think about this type before - maybe displayed as small multiples they could be good for this, I'll give it a try.
I personally like stepwise more than interpolation, in particular if one plots data that represent averaged quantities in the respective intervalls.
A social space for anyone in data, visualization, creative coding, and related arts and research. Share your work, discuss, critique, and ask for help! Come one, come all:
→ creative coders
→ data scientists and visualizers
→ generative artists
→ visual researchers, curators, and critics
→ anyone else data- or visualization-adjacent
If you are curious about the world and creativity, you are welcome here. Learn more.