Tyler Morgan-Wall
@tylermw.com
4.4K followers 130 following 260 posts
R, data science, dataviz, maps, experimental design, raytracing. Developer of rayshader, rayrender, and the rayverse | PhD in Physics from Johns Hopkins | Penn
Posts Media Videos Starter Packs
Pinned
tylermw.com
Hi all! A (re)-introduction: I'm Tyler, developer of #rayshader and the #rayverse, a collection of R packages for 3D #dataviz and #mapping.

Here's one of my greatest hits (now that Bluesky supports videos!): The Earth's submarine fiber optic cable network, visualized in #RStats with #rayrender.
Reposted by Tyler Morgan-Wall
pablohernandezb.bsky.social
📢 New Map Alert! Just finished this detailed 3D hydrologic map of Venezuela🇻🇪. See the country's rivers like never before!

It's time for another #1Week1Project📅💻, find out how you can make your own gorgeous map too!

Let's open a 🧵👇🏽

#HydrologicMap💧🗺
#DataArt🎨📊
tylermw.com
That's what I thought! I was so flabbergasted it wasn't the default (like it is when code folding a function) I needed to make it happen
tylermw.com
the amount of time to add this feature into RStudio was less than it took to compile RStudio itself (thanks boost headers!)

AI is bad at a lot of things but it sure makes interfacing with large code bases much easier ("Please tell me where all the code folding logic exists in this repo")
tylermw.com
There's almost always a point in a complex analysis (here, it was triggered by a long {targets} pipeline) where jumping around to find what I need becomes a bit of a slog (lots of CTRL-F), and in those times I find it nice to fold everything I'm not actively working on away
tylermw.com
Everything's the same as RStudio's current section headers except for respecting the hierarchy when folding, so no
tylermw.com
"Man, I really wish RStudio respected hierarchy in code-folded section headers... I wonder how easy it would be to..."

(inner voice: DON'T DO IT! IT'S NOT WORTH IT! JUST GET BACK TO WORK! THE YAK IS BEST LEFT UNSHORN!)

"... I'm gonna do it."

#RStats #RStudio
Reposted by Tyler Morgan-Wall
stevetornes.bsky.social
A fun map I made of the Kootenay Region
With elevation, rivers, and major roads
Zooming in, you can see all the rivers and ridges

#rstats #rayshader #britishcolumbia #bc
Map of the Kootenay Region, BC
With elevation, rivers, and major roads
Reposted by Tyler Morgan-Wall
pablo-jarrin-v.bsky.social
An interpretation of Humpback whale sightings (radio and visual sightings).
A total of 5,370 data points were rendered as light sources over the ocean, illuminating the coast of Ecuador and the Galapagos. Rendering done with #rayshader.
Reposted by Tyler Morgan-Wall
karimdouieb.bsky.social
🍩 What if climate looked like a donut? 🌍
Here’s a bunch of cities turned into a sweet dataviz experiment.

🟡 → comfy zone
🔴 → hot
🔵 → cold

Why a donut? Let me explain 👇
tylermw.com
Honestly it depends on the goals and students of the intro course! I'd say generally yes, but if you're dealing with practitioners taking a course that's more application focused (i.e. they're never going to multiply a matrix in their life but want to know how to interpret a model), then maybe not!
tylermw.com
Coursework will vary depending on the goals of the course, but for documentation I'd say anything you'd include in the details in a methods section of a paper describing the package I'd include in the docs to a similar level of detail.
tylermw.com
Writing a paper? Documentation for a package? Developing coursework? Definitely context specific for both.
Reposted by Tyler Morgan-Wall
pkgload 1.4.1 is now on CRAN, with many fixes for the generation of `compile_commands.json`. If you write C/C++ code in your packages with Positron or VS Code (or any IDE with the clangd LSP), make sure to update. Thanks a lot to all contributors! #rstats
Reposted by Tyler Morgan-Wall
Reposted by Tyler Morgan-Wall
jofrhwld.bsky.social
a gif of a sound wave made possible by combining the new stat_manual, position_nudge aesthetics, and gganimate
tylermw.com
Meshes can be built pretty easily from raw index/vertex data with construct_mesh() [https://www.rayvertex.com/reference/construct_mesh.html], and you can even write the scene to an OBJ when you're done or throw the scene into rayrender as a raymesh_model() if you want to get real fancy :)
tylermw.com
Definitely recommend rayvertex for this particular case! Headless rendering and avoiding rgl calls was rayvertex's raison d'être. Over time it's also developed some nice features with meshing (especially if you want to subdivide and smooth meshes), materials, and lighting, so try it out!
Reposted by Tyler Morgan-Wall
emilyriederer.bsky.social
Really insightful post from Julie Tibshirani (spotted in LinkedIn, can't find on Bsky) reflecting on #rstats 's unique governance structure and what can be learned for other languages

jtibs.substack.com/p/if-all-the...
If all the world were a monorepo
The R ecosystem and the case for extreme empathy in software maintenance
jtibs.substack.com
tylermw.com
You can get pretty far but that approach, but you can end up with degenerate scenarios like below with no good ordering. One thing you can do to work around that is just to subdivide meshes so they are made up of smaller triangles, which make it harder to run into such scenarios.
tylermw.com
One of my favorite things about developing rendering packages is finding real world "golden" tests: I'm finalizing a realistic sky generation package and saw the moon in a nice configuration with the sun yesterday, so I snapped a pic, compared the render, and fixed a small vector math bug! #RStats
Picture of a half moon with the sun coming from the upper left Rendering of a waning gibbous moon with the sun coming from the upper left Rendering of a half moon with the sun coming from the upper left
tylermw.com
Perspective correction will be impossible in grid—once you go down that rabbit hole, you’re going to end up writing a rasterizer :) if your ultimate goal is to play with SDFs and meshing and not rasterization, you can always use rayvertex for the rendering step
Reposted by Tyler Morgan-Wall
moreorloess.bsky.social
Some distraction: Particle size distributions down a loess core, measured with laser diffraction. Upper ~10 m is Late Pleistocene loess with a coarser mode, below that Middle Pleistocene loess units with finer mode and more of a fine "shoulder". Uses ggplot2 and #rayshader.
Three dimensional perspective plot of changing particle size distribution with depth in a core, up to 25 meters depth.
Reposted by Tyler Morgan-Wall
randy.pub
Devastating dad joke miss not referring to this as “embraces the {} notation”
Reposted by Tyler Morgan-Wall
konsta.happonen.eu
Hey #rstats and especially {targets} peeps! What are some good ways to modularise long _targets.R files? I'm generating all figures for a book in one script and it's getting a bit unwieldy. I'm thinking of breaking the script into shorter subscripts by e.g. chapter to make it more readable.
A targets script that is ~ 2000 lines long