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(ambient) | |
intrusion <- function(filename, shade = "#b3b3ff", seed = 1, | |
frak_one = 3, frak_two = 2, | |
pixels_wide = 1000, pixels_high = 1000, | |
colors_used = 1000) { | |
# transformation functions ------------------------------------------------ | |
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(flametree) # https://github.com/djnavarro/flametree | |
library(scopes) # https://github.com/djnavarro/scopes | |
library(ggforce) | |
library(ggplot2) | |
library(dplyr) | |
library(ambient) | |
# settings | |
pixels <- 1000 | |
fname <- "~/Desktop/scopetree.png" |
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) | |
img <- bomrang::get_satellite_imagery( | |
product_id = "IDE00427.201912280400.tif", | |
cache = TRUE | |
) %>% stars::st_as_stars() | |
ggplot() + | |
stars::geom_stars(data = img) |
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
# illustrate that the temporally-accrued evidence in an Ornstein- | |
# Uhlenbeck model of perceptual decision-making is bounded | |
t <- 500 # length of time to run the process | |
drift <- .2 # drift rate measures the perceptual signal strength | |
leak <- .9 # evidence leakage rate | |
# momentary samples are presumed to generate normally distributed | |
# evidence with mean corresponding to drift rate, and (for reasons | |
# known but to Roger) standard deviation .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
library(flametree) | |
library(ggplot2) | |
library(gganimate) | |
dat <- flametree_grow(time = 13) | |
pic <- ggplot( | |
data = dat, | |
mapping = aes( | |
x = coord_x, |
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(jasmines) | |
library(dplyr) | |
# data structure to plot | |
dat <- use_seed(1) %>% | |
scene_bubbles(n = 3, grain = 10000) %>% | |
mutate(x = x * 2, y = y * 2) %>% | |
unfold_tempest( | |
iterations = 4, | |
scale = .05, |
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(ambient) # may need dev version: https://github.com/thomasp85/ambient | |
library(viridis) | |
# specify the seed and grain | |
seed <- 272 | |
grain <- 1000 | |
# specify the circle | |
origin_x <- .3 | |
origin_y <- .5 |
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
# https://github.com/djnavarro/jasmines | |
library(jasmines) | |
library(dplyr) | |
simple_plot <- function(octaves) { | |
dat <- use_seed(259) %>% | |
scene_rows( | |
n = 5, |
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
# name myself on git | |
system2( | |
'git config --global user.email "[email protected]"; | |
git config --global user.name "Danielle Navarro"' | |
) |
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(ggplot2) | |
library(scales) | |
# transformation | |
log_sign_trans <- trans_new( | |
name = "log_sign", | |
transform = function(x) {sign(x) * log(abs(x))}, | |
inverse = function(x){sign(x)} * exp(abs(x)) | |
) |