Thread Reader
Share this page!
×
Post
Share
Email
Enter URL or ID to Unroll
×
Unroll Thread
You can paste full URL like: https://x.com/threadreaderapp/status/1644127596119195649
or just the ID like: 1644127596119195649
How to get URL link on X (Twitter) App
On the Twitter thread, click on
or
icon on the bottom
Click again on
or
Share Via icon
Click on
Copy Link to Tweet
Paste it above and click "Unroll Thread"!
More info at
Twitter Help
tterence on bsky
@researchremora
smitten with R · trapped by tenure · political economy
Subscribe
Save as PDF
Nov 8, 2023
•
5 tweets
•
2 min read
Challenge: Create a shaded relief map in a line of code
giscoR::gisco_get_countries(country = "Thailand") |>
elevatr::get_elev_raster(z = 7, clip = "location") |>
rayshader::raster_to_matrix() |>
rayshader::sphere_shade() |>
rayshader::plot_map()
Your turn, not #rstats.
Challenge: Make it interactive 3D.
giscoR::gisco_get_countries(country = "Thailand") |>
elevatr::get_elev_raster(z = 7, clip = "location") |>
rayshader::raster_to_matrix() -> mat
mat |> rayshader::sphere_shade() |>
rayshader::plot_3d(mat, zscale = 60)