Skip to content

Instantly share code, notes, and snippets.

@BethOlarsch
BethOlarsch / index.html
Created October 17, 2016 19:06
The Big Bang
<!DOCTYPE html>
<meta charset="utf-8">
<canvas width="960" height="960"></canvas>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script>
var canvas = document.querySelector("canvas"),
context = canvas.getContext("2d"),
width = canvas.width,
height = canvas.height,
@BethOlarsch
BethOlarsch / incomes.csv
Created October 17, 2016 01:42
Interactive income chart
val cutoff year country
6910 cop5 1981 Australia
6864 cop5 1985 Australia
6555 cop5 1989 Australia
6551 cop5 1995 Australia
7002 cop5 2001 Australia
7090 cop5 2003 Australia
8818 cop5 1987 Austria
8744 cop5 1994 Austria
5813 cop5 1995 Austria
@BethOlarsch
BethOlarsch / index.html
Created October 10, 2016 19:31
Example of a line chart
<!doctype html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>Line Chart</title>
<style>
.axis path,
.axis line{
fill: none;
@BethOlarsch
BethOlarsch / index.html
Created October 6, 2016 00:54
Go Blue!
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
max-width: 960px;
margin: 1px;
}
div {
@BethOlarsch
BethOlarsch / incomes.csv
Last active October 10, 2016 19:32
Line chart
6910 cop5 1981 Australia
6864 cop5 1985 Australia
6555 cop5 1989 Australia
6551 cop5 1995 Australia
7002 cop5 2001 Australia
7090 cop5 2003 Australia
8818 cop5 1987 Austria
8744 cop5 1994 Austria
5813 cop5 1995 Austria
@BethOlarsch
BethOlarsch / barley.tsv
Created September 26, 2016 22:36
Interactive Barley Soup
site variety 1931 1932 yoy yoy_percent
University Farm Manchuria 27 26.9 -0.1 0.003717472119
Waseca Manchuria 48.86667 33.46667 -15.4 0.4601593167
Morris Manchuria 27.43334 34.36666 6.93332 -0.201745529
Crookston Manchuria 39.93333 32.96667 -6.96666 0.2113243467
Grand Rapids Manchuria 32.96667 22.13333 -10.83334 0.4894582062
Duluth Manchuria 28.96667 22.56667 -6.4 0.283604094
University Farm Glabron 43.06666 36.8 -6.26666 0.1702896739
Waseca Glabron 55.2 37.73333 -17.46667 0.4628976557
Morris Glabron 28.76667 35.13333 6.36666 -0.1812142487
@BethOlarsch
BethOlarsch / class-work.tsv
Last active September 18, 2016 23:55
Fun with Bubbles
group x y
I 10 8.04
I 8 6.95
I 13 7.58
I 9 8.81
I 11 8.33
I 14 9.96
I 6 7.24
I 4 4.26
I 12 10.84