RSSAmplifier

Blog

Tyler Morgan-Wall

tylermw.comRSS feed ↗20 posts

Latest posts

Atmospheric Simulation in R

One of the hardest details to get right in 3D data visualization is lighting: since 2D screens don’t offer the benefit of stereoscopic vision, we have to rely on subtle cues like occlusion, relative motion (if animated), and shading to be able to interpret the space as 3D. Nowhere is this more clearly demonstrated than on topographic maps, where shadows can make what is otherwise a largely…

Developing C/C++ code for R with Positron: Part 1

Positron is a new IDE by the creators of RStudio that’s built on VSCode’s open source core, but layered with extra bells and whistles for R (and Python, if that’s your thing). And those bells and whistles’ music is particularly well tuned for R developers working with compiled code, which was always a rather rough experience in RStudio. As someone who basically uses R as a nice LISP-y scripting…

Roofs, Bevels, and Skeletons: Introducing the Raybevel Package

Intro It all started with a tweet that caught my eye - a slick 3D rendering of beveled polygons by Yi Shen @pissang1 . Before a certain social media site went down the xitter A couple things nerd-sniped me about this interaction: first, an algorithm I’ve never heard of? Check. One that can be used to create cool 3D meshes? Check again. And (after a few minutes of research) one that had no existing…

Sculpting the Moon in R: Subdivision Surfaces and Displacement Mapping

We like the moon The moon is very useful, everyone Everybody like the moon Because it light up the sky at night and it lovely and it makes the tides go and we like it But not as much as cheese We really like cheese — The Spongmonkies, 2002 Introduction Tip TL;DR In this post, we explore subdivision surfaces and displacement mapping within the rayverse, using the rayvertex , rayimage , and…

Roadtripping America in R: Turning Spatial Data into Animations with Rayshader

Roadtripping America in R What’s cooler than spinning 3D animations of geospatial data? Flying spinning 3D animations of geospatial data! And that’s what this blog post is going to teach you how to make, using new features in rayshader that make the process simple and straightforward. Normally, I’d also try to give you a little more background about the motivation for making this feature, and why…

Tutorial: Visualizing Saturn’s Changing Appearance from Earth in R

Saturn! The sixth planet from the Sun and the second-largest in the Solar System, named after the Roman god of wealth and agriculture. A planet the universe liked so much it put a ring on it (many rings, in fact). Unlike the rest of the planets, which are just glorified spheres spinning through space, Saturn has a uniquely 3D appearance thanks to its extensive ring system and its 26.7 degree axial…

Dataviz Nanopost: 360° VR Videos in R

Dataviz Nanopost: 360° VR Videos in R W hen you create a traditional 3D visualization, one problem you inevitably have to tackle is “Where do I point the camera?” A poor choice of camera angle can obscure important information and confuse your viewer. And while you might want to direct your viewer to one area of your visualization, they might be interested in a different region altogether. The…

Dataviz Nanopost: Slices of the World

Dataviz Nanopost: 3D Slices of the Earth This is the first in a series of tiny posts where I show a data visualization along with the code used to generate it. I’ve always been annoyed at the lack of discoverability in Github Gists, so I’ve never really felt motivated to post code snippets there. Unlike github repos, gists tend to disappear into the void and never be seen again, unless linked by a…

DataCoaster Tycoon: Building 3D Rollercoaster Tours of Your Data in R

DataCoaster Tycoon: Building 3D Rollercoaster Tours of Your Data in R with rayrender 3D data visualization presents unique challenges for the data viz practitioner. In 2D, you have to tackle problems like “How do I adjust the inner margins?” or “How can I nudge these overlapping labels away from each other?” or “Uhh… how do I do remove the legend again?” Formidable mainly because you need to know…

Tutorial: Adding Open Street Map Data to Rayshader Maps in R

osm T his post is a tutorial on how to add Open Street Map data to maps made with rayshader in R. Rayshader is a package for 2D and 3D visualization in R, specializing in generating beautiful maps using many various hillshading techniques (see these posts [1] [2] [3] ) directly from elevation data. It does this by providing the user with a wide variety of techniques: traditional lambertian…

