Skip to content

Instantly share code, notes, and snippets.

@dukevis
dukevis / basketball_data2.csv
Last active August 29, 2015 13:56
ACC Basketball Line Chart
Year Clem Duke MD UNC NCS UVA WF
1954 0 1 1 0 3 0 2
1955 0 3 1 0 6 1 3
1956 0 4 1 1 9 1 5
1957 0 4 2 3 9 1 6
1958 0 5 5 5 10 1 6
1959 0 6 5 7 13 2 6
1960 0 9 5 8 14 2 8
1961 0 11 6 8 14 2 10
1962 2 12 6 8 14 2 13
@dukevis
dukevis / index.html
Last active August 29, 2015 13:56
Remove Elements with Key Functions
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Title Here</title>
<script type="text/javascript" src="../d3.v3/d3.v3.js"></script>
<style type="text/css">
.axis path,
@dukevis
dukevis / gapminder_avg.csv
Last active August 29, 2015 13:55
Gapminder Subset
country gdp lifeexp population region color rgb loggdp
Kuwait 64256.41951 68.35385246 1313738.049 Middle East & North Africa green [0 1 0] 4.807916522
Luxembourg 36286.24377 72.92478689 375718.3115 Europe & Central Asia orange [1 .6 .3] 4.559742014
United States 28990.59574 73.5852623 235012383.7 America yellow [1 1 0] 4.46225714
Switzerland 27652.04918 75.87004918 6366298.164 Europe & Central Asia orange [1 .6 .3] 4.441727321
Norway 26679.49623 76.09822951 4080763.541 Europe & Central Asia orange [1 .6 .3] 4.426177625
Canada 23079.49098 75.245 24696114.8 America yellow [1 1 0] 4.363226226
Denmark 21603.91131 74.56686885 5024245.492 Europe & Central Asia orange [1 .6 .3] 4.334532386
Netherlands 21320.9518 75.85378689 13871609.03 Europe & Central Asia orange [1 .6 .3] 4.328806588
Iceland 21246.22459 76.66583607 232060.2459 Europe & Central Asia orange [1 .6 .3] 4.327281768
@dukevis
dukevis / index.html
Last active August 29, 2015 13:55
Add Value Bar Chart on Click
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Title Here</title>
<script type="text/javascript" src="../d3.v3/d3.v3.js"></script>
@dukevis
dukevis / index.html
Last active August 29, 2015 13:55
Bar Transitions with Dynamic Scales
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Title Here</title>
<script type="text/javascript" src="../d3.v3/d3.v3.js"></script>
@dukevis
dukevis / index.html
Last active August 29, 2015 13:55
Dynamic Scales
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Title Here</title>
<script type="text/javascript" src="../d3.v3/d3.v3.js"></script>
<style type="text/css">
.axis path,
.axis line{
fill: none;
@dukevis
dukevis / index.html
Last active January 4, 2016 17:19
ClippingMask
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Title Here</title>
<script type="text/javascript" src="../d3.v3/d3.v3.js"></script>
<style type="text/css">
.axis path,
.axis line{
fill: none;
@dukevis
dukevis / index.html
Last active January 4, 2016 15:09
Transitions
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Title Here</title>
<script type="text/javascript" src="../d3.v3/d3.v3.js"></script>
</head>
@dukevis
dukevis / index.html
Last active January 4, 2016 01:39
Scatter With Labels
<!DOCTYPE html>
<html lang="en">
<head>
<style type="text/css">
.axis path,
.axis line{
fill: none;
stroke: black;
shape-rendering: crispEdges;
@dukevis
dukevis / accvisual.css
Last active December 31, 2015 15:19
ACC Tournament Chord Diagram
.chord path {
fill-opacity: .67;
stroke: #000;
stroke-width: .5px;
}
.ticks {
font-family: sans-serif;
}