tterence on bsky Profile picture
smitten with R · trapped by tenure · political economy
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. Image 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)