Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 5 columns, instead of 6. in line 3.
Date First Second Third Fourth
1917 14.3 2.8 11.7 11.2
1918 11.5 1.3 11.6 11.2
1919 13.2 1.1 9.8 9.9
1920 12.1 1.2 8.3 9.6
1921 13.4 2.1 8.4 10.6
1922 14.2 2 9.8 11.7
1923 13.4 1.9 9.1 10.9
1924 14.5 2.3 10.4 11.1
1925 15.8 3.1 14.2 12.2
@phil-pedruco
phil-pedruco / index.html
Last active February 7, 2017 08:30
Contours of Nepal using topojson and d3.js
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Nepal Topographic Contours</title>
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
<script type="text/javascript" src="http://d3js.org/topojson.v1.min.js"></script>
@phil-pedruco
phil-pedruco / data.csv
Last active April 1, 2021 14:14
3D Scatterplot with csv upload
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 9 columns, instead of 8. in line 7.
"V1","V2","V3","V4","V5","V6","V7","V8","V9"
"x1a","y1","z1","x2","y2","z2","x3","y3","z3"
-1.3491290435195,10.1059510260448,-0.411264965906754,-1.21421613916755,6.06357061562689,0.911515840683922,-2.02369356527925,14.1483314364628,-0.451187952584759
1.67610622942448,-28.2861370876445,0.50256601859036,1.50849560648203,-16.9716822525867,0.864538834846784,2.51415934413671,-39.6005919227022,0.581311097123157
1.02121502161026,43.936226125781,0.315348776470193,0.919093519449234,26.3617356754686,0.948975842252453,1.53182253241539,61.5107165760934,0.332304324756775
-4.41415354143828,-37.6643429680954,-0.983110722246539,-3.97273818729445,-22.5986057808573,0.183011769577503,-6.62123031215742,-52.7300801553336,-5.37184425087046
7.45797323063016,16.3056215847584,0.716380879596842,6.71217590756714,9.78337295085503,-0.697709420423757,11.1869598459452,22.8278702186617,-1.02676108223069
-6.40974662732333,-13.3321990741625,-0.903519079437189,-5.768771964591,-7.99931944449751,-0.428547865579768,-9.61461994098499,-18.665078703
@phil-pedruco
phil-pedruco / defaultData.csv
Last active March 8, 2024 21:10
3D Scatter Plot Using three.js
x y z lp_x lp_y lp_z hp_x hp_y hp_z
0.235458 -0.597702 -0.724487 0.232433 -0.593757 -0.717156 0.003025 -0.003945 -0.007332
0.235458 -0.597702 -0.724487 0.232735 -0.594152 -0.717889 0.002723 -0.003550 -0.006598
0.217346 -0.597702 -0.724487 0.231197 -0.594507 -0.718549 -0.013850 -0.003195 -0.005939
0.217346 -0.579590 -0.724487 0.229812 -0.593015 -0.719143 -0.012465 0.013425 -0.005345
0.199234 -0.579590 -0.724487 0.226754 -0.591673 -0.719677 -0.027520 0.012083 -0.004810
0.199234 -0.597702 -0.760712 0.224002 -0.592276 -0.723781 -0.024768 -0.005426 -0.036931
0.163010 -0.579590 -0.706375 0.217903 -0.591007 -0.722040 -0.054893 0.011417 0.015665
0.108673 -0.597702 -0.724487 0.206980 -0.591676 -0.722285 -0.098307 -0.006026 -0.002203
0.090561 -0.615814 -0.724487 0.195338 -0.594090 -0.722505 -0.104777 -0.021724 -0.001982
@phil-pedruco
phil-pedruco / data.csv
Last active August 29, 2015 13:57
Simple Line Chart
first second
2 2
3 3
4 4
5 4
5.5 5
6 6
6 7
6.5 8
6.5 16
@phil-pedruco
phil-pedruco / index.html
Last active August 29, 2015 13:56
Map of the Netherlands
<!DOCTYPE html>
<meta charset="utf-8">
<style>
</style>
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://d3js.org/topojson.v1.min.js"></script>
<script>
var width = 960,
@phil-pedruco
phil-pedruco / index.html
Last active January 16, 2020 13:43
Shopping Center Layout
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Shopping Mall Messing</title>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
</head>
<body>
@phil-pedruco
phil-pedruco / data.tsv
Last active August 29, 2015 13:56
Axis transition
Date Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Midwest Northeast South West United States
1917 14.3 2.8 11.7 11.2 15 13.3 19.1 37.9 13.1 22.9 15.7 13.2 17.3
1918 11.5 1.3 11.6 11.7 14.9 10.3 16.9 32.9 11.7 20.2 15.1 11.7 15.6
1919 13.2 1.1 9.8 9.9 15 12.1 16.6 30.4 12.8 21.2 14.3 12.2 16
1920 12.1 1.2 8.3 9.6 12.7 11.1 14.1 21 12.4 17.8 13.5 10.9 14.5
1921 13.4 2.1 8.4 10.6 13.4 11.7 16.4 21.8 13.2 17.9 14 12 15.3
1922 14.2 2 9.8 11.7 14.2 13.6 16.6 23 14.1 19.8 15 12.8 16.6
1923 13.4 1.9 9.1 10.9 13.4 12.1 16.2 22.7 12.9 18 14.4 12 15.3
1924 14.5 2.3 10.4 11.1 14.7 13.1 18.5 29.1 14.7 20 15.3 12.9 17
1925 15.8 3.1 14.2 12.5 16.3 16 21.3 35.4 17.3 22.9 18 15.2 19.8
@phil-pedruco
phil-pedruco / data.tsv
Last active August 29, 2015 13:56
Bar chart with mouseover event
letter frequency
A .08167
B .01492
C .02782
D .04253
E .12702
F .02288
G .02015
H .06094
I .06966