r/dataisugly • u/SomethingMoreToSay • 11d ago
Scale Fail Think of an integer between 0 and 1
This is a screenshot from my Google Health app. I'm just trying to work out how many times I woke up on Tuesday. Judging from the y-axis of the graph, it was about 0.6.
29
u/baquea 11d ago
Note that the scale on the right says 0, 1, 3, 5. I expect that what is happening is that those numbers aren't actually integers, but instead are floating point numbers (most likely caused by someone fucking up the code for generating the scale, so that it is evenly dividing a non-integer range, or something like that) that are just getting rounded to the nearest integer when they're displayed.
Thursday is 0. Tuesday is 1. Saturday is 3. The other days are all 2.
13
u/SomethingMoreToSay 11d ago
Saturday is 4, not 3, but yeah, those are the actual numbers.
Now, I have a set of data where all the values are (by definition) integers, and the range is from 0 to 4. How do I choose my y axis? Well, obviously:
I'll want the axis to go from 0 to 5, because 0 to 4 would be too obvious and boring.
I'll want to subdivide it into 3 portions, because 3 isn't a factor of 5, so my markers will be at 0, 1⅔, 3⅓, and 5, which gives a nice baroque feel to it.
But the original data are integers, so I'd better round the values shown on the axis to the nearest integer: 0, 1, 3, 5. Perfect.
But just because we can explain how it happened, doesn't mean it isn't ugly.
2
u/thehalfwit 11d ago
That's some nice work!
Are you a crime scene investigator?
1
u/SomethingMoreToSay 11d ago
Ha ha. My wife and I have just binged season 2 of Ludwig over the last few days!
3
77
u/miraculum_one 11d ago
I've heard of being half-awake but never 0.6 awake.