Skip to content

Instantly share code, notes, and snippets.

View a10k's full-sized avatar

Alok Pepakayala a10k

View GitHub Profile
@a10k
a10k / d3.v3.min.js
Created December 4, 2015 04:26
Amol
!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function u(n){return!isNaN(n)}function i(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function a(n){return n.length}function o(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function s(n){return(n+="")===xa||n[0]===ba?ba+n:n}function f(n){return(n+="")[0]===ba?n.slice(1):n}function h(n){return s(n)in this._}function g(n){return(n=s(n))in this._&&delete this._[n]}function p(){var n=[]
@a10k
a10k / index.html
Created November 30, 2015 10:49
uk temp
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>UK Temperature History</title>
<link rel="stylesheet" href="http://charts.animateddata.co.uk/uktemperaturelines/css/reset.css">
<link rel="stylesheet" href="http://charts.animateddata.co.uk/uktemperaturelines/css/style.css">
<style>
body,html{
background-color: #fff
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Venn Diagrams with D3.js</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://www.benfrederickson.com/venn-diagrams-with-d3.js/" />
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
@a10k
a10k / data.tsv
Last active November 30, 2015 09:18
letter frequency
A .08167
B .01492
C .02780
D .04253
E .12702
F .02288
G .02022
H .06094
@a10k
a10k / index.html
Last active November 28, 2015 09:22
uber
<!DOCTYPE html>
<html class="ocks-org do-not-copy">
<meta charset="utf-8">
<title>Uber Rides by Neighborhood</title>
<style>
#circle circle {
fill: none;
pointer-events: all;
}
@a10k
a10k / index.html
Last active November 28, 2015 09:05
titanic
<!DOCTYPE html>
<meta charset="utf-8">
<title>Parallel Sets</title>
<style>
.dimension { cursor: ns-resize; }
.category { cursor: ew-resize; }
.dimension tspan.name { font-size: 1.5em; fill: #333; font-weight: bold; }
.dimension tspan.sort { fill: #000; cursor: pointer; opacity: 0; }
.dimension tspan.sort:hover { fill: #333; }
.dimension:hover tspan.name { fill: #000; }
@a10k
a10k / index.html
Created November 28, 2015 08:42
mergesort
<!DOCTYPE html>
<meta charset="utf-8">
<style>
line {
stroke: #002776;
stroke-width: 5px;
}
</style>
<body>
@a10k
a10k / index.html
Created November 28, 2015 08:20
quicksort
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<style>
line {
stroke: #002776;
stroke-width: 5px;
}
@a10k
a10k / index.html
Last active November 17, 2015 19:14
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Sankey Diagram</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.9/d3.min.js"></script>
<style type="text/css">
body {
margin: 1em;
}
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->