Skip to content

Instantly share code, notes, and snippets.

View sruthinagalla's full-sized avatar
🎾

Sruthi Nagalla sruthinagalla

🎾
View GitHub Profile
@sruthinagalla
sruthinagalla / index.html
Created November 27, 2016 17:49 — forked from dnprock/index.html
World Map
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
width: 960px;
height: 500px;
position: relative;
}
@sruthinagalla
sruthinagalla / README.md
Last active November 26, 2016 00:47 — forked from jhb/README.md
Graph with labeled edges

A graph with force layout (using d3.js) and labels on edges, autorotation of those labels and arrowheads

@sruthinagalla
sruthinagalla / graphFile.json
Last active November 25, 2016 05:40
A Simple d3 Network Graph
{
"nodes":[
{"name":"node1","group":1},
{"name":"node2","group":2},
{"name":"node3","group":2},
{"name":"node4","group":3}
],
"links":[
{"source":2,"target":1,"order":1},
{"source":0,"target":2,"order":30}
@sruthinagalla
sruthinagalla / brush.js
Created October 30, 2016 07:22 — forked from dukevis/brush.js
d3 Tutorial: Coordinated Views
if(!d3.chart) d3.chart = {};
d3.chart.brush = function() {
var g;
var data;
var width = 600;
var height = 30;
var dispatch = d3.dispatch(chart, "filter");
function chart(container) {
@sruthinagalla
sruthinagalla / brush.js
Last active November 2, 2016 19:14 — forked from nlercari/brush.js
if(!d3.chart) d3.chart = {};
d3.chart.brush = function() {
var g;
var data;
var width = 600;
var height = 30;
var dispatch = d3.dispatch(chart, "filter");
function chart(container) {
@sruthinagalla
sruthinagalla / index.html
Created October 26, 2016 16:00
D3 implementation of Diverging charts
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Diverging Color Map with D3.js</title>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/d3/3.4.13/d3.min.js"></script>
</head>
<body>
@sruthinagalla
sruthinagalla / data.csv
Last active October 7, 2016 02:00 — forked from d3noob/.block
The closest the driver has come to running out of fuel.
date close
5-Feb-10 0.001
6-Feb-10 9.622
10-Feb-10 7.989
24-Feb-10 11.869
27-Feb-10 9.052
6-Mar-10 10.407
9-Mar-10 6.955
16-Mar-10 11.148
21-Mar-10 11.232
@sruthinagalla
sruthinagalla / data2b.csv
Last active October 7, 2016 01:56 — forked from d3noob/.block
Maximum fuel filled
date fillAmount
2/5/2010 0.001
2/6/2010 9.622
2/10/2010 7.989
2/24/2010 11.869
2/27/2010 9.052
3/6/2010 10.407
3/9/2010 6.955
3/16/2010 11.148
3/21/2010 11.232
@sruthinagalla
sruthinagalla / index.html
Last active October 7, 2016 02:10 — forked from mbostock/.block
MPG vs Season
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.bar rect {
fill: steelblue;
}
.bar text {
fill: #fff;
@sruthinagalla
sruthinagalla / index.html
Last active October 6, 2016 07:06 — forked from d3noob/.block
MBTA Red Line station onboarding statistics
<!DOCTYPE html>
<meta charset="utf-8">
<style> /* set the CSS */
.bar { fill: steelblue; }
</style>
<body>
<!-- load the d3.js library -->