This file contains hidden or 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
#=============================================================================== | |
# 2023-11-06 -- 30DayMapChallenge | |
# ASIA -- restaurants in Denmark | |
# Ilya Kashnitsky, [email protected], @ikashnitsky.phd | |
#=============================================================================== | |
library(tidyverse) | |
library(magrittr) | |
library(osmdata) | |
library(eurostat) |
This file contains hidden or 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
# 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 |
This file contains hidden or 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(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, ~{ | |
This file contains hidden or 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) | |
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) { |
This file contains hidden or 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) | |
manufacturers <- mpg |> | |
count(manufacturer, sort = TRUE) |> | |
mutate( | |
manufacturer = str_to_title(manufacturer), | |
manufacturer = fct_reorder(manufacturer, n) | |
) |
This file contains hidden or 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 all the libraries needed | |
library(sf) | |
library(dplyr) | |
library(rayrender) | |
library(elevatr) | |
library(rayshader) | |
library(geojsonsf) | |
library(raster) | |
library(lidR) |
This file contains hidden or 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(rnaturalearthdata) | |
library(sf) | |
library(ggthemes) | |
country_sf <- countries110 %>% | |
st_as_sf() | |
ggplot() + | |
geom_sf(data = country_sf, |
This file contains hidden or 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(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)) |
This file contains hidden or 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
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/ |
This file contains hidden or 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(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") |
NewerOlder