How to: Download and Animate Polar Ice Data in R with Rayrender

T his post will serve as a guide on making the above visualization entirely in R (using rayrender), directly from the data source! I wanted to create an example of how your could create a complex, multi-faceted 3D visualization, entirely in R. I’ve provided all the code so you can generate the visualization from scratch—this can hopefully provide you with several strategies and workflows so you…

Plinko Statistics: Insights from the Bean Machine

A Galton board (aka a “Bean Machine”) is an interesting mix of chaos and predictability: a single ball’s path is unpredictable, yet the behavior of a mass of balls results in a remarkably consistent result. It’s a toy that cuts right to the core of statistics: one measurement doesn’t tell you much about a system, but many measurements in aggregate do. Combining those concepts with all fun of…

Loading and Visualizing OpenSky Network Flight Data in R (short)

T l;dr: I will show you how to query the OpenSky REST API directly from R, load and clean the data, and then finally visualize it in 3D using the rayrender package—entirely in R. The OpenSky Network is a non-profit association that crowdsources flight path data. Volunteers set up sensors to read ADS-B messages sent out by aircraft, which contain the aircraft’s position and velocity. The volunteers…

Raybonsai: Generate Procedural 3D Trees in R

One fun aspect of building a 3D renderer in R (and more generally, building anything in a programming language with a REPL) is the lack of friction between your code your results: rather than constructing a 3D scene by hand using a GUI, you can generate your scene directly from data or purely from logic. For traditional 3D rendering, this isn’t particularly useful, but for visualizing data and…

A Step-by-Step Guide to Making 3D Maps with Satellite Imagery in R

E ver since I released rayshader to the public, there’s been one question that comes up time and time again: “How do I use rayshader to overlay satellite imagery onto a 3D surface?” And I can see why: 3D maps with real satellite images are super cool, and there are few detailed tutorials out there on how it’s done in R. Additionally, the process behind making this type of map can be intimidating…

Pathtracing Neon Landscapes in R

I ’ve been having fun the last few months adhering to a relatively rapid open-source development schedule (as much as you can call a one-man project driven by a Mac Stickies window a “schedule”) with constant releases of rayrender , rayshader , and now rayimage . And in that time, I’ve managed to push lots of cool features, like true pathtracing of terrain in rayshader and realistic layered…

The Virtual Tilt Card: Raytracing Lenticular Prints with rayrender

Note: This post is also marks the release of rayrender 0.3.0 : to see what new features are included (and there are many), head to the bottom of the post. W hen I was a kid back in the 1990s, cereal companies used a clever little marketing trick to get their wares in our parents carts: literally just bribing children. With “prizes.” Little plastic submarines, spoons that morphed from Ectocooler…

Introducing 3D ggplots with rayshader

As rayshader gracefully rotates into its second year, I’m happy to announce the release of a feature I’ve been teasing for a while: 3D ggplots! It’s been a long time coming, but the wait was worth it–I promise. Creating this feature was a logical extension of rayshader’s core competency–using elevation matrices to generate raytraced 3D maps of topographic data. Specifically, this tool generates 3D…

Getting Started with Rayrender: Forging the R Sword

In mid-February, I found myself staring at the computer screen with a weekend free and a choice to make. After three months working on rayshader to put together and practice a presentation for RStudio::conf(2019), build the package a website , and bring life to an interactive rayshading Twitterbot –I found myself feeling the smallest tinge of “burn out”. Not enough to say ik ben op , as the Dutch…

2018 Year in Review

What a year. In my adult life, I can look back and classify my years into two categories: “cultivating” years, and “fruit-bearing” years. Cultivating years were those spent learning and laying the groundwork for future things to come: doing research and learning (or, in the modern forehead slapping vernacular, “upskilling” 🤦‍♂️), getting into the deep and dirty details of building R packages, or…