Skip to content

Instantly share code, notes, and snippets.

@valex
valex / index.html
Created November 9, 2017 16:41
Creating a stacked bar graph, d3.js version 4
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<script src="http://d3js.org/d3.v4.min.js"></script>
<script src="https://d3js.org/d3-selection-multi.v1.min.js"></script>
<script>
@valex
valex / index.html
Created November 9, 2017 18:34
Creating a stacked area graph, d3.js version 4
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<script src="http://d3js.org/d3.v4.min.js"></script>
<script src="https://d3js.org/d3-selection-multi.v1.min.js"></script>
<script>
@valex
valex / index.html
Created November 9, 2017 19:26
expanded area graph, d3.js version 4
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<script src="http://d3js.org/d3.v4.min.js"></script>
<script src="https://d3js.org/d3-selection-multi.v1.min.js"></script>
<script>
@valex
valex / index.html
Created November 10, 2017 17:13
Horizontal tree diagram, d3.js version 4
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<script src="http://d3js.org/d3.v4.min.js"></script>
<script src="https://d3js.org/d3-selection-multi.v1.min.js"></script>
<script>
@valex
valex / index.html
Created November 10, 2017 19:52
Creating a cluster dendrogram, d3.js version 4
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<script src="http://d3js.org/d3.v4.min.js"></script>
<script src="https://d3js.org/d3-selection-multi.v1.min.js"></script>
<script>
@valex
valex / index.html
Created November 24, 2017 19:48
Pack diagram, d3.js version 4
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<script src="http://d3js.org/d3.v4.min.js"></script>
<script src="https://d3js.org/d3-selection-multi.v1.min.js"></script>
<script>
playID personID pitchType pitchSpeed (mph) x Axis (ft) y Axis (ft) exit Speed (mph) V Launch Angle (degrees) H Launch Angle Distance (ft)
1 33 FB 88.657 -2.012 2.009 77.567 25.678 0.008 209.09
2 35 CB 66.786 0.015 1.909 85.678 -7.134 20.654 40.678
3 39 FB 87.614 -0.567 4.554 65.678 0.004 -10.567 70.012
4 41 FB 87.909 0.991 1.45 100.032 11.098 -25.789 380.09
5 48 CB 68.982 3.09 0.91 83.56 -2.569 17.908 300.092
6 51 FB 93.338 1.553 3.008 88.55 35.983 2.345 320.098
7 55 CB 80.009 -0.897 2.009 78.654 40.093 -7.654 250.98
8 59 FB 92.432 -0.009 2.567 103.456 -9.906 4.345 50.45
9 61 FB 93.556 -0.023 3.002 95.674 2.567 11.45 108.456
{
"RECORDS": [
{
"name": "Corey Goldfarb",
"exitvelo": "48.996",
"vlaunch": "25.093",
"distance": "119.232",
"hlaunch": "13.671"
},
{
{
"RECORDS": [
{
"playID": "318",
"name": "Scott Pittenger",
"exitvelo": "81.876",
"vlaunch": "25.012",
"distance": "318.020",
"hlaunch": "11.025",
"videoPath": "https://s3.amazonaws.com/prospectwire/2017-12-05/MattvsScottClassic35U/10_MattBomeisl_ScottPittenger.mp4",
@valex
valex / index.html
Created December 20, 2017 16:27
Baseball animation app, version5
<!DOCTYPE html>
<meta charset='utf-8'>
<html>
<head>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/video.js/6.6.0/alt/video-js-cdn.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link rel='stylesheet' href='style.css'>
</head>