1/5 THE LONG WAIT IS OVER! I'm happy to announce the release of rayshader with 3D ggplots. Pull up your favorite ggplot viz and throw it into the new plot_gg() function, and watch rayshader transform it into 3D.
#rstats
#rayshader
#dataviz
Blog post:
‼️REALLY excited to report my talk "Building a ggplot2 rollercoaster: Creating amazing 3D data visualizations in R" was accepted to rstudio::conf(2022)! Can't wait to see everyone in person and show you how to use
#RStats
to make incredible 3D
#dataviz
!
#rayshader
#rayrender
Simulated Annealing: a stochastic optimization method inspired by nature. As "temperature" decreases, random fluctuations (that allow it to escape local minima/maxima) decrease and the particle resorts to hillclimbing. No gradient calculation required.
#RStats
#rayshader
1/6 ‼️NEW PACKAGE! And it's awesome. Introducing {shadr}: Write and execute GLSL shaders directly in
#rstats
!
Here we run the shader "Seascape" by Alexander Alekseev to generate a beautiful realistic 3D water scene, entirely via R.
#shadr
Github:
Reminder: there are hundreds of great, FREE learning resources for
#rstats
out there.
There's no need to sign up to take courses with a disgusting, ethically bankrupt company with sniveling, feckless leadership.
A slightly different take on John Snow's classic public health cholera dataset, looking at nearest neighbor clustering using the cool new ggpointdensity geom from
@LPMKremer
. And of course,
#rayshader
's 3D ggplots😀
Gist:
#rstats
‼️New version of
#rayshader
released (v0.29.0)! This version enhances 3D ggplots: now, you can easily add a 2D version of the ggplot under (or above, OR alongside) the 3D plot! Just set `flat_plot_render = TRUE`.👌
#RStats
#dataviz
#rayverse
Don't mind me, just writing up documentation for the 3D ggplot function (IT'S COMING!).
#rstats
#rayshader
Also, I've stopped needing to google ffmpeg's command line options when making these videos. When does my Magical Gandalfian Unix beard start to grow in?
Playing w/
#rayrender
's new realtime interactive renderer to generate this 3D Black Sea bathymetry
#dataviz
in
#RStats
. You can fly through the scene and save keyframes to pass to `generate_camera_motion()` and `render_animation()`. Making tours through your 3D data: dead simple!
👌 Dead-simple 3D surface plotting in the next version of rayshader! Apply your hillshade (or any image) to a 3D surface map. Video preview with rayshader's built-in palettes.
#rstats
Code:
elmat %>%
sphere_shade() %>%
add_shadow(ray_shade(elmat)) %>%
plot_3d(elmat)
👇Using the {lidR} package to both create a DEM as well as extract tree canopies, and then plotting the data (using the new `render_tree()` function) in 3D with
#rayshader
+
#rayrender
: the reason
#RStats
is so awesome is you have tools to do everything!
Why didn't anyone ever tell me you can change the default paste behavior in Word to PLAIN TEXT (NO FORMATTING)?🤯🤯🤯
Word -> Options-> Advanced -> Cut, Copy, and Paste
Exactly one year ago, I picked up
@Peter_shirley
's "Raytracing in One Weekend" book series so I could implement my goal of writing a pathtracer for
#rstats
. I wanted to make stunning high-quality 3D renders a single "library" call away. Mission accomplished, I think 😁
#rayrender
‼️New tutorial! Learn how to turn spatial data into beautiful animations entirely in
#RStats
with
#rayshader
and
#rayrender
! Create beautiful 3D animations out of your hikes, bike rides, animal tracks, CEO flights, etc😉
Blog post:
#Dataviz
A few days ago, I got tired of debugging the behavior of my
#rstats
pathtracer
#rayrender
entirely in my brain, so I wrote in a nice little debugging tool to track ray paths. From upper left: Rays shot out of a single pixel on the camera, 1st bounce, 2nd bounce, 3rd bounce.
New
#rayshader
feature: Actual 3D contours! Here displayed with a vertical offset. Can be nicer than contours applied as a texture for sharp surfaces, which tend to "stretch" out the width of the contour.
#RStats
Using
#rayshader
to overlay a historical map with modern elevation data in 3D.
Everything done in
#rstats
with the exception of georeferencing the historical map, which was done with QGIS (tutorial referenced in gist).
Code (GH gist):
remember: years of advancement in data visualization technology has led to this moment
#rstats
#dataviz
"daddy, where were you when the downfall began?"
"I remember... I remember it like it was yesterday"
data.table vs dplyr, tidyverse vs base, python vs R: it's all the equivalent of two people holding "Free Hugs!" signs and arguing with each other about who's hug is best, followed by technical digressions on hug construction, hug efficiency, and methods of hug dispatch.🙄
#rstats
Generating a "random forest" in R 😀
Trees/plants are all generated from the same code, just different input parameters. Who needs Animal Crossing when you can create your garden in
#rstats
+
#rayrender
😉
1/4
“So that plot is an—“
“Yep, elevation map.”
“And this plot is also a—“
“Yep, also an elevation map.”
“So are you seriously telling me you turned all these plots into—“
“Elevation maps. It’s elevation maps all the way down.”
Preview: 3D ggplots w/🕶️
#rayshader
😉
#rstats
1/5‼️New tutorial AND a new rayshader update! Learn how to add Open Street Map data to
#rayshader
maps in
#rstats
, using only a few lines of code. Take a break from the doom-scrolling (I live in DC—yesterday was nuts😬) and learn something new!
Blog post:
‼️1/3 If you ever thought my projects rendering 3D pigs with
#rayrender
was odd--surprise! It was a secret
#rayshader
project the entire time. Introducing `render_highquality()`: produce stunning 3D maps and visualizations, entirely within
#rstats
, no other software required.👍
10 million (yes, MILLION) trees, detected from 30 gigabytes of Washington DC lidar data, individually transformed to the proper size and geo-referenced into a 3D
#rayshader
scene, entirely in
#RStats
!🤯
You knew rayshader could do trees—now you know it can do FORESTS!😀
‼️NEW BLOG POST! You asked for it, and you got it!
"A Step-by-Step Guide to Making 3D Maps with Satellite Imagery in
#rstats
"🗺️🛰️
I walk through getting the data, loading the imagery, and creating the 3D viz w/
#rayshader
. All code included.
#gistribe
Volcanic rayception: elevation -> ggplot -> elevation
Rayshader's plot_gg() magic automatically handles lines and other elements that shouldn't be mapped to 3D.
#rayshader
#rstats
how to draw an owl
(playing around with system/processx calls in R to replace my usual bash script--made with imagemagick and the primitive library
#rstats
):
‼️Announcing my entry to the 2020
@RStudio
Table Contest! A beautiful table, made entirely in R with
#rayrender
, featuring RStudio 😉
(My jokes come with receipts—here's the 60 lines of
#rstats
code used to build + render this 3D table:
)
There are new features... and then there are 🤯🤯🤯NEW FEATURES🤯🤯🤯!
Let's just say the next update to
#rayshader
is gonna be a good one🙂 (everything below is generated entirely from data: 3D buildings, terrain, and 15,000+ trees).
#RStats
#rayrender
#dataviz
ggplot() + geom_gravity()
Wait until you see this one animated in
#rayshader
3D :)
#rstats
Inquisitive individual: "Wait, how are a bunch of dots a 3D plot?"🤔
Well...
‼️Introducing... *plonk* 3D LABELS!
#rayshader
#rstats
#dataviz
Code example:
render_label(montereybay, x=50,y=250,text="Insert Text Here")
(coming in the next version of rayshader)
After a few weeks of reading a bunch of SIGGRAPH papers and many hours programming, some cool new features are coming over the horizon for 🕶️
#rayshader
... (this video was, of course, 100% created and rendered with R
#rstats
)
Zion National Park, Utah, overlaying elevation data with satellite imagery from LANDSAT 8. No manual work, entirely in
#rstats
using
#rayshader
. Using nothing but open and freely available data.
Who's interested in a tutorial? 😃
‼️New year, new R package, new Quarto website, new blog post! Introducing the {raybevel} package: generate 3D buildings, 3D beveled polygons, 2D inset polygons, and straight skeletons entirely in R!
Blog post:
HAPPY NEW YEAR!
#RStats
#rayshader
#raybevel
Just wrote a 25 line function that converts an sf object with MULTIPOLYGON Z geometry into a full fledged 3D model😀
Use your imagination for what this means for the
#RStats
3D rendering ecosystem...😉
#rayrender
#rayshader
Happy 20th birthday to R! Some might say you're a niche language focused solely on data and have little to no utility beyond that domain, but others see the (pathtraced bouncing LEGO brick) potential within 😀
Video rendered entirely in
#rstats
using the
#rayrender
package
‼️1/9 New package release! Introducing {rayvertex}: beautiful multicore 3D software rendering entirely in
#RStats
, with no hardware dependencies and a seamless, super-easy installation process.
Github:
#rayvertex
#rayverse
‼️New version of
#rayshader
released (v0.25.0)! 3D contours! Add floating 3D contours to your scene, which provides nicer-looking contours for terrain with steep hills. It also allows you to make funky glowing contours using
#rayrender
, if that appeals to you :)
#RStats
#dataviz
1/5‼️ATTN journalists, scientists, and science communicators: Introducing `coronaobj`: A one-function, self-contained R package that produces customizable, scientifically accurate 3D OBJ models of the SARS CoV2 virus (i.e. coronavirus)
#rstats
#rayrender
Did you know
#rayshader
comes with a function that can detect bodies of water directly from the elevation data? `detect_water()` looks for large contiguous flat regions of a user-defined minimum size and "flatness." Use `add_water()` to layer it on the map.
#rstats
1/2‼️I just released a BIG, long-requested update to
#rayshader
! Add 3D tracks & paths using latitude/longitude/altitude data with `render_path()`, or add individual data points in 3D with `render_points()`! Lat/long also now works w/ labels.
#rstats
GH:
"A water spout... at this time of year... at this time of day... in this part of the country... localized entirely within your R session?"
"Yes!"
Rendered entirely within
#rstats
with
#rayrender
Website:
Github:
Exciting news! I'm going to be teaching a masterclass this Fall on 3D mapping with
#rayshader
and
#rstats
, hosted by the
@PennMUSA
program. The best part: the class will be webcast and all the materials released online, so you can follow along from home! Date: November 15th.
Talk all you want about the usefulness of 3D plots, but I think it's a net positive that you can visualize bending spacetime entirely in
#rstats
😉
(I realized I never shared this visualization I made with
#rayshader
+
#rayrender
from last year's rstudioconf on Twitter)
Yes,
#rstats
can be used to make serious, no nonsense data visualizations. But did you know it can also be used to create gilded statues of
#Pokemon
? Move over Emmys--here comes the golden Weedles.
Gist:
#rayrender
One week until I will be speaking at
@rstatsdc
on "Building an Entire City in R: Interactive 3D Data Visualization with
#Rayrender
"
I'll show how to build a digital replica of a city entirely in R and an example of telling a data-driven story within it!
#RStats
#rayshader
Can you believe this coin was rendered entirely in
#rstats
? In under 10 lines of code? And you can install the package that rendered this (
#rayrender
) in a single line of code, without worrying about complex build processes or installing requirements manually?
🤯IT'S FINALLY HAPPENING! Interactive pathtracing with
#rayrender
, entirely in
#rstats
.🤯
Fly through your 3D scenes with a mouse and keyboard! If programming goals were infinity gems, I just popped the first on my gauntlet.
"Fine. I'll do it myself." -Thanos, installing OpenGL
1/6‼️New package update! Cloud computing comes to
#rayshader
! No, we aren't talking about AWS—we're talking floating puffs of white mist, ray marched and rendered above your 3D map! Add procedurally-generated customizable 3D clouds in a single line of
#RStats
code.
#dataviz
Orbiting a 3D ggplot, shiny metal ball edition (and believe it or not, the code is as simple as the `render_snapshot` version--`render_highquality` is a drop-in replacement):
#rstats
#rayrender
#rayshader
(
@ClausWilke
it's on top of the ggplot now, if that makes you happy😋)
1/2‼️NEW PACKAGE RELEASE! Introducing 📦 rayrender: Render 3D raytraced scenes directly in R. Based off of
@Peter_shirley
's "Ray Tracing in One Weekend" series, this package provides a tidy R API to craft and render 3D scenes.
#rstats
#rayrender
Blogpost:
I didn't get to see the cherry blossoms this year in DC due to COVID, but here's the next best thing: programmatically creating your own cherry blossoms using
#rstats
+
#rayrender
! Who wants to learn how to do this too?
1/5 ‼️BIG update to 🕶️
#rayshader
: 3D printing support! Have a beloved mountain range or canyon you want to miniaturize for your desk? Rayshader can do that, and takes care of all the annoying details.
#rstats
#3Dprinting
#GIS
#dataviz
Blog post:
‼️Package update art!
#rayshader
0.28.0 adds a feature everyone's been waiting for: Dirt! Apply a generative dirt texture to the sides of your map by setting `dirt = TRUE` in `plot_3d()`. You can control the color, clump size, and darkness gradient.
#dataviz
#RStats
#rayverse
1/4‼️Here it is, folks!
#rayshader
0.13.0 has just released with render_highquality(): a built-in, hassle free, no-learning-required pathtracer (powered by
#rayrender
) for awesome 3D visualizations. Point camera, call function--easy.
Github:
#rstats
1/3‼️New
#rayshader
update (v0.30.0)! And it's a big one: Trees, 3D buildings, and OBJ support!
Now you can visualize important questions like: What would the National Mall look like if we replaced the Washington Monument with Sauron's dark tower? 😀
#RStats
#dataviz
#rayrender
👨: "... and that's why daddy got punched in the face at the data viz conference."
🧒: "All because you brought 3D bar charts to R?"
👨: "ESPECIALLY because I brought 3D bar charts to R."
sorry everyone, with the good comes the bad 🙃
#rstats
#rayshader
The addition of `sf` and SpatialPolygon/base polygon support in
#rayrender
opens up a lot of possibilities, but here's one I'm particularly excited about: stained glass maps.
Wake me up when commercial GIS software can do THIS 😁
#rstats
"Build an entire language around data analysis and machine learning. What could go wrong?"🤔
Skynet is coming... and it runs on R 🔥🤖(sound on)
1/5‼️
#rayrender
updated with new features that made this trailer possible!
Full
#rstats
animation code:
I almost committed the ultimate scientific 3D visualization faux pas: releasing rayshader without featuring an undulating, radial wave.
In under the wire.
#rayshader
#rstats
✋Raise your hand if you're interested in a package that procedurally generates beautiful 3D trees in a single line of code and renders them directly in
#rstats
, using
#rayrender
🙂
Beginning of evening goals: "I'm going to write my rstudio::conf talk submission tonight, I swear!"
End of evening results: "... Look, I just modeled Clippy in 40 lines of R code! I even captured the correct amount of condescension!"
Maybe another night... 😀
#RStats
#rayrender