Skip to content

Instantly share code, notes, and snippets.

View BB1464's full-sized avatar

Oluwafemi OYEDELE BB1464

View GitHub Profile
@ikashnitsky
ikashnitsky / asian-restaurants-dk.R
Created November 6, 2023 11:55
Map all OSM restaurant of Denmark and highlight Asian cuisine ones calculate % in regions
#===============================================================================
# 2023-11-06 -- 30DayMapChallenge
# ASIA -- restaurants in Denmark
# Ilya Kashnitsky, [email protected], @ikashnitsky.phd
#===============================================================================
library(tidyverse)
library(magrittr)
library(osmdata)
library(eurostat)
@jnolis
jnolis / bingo.R
Last active August 31, 2023 13:17
Generate bingo sheets
# This code generates however many bingo sheets you need
# It requires you to have "squares.csv", a single column csv file with
# name "square" and a row for the text in each square.
#
# You also need to install wkhtmltopdf https://wkhtmltopdf.org/ and
# add it to your system path. This converts the html to a pdf page
# libraries: tidyverse, glue, rmarkdown
#
# Also make a folder "output" to store them to
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, ~{
@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) {
@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 / 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)
@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,
@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))
@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/
@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")