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(suncalc) ## https://CRAN.R-project.org/package=suncalc | |
library(scales) ## So I can use date_breaks etc on chart | |
library(lubridate) ## for dealing with time! | |
library(ggrepel) | |
interest <- c("dawn","sunrise","goldenHourEnd","goldenHour","sunset","dusk") | |
## dawn - sunrise - goldenHourEnd ==> Great time for photography in the morning. |
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
## 2018 Calendar | |
library(tidyverse) | |
library(hrbrthemes) | |
library(scales) | |
library(lubridate) | |
library(ggthemes) | |
## Set Global Option for Lubridate | |
options("lubridate.week.start"=1) ## 1 sets to Monday |
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(soilDB) | |
library(tidyverse) | |
# load sample data from the soilDB package | |
data(loafercreek, package = "soilDB") | |
sample_set <- loafercreek@horizons %>% filter(!is.na(soil_color)) | |
golden_angle <- pi*(3-sqrt(5)) |
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(lubridate) | |
library(scales) | |
df <- tibble( | |
date = seq.Date(from=ymd("2019-01-01"),to=ymd("2019-12-31"),by="day"), | |
wkdy = wday(date,label=T), | |
mo = month(date,label=T), | |
mo.num = month(date,label=F), | |
day = day(date) |
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
## Getting Ready for 2019 | |
library(lubridate) | |
library(tibble) | |
options("lubridate.week.start"=1) ## 1 sets to Monday | |
calendar <- tibble( | |
date = seq.Date(from=ymd("2018-12-31"),to=ymd("2019-12-31"), by="day") | |
) |
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
--- | |
title: "Spirograph Inspired Drawing" | |
output: html_notebook | |
editor_options: | |
chunk_output_type: console | |
--- | |
Spirograph Inspired Drawing & Collaging Them Together. | |
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(deldir) | |
library(packcircles) | |
packing <- circleProgressiveLayout(x=runif(1000)) %>% mutate(id=row_number()) | |
data_gg <- circleLayoutVertices(packing, npoints = 36) %>% | |
inner_join(packing %>% select(id,radius), by=c("id")) | |
dxy1 <- deldir(packing$x, packing$y) |
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(imager) | |
library(TSP) | |
im <- load.image("https://static.highsnobiety.com/wp-content/uploads/2018/12/06095023/pantone-living-coral-color-2019-01-480x320.jpg") | |
im.df <- im %>% | |
imager::RGBtoHSV() %>% | |
as.data.frame(wide="c") %>% |
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
install.packages("beeswarm") | |
library(beeswarm) | |
library(tidyverse) | |
library(scales) | |
df <- tibble( | |
x = sample(x=c(2,6,17,24,25), size=3000, replace=T), | |
#x = sample(x=c(1,10,13,16,19,20,21), size=3000, replace=T), | |
y = rbeta(3000,2,5), |
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(aplpack) | |
draw_faces <- function(x=c(0,1,2,3,4,5),size=25, ncolors=10){ | |
df <- tibble( | |
face_h = sample(x, size=size, replace=T), | |
face_w = sample(x, size=size, replace=T), | |
face_s = sample(x, size=size, replace=T), | |
mouth_h = sample(x, size=size, replace=T), | |
mouth_w = sample(x, size=size, replace=T), |
OlderNewer