Skip to content

Instantly share code, notes, and snippets.

View jalapic's full-sized avatar

James Curley jalapic

View GitHub Profile
#devtools::install_github('thomasp85/ggforce')
#devtools::install_github("dgrtwo/gganimate")
#devtools::install_github('thomasp85/ggraph')
#devtools::install_github("hadley/ggplot2")
library(ggraph)
library(ggforce)
library(gganimate)
library(ggplot2)
library(igraph)
#devtools::install_github('thomasp85/ggforce')
#devtools::install_github("dgrtwo/gganimate")
#devtools::install_github('thomasp85/ggraph')
#devtools::install_github("hadley/ggplot2")
library(ggraph)
library(ggforce)
library(gganimate)
library(ggplot2)
library(igraph)
@jalapic
jalapic / tmp.R
Last active February 17, 2023 07:33
testing clickaction
library(randomNames)
library(networkD3)
library(igraph)
set.seed(3)
nl = 100
df = data.frame(source = randomNames(1000,which.names='both', name.order = 'first.last', name.sep=' '), target = '')
df = df[rep(seq_len(nrow(df)), sample(1:10,nrow(df), replace=T)),]
df = df[sample(nrow(df),nl),]
df$target = sample(df$source,nrow(df), replace = T)
@jalapic
jalapic / README.md
Last active April 9, 2016 02:51
tickplot2
@jalapic
jalapic / .block
Last active December 26, 2016 03:33
Dice roll probabilities
license: mit
@jalapic
jalapic / README.md
Created March 13, 2016 19:41
VI7: Node-link diagram and Adjacency matrix

Node-link Diagram

I added a new attribute to the dataset which is region.

In the node-link diagram, states in the same region likely stick together as they have links in between.

States in region which has less number of links spread out in the diagram. For example: look at the light-green color (South Atlantic), Florida is far apart with those states (DC, Maryland, Virginia, West Viginia, Delaware).

Thus, although the dataset is non-spatial, users can explore the relationship of nodes by looking the distance or number of hops in between.

@jalapic
jalapic / README.md
Last active March 9, 2016 03:15
network fade 3
@jalapic
jalapic / .block
Created March 8, 2016 02:54
Teacher Wages
height: 800
@jalapic
jalapic / README.md
Created March 8, 2016 02:50
TSNE Plot of Yelp Reviews

An illustration of TSNE layout of word2vec output from a subset of Yelp reviews.

Use the mouse to click on a dot and see the word plotted. Click a label to hide it again.

Color indicates polarity based on simple word labeling from the AFINN wordlist. It may be that context in this dataset affects polarity :)

forked from arnicas's block: TSNE Plot of Yelp Reviews