Skip to content

Instantly share code, notes, and snippets.

View jeffwong's full-sized avatar

Jeffrey Wong jeffwong

  • San Francisco, CA
View GitHub Profile
@grrowl
grrowl / flattenjson.html
Last active January 2, 2016 08:29
Flattens multi-level JSON objects (useful for converting complex JSON to CSV format)
<style>
textarea { height: 400px; width: 100%; }
</style>
<h1>flatten json</h1>
<textarea id="data">[]</textarea>
<button id="goByLine">line-by-line</button>
<button id="goWhole">as whole object</button>
<textarea id="result"></textarea>
# Multiple plot function
#
# ggplot objects can be passed in ..., or to plotlist (as a list of ggplot objects)
# - cols: Number of columns in layout
# - layout: A matrix specifying the layout. If present, 'cols' is ignored.
#
# If the layout is something like matrix(c(1,2,3,3), nrow=2, byrow=TRUE),
# then plot 1 will go in the upper left, 2 will go in the upper right, and
# 3 will go all the way across the bottom.
#