Skip to content

Instantly share code, notes, and snippets.

View BB1464's full-sized avatar

Oluwafemi OYEDELE BB1464

View GitHub Profile
@tylermorganwall
tylermorganwall / christmas_csg_realistic_camera.R
Created December 24, 2021 19:43
CSG Christmas Tree in R
library(rayrender)
#Generate CSG branches
branches0 = csg_cone(end=c(0,0.5,0)) %>%
csg_combine(csg_cone(start=c(0,0.25,0),end=c(0,0.75,0), radius=0.75), operation="blend", radius = 0.7)%>%
csg_scale(1.25)
branches1 = csg_cone(end=c(0,0.5,0)) %>%
csg_combine(csg_cone(start=c(0,0.25,0),end=c(0,0.75,0), radius=0.75), operation="blend", radius = 0.7)
@tylermorganwall
tylermorganwall / cloud_animate.R
Created February 1, 2022 04:34
Cloud animate
library(rayshader)
montereybay2 = montereybay
montereybay2[montereybay2<0] = 0
for(i in 1:720) {
montereybay2 %>%
sphere_shade() %>%
add_water(detect_water(montereybay2), color="lightblue") |>
add_shadow(cloud_shade(montereybay2,zscale=50, sun_altitude = 90, seed=10, attenuation_coef = 1, time=i,
@tylermorganwall
tylermorganwall / interactive_tutorial.R
Last active November 27, 2023 05:39
3D Interactive R Tutorial
library(rayshader)
library(rayrender)
library(ggplot2)
ggdiamonds = ggplot(diamonds) +
stat_density_2d(aes(x = x, y = depth, fill = stat(nlevel)),
geom = "polygon", n = 200, bins = 50,contour = TRUE) +
facet_wrap(clarity~.) +
scale_fill_viridis_c(option = "A")
@pedrocoutinhosilva
pedrocoutinhosilva / References
Last active April 4, 2023 18:25
Masterclass: Top Innovations in Shiny in 2022 - Pedro Silva
Social
github.com/pedrocoutinhosilva
linkedin.com/in/pedrocoutinhosilva
twitter.com/sparktuga
www.pedrocsilva.com
Examples
https://appsilon.com/journey-from-basic-prototype-to-production-ready-shiny-dashboard/
http://uaborder.com/
https://appsilon.com/is-it-possible-to-build-a-video-game-in-r-shiny/
@z3tt
z3tt / penguins_rainclouds.R
Last active July 9, 2025 20:02
Polished raincloud plot using the Palmer penguins data
library(dplyr)
library(forcats)
library(ggplot2)
library(palmerpenguins)
library(ggtext)
library(colorspace)
library(ragg)
url <- "https://raw.githubusercontent.com/allisonhorst/palmerpenguins/master/man/figures/lter_penguins.png"
img <- magick::image_read((url))
@BB1464
BB1464 / World_Map.R
Created July 9, 2022 07:39
My demo on GeoSpatial Analysis in R
library(tidyverse)
library(rnaturalearthdata)
library(sf)
library(ggthemes)
country_sf <- countries110 %>%
st_as_sf()
ggplot() +
geom_sf(data = country_sf,
@tylermorganwall
tylermorganwall / national_mall_3d.R
Created November 11, 2022 14:15
3D National Mall with Trees and Buildings in Rayshader
#Load all the libraries needed
library(sf)
library(dplyr)
library(rayrender)
library(elevatr)
library(rayshader)
library(geojsonsf)
library(raster)
library(lidR)
@AlbertRapp
AlbertRapp / lollipop.R
Created December 31, 2022 19:22
Lollipop chart comparison with bar chart
library(tidyverse)
manufacturers <- mpg |>
count(manufacturer, sort = TRUE) |>
mutate(
manufacturer = str_to_title(manufacturer),
manufacturer = fct_reorder(manufacturer, n)
)
@tylermorganwall
tylermorganwall / glowing_contours.R
Created February 24, 2023 02:29
Glowing Contours in R
library(rayshader)
volcano |>
height_shade() |>
plot_3d(volcano,zscale=3)
render_contours(volcano, clear_previous = T, offset=1,color="purple",
zscale=3, nlevels = 20)
for(i in 1:360) {
library(tidycensus)
library(tidyverse)
options(tigris_use_cache = TRUE)
state_names <- c(state.name, "District of Columbia")
names(state_names) <- state_names
tictoc::tic()
age_maps <- map(state_names, ~{