Told myself I would stop developing #rayrender for a while and actually work on some examples and tutorials showing y& #39;all how to use it for dataviz, which then lead to me developing new features to support the examples I& #39;m working on

oh well, I triedhttps://abs.twimg.com/emoji/v2/... draggable="false" alt="🤷‍♂️" title="Achselzuckender Mann" aria-label="Emoji: Achselzuckender Mann">

#rstats (WIP)
2/n I& #39;m going to turn this into a thread where I develop a 3D #dataviz w/ #rayrender/ #rstats. A problem with the above viz is it& #39;s unclear it& #39;s 3D—it could be a 2D bean-shaped path. I can rotate around the data, but that introduces new problems: it& #39;s now hard to read the labels.
3/n The data is worldwide sea ice extent (daily) from the mid-80s until now. Eventually we& #39;re going to add a title and some axis labels (along with date information) but I& #39;m not going to worry about adding that information until the end.
4/n So how do I fix the month orientation? Rotate them so they& #39;re always facing the camera! If you& #39;re rotating the camera an angle θ, this is done by rotating the label -θ.

Next, we& #39;ll try and tackle a 3D data viz problem: how to connect the data to the axis? #rstats #rayrender
5/n It& #39;s difficult to read 3D graphs as you lose depth information when projecting 3D space to a 2D screen. You need something to link your data back to the axis. Here I try using a line back to the axis, but it& #39;s distracting and noisy—lets try something else.

#rstats #rayrender
6/n There& #39;s no reason we need to physically link the axis to the data. Let& #39;s just place a dot on the axis that moves along with our data—now the reader can see what value the current point represents.

Next: tackling the "spinning dancer" illusion!

#rstats #rayrender
7/n Our brain uses binocular vision on nearby objects to determine depth. That doesn& #39;t work w/ a 2D screen, leading to the "opposite spin" illusion. Luckily, our brain also uses object occlusion as a depth cue—which we can use to disambiguate the direction.

#rstats #rayrender
8/n Now, that being said: having a giant white pillar in the middle of your data isn& #39;t ideal. What else can we do? Well, what we& #39;re really trying to do is "ground" the data in the space—we can also try doing that by drawing a line from the data to the axis.

#rstats #rayrender
9/n Although this helps with the spinning illusion, it doesn& #39;t completely remove it. Now that we have a way to ground the line in 3D space, we don& #39;t actually need to rotate it to show that it& #39;s 3D—so what happens if we turn off the rotation entirely?
10/n Removing the data rotation solves the illusion issue, and our vertical line grounds the data in 3D space... but it has lost a bit of that panache that comes with spinning in 3D https://abs.twimg.com/emoji/v2/... draggable="false" alt="😋" title="Face savouring food" aria-label="Emoji: Face savouring food">.

#rstats #rayrender
11/n Up to this point, I have been using a highly downsampled (daily -> every other month) dataset to speed-up rendering. It& #39;s good to check in with a more representative dataset: Here& #39;s our viz animated with weekly data.

Next: Adding year information.

#rstats #rayrender
12/n Now to add more context: year information! I first considered adding the year in the title, but it& #39;s an integral part of this visualization& #39;s story—putting it in the title creates too much separation from the data. Instead, I place it right in the base.

#rstats #rayrender
13/n Because this is a 3D plot, you also have to decide on the orientation of the text. I originally tried text aligned with the plane of the circle (below), but decided that it was a bit too hard to read—I changed it to the vertically oriented text above.

#rstats #rayrender
14/n And here& #39;s two years rendered with daily data. With the slower and smoother motion, it& #39;s a lot easier to track the value. I also set the months upright so they& #39;re easier to read.

Next: data annotations!

#rstats #rayrender
15/n Annotations can help drive the narrative of your dataviz by highlighting important values: here, I annotate the lowest sea ice extent of each year. Keeping the horizontal ticks shows how this value evolves over time.

Next: final adjustments!

#rstats #rayrender #dataviz
You can follow @tylermorganwall.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: