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
| #### R4DS TidyTuesday 2018-08-21 | |
| #### Exploring California widfires | |
| #### https://github.com/rfordatascience/tidytuesday/tree/master/data/2018-08-21 | |
| #### By Kevin Soo | |
| # Load libraries | |
| library(tidyverse) | |
| library(gganimate) | |
| library(scales) |
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 stuff | |
| library(tidyverse) | |
| library(gganimate) | |
| #### Generate data | |
| n <- 20 # Number of iterations/steps | |
| # Random walk for 4 players, add players as needed | |
| df <- tibble( | |
| ite = 0: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
| #### Code for making ketupat | |
| #### By Kevin Soo | |
| library(tidyverse) | |
| data <- tibble( | |
| x = c(2, 3, 3, 4, 4, 4, 5, 5, 6) + 1, | |
| y = c(3, 4, 2, 5, 3, 1, 4, 2, 3) + 2, | |
| z = as.factor(c(1, 2, 2, 1, 1, 1, 2, 2, 1)) | |
| ) |
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 script takes a data frame of guest characteristics and assigns them to tables based on similarity | |
| # The 'GuestData.csv' should have the following columns: 'LastName', 'FirstName', 'Attribute1', 'Attribute2', etc. | |
| # Each attribute should be a vector of 1's and 0's | |
| # load packages | |
| library(tidyverse) | |
| library(reshape2) | |
| library(lsa) | |
| library(devtools) | |
| library(igraph) |
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
| ####################################################################################### | |
| #### Script to send emails out to hosts and guests for Guess Who's Coming to Dinner, | |
| #### City Reformed Presbyterian Church's annual event pairing people with random/secret | |
| #### dinner partners. This script takes information about participants and emails them. | |
| #### Author: Kevin Soo | |
| ####################################################################################### | |
| # load libraries | |
| library(tidyverse) | |
| library(gmailr) |
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 a scatterplot with a greeting | |
| # Maybe next year I'll get my wife a real card + flowers | |
| # load libraries | |
| library(tidyverse) | |
| library(gganimate) | |
| library(ggthemes) | |
| # data (greeting can be changed here) | |
| text <- c("Happy", "Valentine's", "Day", "to", "my", "statistically", "significant", "other!", "Though", "the", "holiday", "is", "arbitrary,", "every", "extra", "day", "with", "you", "means", "the", "world", "to", "me!") |
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 was used to create an xkcd-themed graph used for our Save The Date | |
| # Import libraries | |
| library("ggplot2") | |
| library("xkcd") | |
| # Create data for plotting | |
| Evelyn <- sin(1/(1:40)^1.5) | |
| Kevin <- -sin(1/(1:40)^1.5) | |
| t <- c(1:40) |