Skip to content

Instantly share code, notes, and snippets.

View jalapic's full-sized avatar

James Curley jalapic

View GitHub Profile
@jalapic
jalapic / README.md
Last active March 6, 2016 20:22
small multiple lines
@jalapic
jalapic / README.md
Last active March 5, 2016 19:50
gini curves linked
@jalapic
jalapic / README.md
Created March 4, 2016 23:55
Subway Wait Assessment
@jalapic
jalapic / README.md
Last active March 5, 2016 05:02
gini curves
@jalapic
jalapic / README.md
Created March 4, 2016 04:50
gini curves
@jalapic
jalapic / README.md
Created March 4, 2016 02:42
Point Tracking for Non-Linear Lines: III

What This Shows

Using data from the US Census, this visualization displays popular names that have historically been androgynous.

Technical

Control points are not intersected by the path for several non-linear interpolations for lines ("basis" in this case). Because of this, point tracking for non-linear lines should be calculated from the svg-path rather than from the d3-scales. Mike Bostock has two examples showing how to do this with a single path. This gist shows one approach for point tracking with multiple paths. Other approaches are shown here and here.

This approach saves precomputed closestPoints of each data point's linear coordinates respective to their parent path. The precomputation took 63.85 seconds (~0.16 seconds per point). What still remains for

@jalapic
jalapic / gist:246b3bdead844afcb1a9
Last active March 2, 2016 20:10
Animal Behaviour journal ggplot2 theme
## Animal Behaviour journal ggplot2 theme
## Please contact me (jc3181 AT columbia DOT edu) if have improvements or comments
theme_animalbehaviour <- theme(plot.title = element_text(hjust = 0, vjust = 1, size = rel(2.3)),
panel.background = element_blank(),
plot.background = element_blank(),
panel.grid.major.x = element_blank(),
panel.grid.minor = element_blank(),
strip.background = element_blank(),
panel.border = element_rect(fill = NA, colour = "black"),
@jalapic
jalapic / .block
Last active July 25, 2016 20:59
two large matrices
license: gpl-3.0
@jalapic
jalapic / README.md
Last active March 1, 2016 14:50
fresh block
@jalapic
jalapic / README.md
Created February 29, 2016 15:44
AFSC Utility by Multi-Barchart