Skip to content

Instantly share code, notes, and snippets.

View timelyportfolio's full-sized avatar

timelyportfolio timelyportfolio

View GitHub Profile
@syntagmatic
syntagmatic / 120cell.ascii
Last active August 27, 2015 18:33
Dodecaplex
600
1.85123 0.27009 0 0.707106
1.85123 -0.27009 0 0.707106
1.85123 0.437016 0.437016 0.437016
1.85123 -0.437016 0.437016 0.437016
1.85123 0 0.707106 0.27009
1.85123 0.437016 -0.437016 0.437016
1.85123 -0.437016 -0.437016 0.437016
1.85123 0 -0.707106 0.27009
1.85123 0.27009 0 -0.707106
@biovisualize
biovisualize / capture.js
Created February 4, 2014 15:56
Phantomjs waitfor and write svg to file
var page = require('webpage').create(),
system = require('system');
fs = require('fs');
var waitFor = function(testFx, onReady, timeOutMillis) {
var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 3000, //< Default Max Timout is 3s
start = new Date().getTime(),
condition = false;
var interval = setInterval(function() {
console.log('wait');
@ramnathv
ramnathv / code.R
Created February 5, 2014 06:11
Scatter Matrix (Courtesy: JH)
# Get Data
library(RCurl)
f <- getURL("https://raw.github.com/benjh33/benjh33.github.io/cd768434d02b39b01615d03f04a68b0fe33eb76e/_data/data_files/electric.dat")
d <- read.table(text = f, header = T)
d <- d[, -grep("Supplement", names(d))]
# Create Chart
chart <- rCharts$new()
chart$setLib("http://benjh33.github.io/rchart_plugins/scatter_matrix")
chart$set(
@kevinschaul
kevinschaul / README.md
Last active August 29, 2015 13:56
Interaction for star plots in d3
@lightviz
lightviz / index.html
Last active August 29, 2015 13:56
Oboe.js + D3.js 2 (spiral)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Oboe.js + D3.js 2 (spiral)</title>
<style type="text/css" href="style.css">
body {
margin: 0px;
padding: 0px;
@wboykinm
wboykinm / README.md
Last active August 29, 2015 13:56 — forked from kerryrodden/.block

This example shows how it is possible to use a D3 sunburst visualization (partition layout) with data that describes sequences of events.

A good use case is to summarize navigation paths through a web site, as in the sample synthetic data file (visit_sequences.csv). The visualization makes it easy to understand visits that start directly on a product page (e.g. after landing there from a search engine), compared to visits where users arrive on the site's home page and navigate from there. Where a funnel lets you understand a single pre-selected path, this allows you to see all possible paths.

Features:

  • works with data that is in a CSV format (you don't need to pre-generate a hierarchical JSON file, unless your data file is very large)
  • interactive breadcrumb trail helps to emphasize the sequence, so that it is easy for a first-time user to understand what they are seeing
  • percentages are shown explicitly, to help overcome the distortion of the data that occurs wh
#!/bin/bash
MOVIE=$1
ffmpeg -i $MOVIE -r 10 -vcodec png out-static-%05d.png
convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $MOVIE.gif
rm out-static*.png
@emeeks
emeeks / cosit.gexf
Last active August 29, 2015 13:57
GEXF D3 Complex Example
<?xml version="1.0" encoding="UTF-8"?>
<gexf xmlns="http://www.gexf.net/1.2draft" version="1.2" xmlns:viz="http://www.gexf.net/1.2draft/viz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.gexf.net/1.2draft http://www.gexf.net/1.2draft/gexf.xsd">
<meta lastmodifieddate="2014-03-04">
<creator>Gephi 0.8.1</creator>
<description></description>
</meta>
<graph defaultedgetype="directed" mode="static">
<attributes class="node" mode="static">
<attribute id="startyr" title="startyr" type="integer"></attribute>
<attribute id="title" title="title" type="string"></attribute>
@Pakillo
Pakillo / ncites_scholar
Last active August 29, 2015 13:57
Retrieve number of citations of a paper in Google Scholar
#' Retrieve number of citations of a paper in Google Scholar
#'
#' This function retrieves the number of citations of a given paper in Google Scholar.
#'
#' @param user character vector. The user ID in Google Scholar Citations. Obtain from author's profile website in google scholar (http://scholar.google.com/citations?user=...)
#' @param paper character vector. The paper ID in Google Scholar Citations. Copy from publication list in author's profile website.
#' @author F. Rodriguez-Sanchez
#' @examples
#' ncites_scholar(user="B7vSqZsAAAAJ", paper="d1gkVwhDpl0C")
#'
@slnader
slnader / README.md
Last active August 29, 2015 13:57
Positive and Negative Values Bar Chart

Barchart with positive and negative values and a dropdown to toggle between metrics. Use the dropdown menu to toggle between trends in demand rides and bus rides between 2010 and 2011, for cities with metro areas over 1 million people. Data source: Bus ride and demand ride transportation statistics from the American Public Transportation Association, 2010-2011.