For continuous data such as time series, a streamgraph can be used in place of stacked bars. This example also demonstrates path transitions to interpolate between different layouts. Streamgraph algorithm, colors, and data generation inspired by Byron and Wattenberg.
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
#!/bin/bash | |
PREFIX=$(basename "$1" .pdf) | |
if [ ! -z "$TESSERACT_FLAGS" ]; then | |
echo "Picked up TESSERACT_FLAGS: $TESSERACT_FLAGS" | |
fi | |
echo "Prefix is: $PREFIX" | |
echo "Converting to TIFF..." | |
if command -v parallel >/dev/null 2>&1; then | |
LAST_PAGE=$(($(pdfinfo "$1"|grep '^Pages:'|awk '{print $2}') - 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
####################################################### | |
#### Created by Rolf Lohaus, EEB Dept., Rice University | |
#### | |
#### Part of the code modified and extended from | |
#### Robert I. Kabacoff's Quick-R website | |
#### (http://www.statmethods.net) | |
####################################################### | |
############### HIGH-LEVEL PLOTTING 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
var express = require('express'); | |
var http = require('http'); | |
var path = require('path'); | |
var request = require('request'); | |
var $ = require('cheerio'); | |
var WSJ_PRIME_URL = 'http://www.bankrate.com/rates/interest-rates/wall-street-prime-rate.aspx'; | |
var app = express(); |
Put your ssh key on the server:
$ ssh-copy-id [email protected]
On the server, create a bare git repo:
$ mkdir website.git
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
//adapted from the LoessInterpolator in org.apache.commons.math | |
function loess_pairs(pairs, bandwidth) | |
{ | |
var xval = pairs.map(function(pair){return pair[0]}); | |
var yval = pairs.map(function(pair){return pair[1]}); | |
console.log(xval); | |
console.log(yval); | |
var res = loess(xval, yval, bandwidth); | |
console.log(res); | |
return xval.map(function(x,i){return [x, res[i]]}); |
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
/*###### | |
John McGrath via the Google Fusion Tables group authored this script which creates a "sync" between a Google spreadsheet and a Fusion Table. | |
He has since posted it to GitHub here: https://github.com/jomcgrath2/Fusion-to-Spreadsheet | |
######*/ | |
var tableID = ' ' // Add the table ID of the fusion table here | |
var sheetNumber = 1 //Sheet number goes here (the first sheet is number 1 second is number 2 etc.) |
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
body { | |
font-family: Helvetica, Verdana | |
} | |
p { | |
padding: 7px 10px; | |
} | |
#demo { | |
border: 1px solid #999; | |
} |
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
(function($) { | |
/** | |
* We have to get a collection of id's because the HTML5 player moves the DOM | |
* around and returns different elements when caching the selectors. | |
*/ | |
var elements = $('.video-player > div, .video-player object'), | |
playerIds = []; | |
elements.each(function(i, player) { | |
playerIds.push(player.id); |
NewerOlder