This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# load libraries | |
library(units) | |
library(tidyverse) | |
library(osmdata) | |
library(sf) | |
library(ggtext) | |
library(exactextractr) | |
library(fasterize) | |
library(ggtext) | |
library(tidygeocoder) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# load libraries | |
library(tidyverse) | |
library(osmdata) | |
library(sf) | |
library(ggtext) | |
library(exactextractr) | |
library(fasterize) | |
library(ggtext) | |
library(tidygeocoder) | |
library(glue) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(rayshader) | |
library(rayrender) | |
library(sf) | |
library(fasterize) | |
library(raster) | |
library(exactextractr) | |
library(rayrender) | |
library(terra) | |
library(antanym) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(sf) | |
library(rnaturalearth) | |
library(tidyverse) | |
library(ggtext) | |
sf_use_s2(FALSE) | |
tmp_dr <- tempdir() | |
tmp_fl <- tempfile() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# load libraries | |
library(tidyverse) | |
library(osmdata) | |
library(sf) | |
library(ggtext) | |
library(exactextractr) | |
library(fasterize) | |
library(ggtext) | |
library(tidygeocoder) | |
library(glue) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(sf) | |
library(tidyverse) | |
projections <- c("+proj=laea", | |
"+proj=moll", | |
"+proj=adams_ws2", | |
"+proj=urm5 +n=0.9", | |
"+proj=wintri", | |
"+proj=bonne +lat_1=10", | |
"+proj=eck1", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(rayshader) | |
library(rayrender) | |
library(terra) | |
library(rnaturalearth) | |
library(MetBrewer) | |
library(raster) | |
library(exactextractr) | |
library(fasterize) | |
canopy_germany <- rast("germany/canopy_germany.tif") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(patchwork) | |
library(sf) | |
#> Linking to GEOS 3.9.1, GDAL 3.2.3, PROJ 7.2.1; sf_use_s2() is TRUE | |
poly <- st_polygon(list(cbind(c(0,1,1,0,0), c(0,0,1,1,0)))) | |
poly_grid <- st_sf(st_make_grid(poly, cellsize = 0.01)) | |
poly_grid[1:490, "group"] <- 1 | |
poly_grid[491:3600, "group"] <- 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
options( | |
repos = c(tylermorganwall = 'https://tylermorganwall.r-universe.dev', | |
CRAN = 'https://cloud.r-project.org') | |
) | |
install.packages('rayrender') | |
library(rayrender) | |
for (i in seq(720, 1, by = -1)) { | |
generate_studio(depth = -1, material = diffuse(color = "white")) %>% | |
add_object(sphere( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(rayrender) | |
library(glue) | |
y_dist = 8 | |
circle <- function(x = 0, y = 0 + 20, rad = 1, nvert = 500, ...){ | |
rads <- seq(0,2*pi,length.out = nvert) | |
xcoords <- cos(rads) * rad + x | |
ycoords <- sin(rads) * rad + y | |
cbind(x = xcoords, y = y_dist, z = ycoords) |
NewerOlder