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(igraph) | |
library(grid) | |
library(gridGraphics) | |
#### Make a base graph #### | |
g <- make_tree(15) + | |
edges(4, 7, | |
8, 14, | |
9, 10, | |
15, 13) |
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(igraph) | |
g <- make_tree(10) + | |
edge(6, 9, | |
7, 10, | |
8, 9) | |
is_dag(g) | |
wc <- cluster_walktrap(g) |
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('spotifyr') | |
library(spotifyr) | |
library(tidyverse) | |
library(httr) | |
Sys.setenv(SPOTIFY_CLIENT_ID = "NOT_TELLING") | |
Sys.setenv(SPOTIFY_CLIENT_SECRET = "NOT_TELLING") | |
spotify_df <- get_artist_audio_features('linkin park') | |
write_csv(spotify_df, 'linkin_park_spotify.csv') |
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(igraph) | |
library(animation) | |
#===============================# | |
#===== Simple ==================# | |
#===============================# | |
saveGIF({ | |
ani.options(ani.width = 800, | |
ani.width = 800, |
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(igraph) | |
#### | |
# The pattern is to identify points to extend the structure of | |
# dyads and subsequent structures | |
# And make sure the extension isn't already part of the structure | |
#### |
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
#### | |
# Dependencies | |
#### | |
library(tidyverse) | |
library(igraph) | |
#### | |
# The pattern is to identify points to extend the structure of |
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(igraph) | |
g <- make_lattice(c(5, 5)) | |
ego(g, order = 1, mindist = 1) | |
head_of(g, E(g)) | |
he <- ego(g, order = 1, mindist = 1, nodes = head_of(g, E(g))) |
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
<body></body> | |
<script src="https://rawgit.com/gka/d3-jetpack/master/build/d3v4%2Bjetpack.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.20.3/TweenMax.min.js"></script> | |
<script> | |
//////////////////////////////////////////// | |
// LETS CREATE THE DOM WITH D3.jetpack | |
//////////////////////////////////////////// | |
var data = [{text: 'this', num: 150}, | |
{text: 'data', num: 125}, |
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
<head> | |
<style> | |
#hello div { | |
float: left | |
} | |
</style> | |
</head> | |
<body> | |
<div id = 'hello'></div> | |
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
<head></head> | |
<body> | |
<svg height = '1050px' width = '1500px'> | |
<radialGradient id="gr-radial" | |
cx="50%" cy="50%" r="70%"> | |
<!-- Animation for radius of gradient --> | |
<animate attributeName="r" | |
values="0%;175%" | |
dur="10s" repeatCount="indefinite" /> |