Skip to content

Instantly share code, notes, and snippets.

@morenoh149
Created October 14, 2012 07:34
Show Gist options
  • Save morenoh149/3887742 to your computer and use it in GitHub Desktop.
Save morenoh149/3887742 to your computer and use it in GitHub Desktop.
History of Federal Individual Income Bottom and Top Bracket Rates
year Bottom bracket Taxable Income upto Top bracket Taxable Income over Party
1913 1 20000 7 500000 D
1914 1 20000 7 500000 D
1915 1 20000 7 500000 D
1916 2 20000 15 2000000 D
1917 2 2000 67 2000000 D
1918 6 4000 77 1000000 D
1919 4 4000 73 1000000 D
1920 4 4000 73 1000000 D
1921 4 4000 73 1000000 R
1922 4 4000 56 200000 R
1923 3 4000 56 200000 R
1924 1.5 4000 46 500000 R
1925 1 4000 25 100000 R
1926 1 4000 25 100000 R
1927 1 4000 25 100000 R
1928 1 4000 25 100000 R
1929 4 4000 24 100000 R
1930 1 4000 25 100000 R
1931 1 4000 25 100000 R
1932 4 4000 63 1000000 R
1933 4 4000 63 1000000 D
1934 4 4000 63 1000000 D
1935 4 4000 63 1000000 D
1936 4 4000 79 5000000 D
1937 4 4000 79 5000000 D
1938 4 4000 79 5000000 D
1939 4 4000 79 5000000 D
1940 4.4 4000 81.1 5000000 D
1941 10 2000 81 5000000 D
1942 19 2000 88 200000 D
1943 19 2000 88 200000 D
1944 23 2000 94 200000 D
1945 23 2000 94 200000 D
1946 19 2000 86.45 200000 D
1947 19 2000 86.45 200000 D
1948 16.6 4000 82.13 400000 D
1949 16.6 4000 82.13 400000 D
1950 17.4 4000 91 400000 D
1951 20.4 4000 91 400000 D
1952 22.2 4000 92 400000 D
1953 22.2 4000 92 400000 R
1954 20 4000 91 400000 R
1955 20 4000 91 400000 R
1956 20 4000 91 400000 R
1957 20 4000 91 400000 R
1958 20 4000 91 400000 R
1959 20 4000 91 400000 R
1960 20 4000 91 400000 R
1961 20 4000 91 400000 D
1962 20 4000 91 400000 D
1963 20 4000 91 400000 D
1964 16 1000 77 400000 D
1965 14 1000 70 200000 D
1966 14 1000 70 200000 D
1967 14 1000 70 200000 D
1968 14 1000 75.25 200000 D
1969 14 1000 77 200000 R
1970 14 1000 71.75 200000 R
1971 14 1000 70 200000 R
1972 14 1000 70 200000 R
1973 14 1000 70 200000 R
1974 14 1000 70 200000 R
1975 14 1000 70 200000 R
1976 14 1000 70 200000 R
1977 14 1000 70 200000 D
1978 14 1000 70 200000 D
1979 14 2100 70 212000 D
1980 14 2100 70 212000 D
1981 13.825 2100 69.125 212000 R
1982 12 2100 50 106000 R
1983 11 2100 50 106000 R
1984 11 2100 50 159000 R
1985 11 2180 50 165480 R
1986 11 2270 50 171580 R
1987 11 3000 38.5 90000 R
1988 15 29750 28 29750 R
1989 15 30950 28 30950 R
1990 15 32450 28 32450 R
1991 15 34000 31 82150 R
1992 15 35800 31 86500 R
1993 15 36900 39.6 250000 D
1994 15 38000 39.6 250000 D
1995 15 39000 39.6 256500 D
1996 15 40100 39.6 263750 D
1997 15 41200 39.6 271050 D
1998 15 42350 39.6 278450 D
1999 15 43050 39.6 283150 D
2000 15 43850 39.6 288350 D
2001 15 45200 39.1 297350 R
2002 10 12000 38.6 307050 R
2003 10 14000 35 311950 R
2004 10 14300 35 319100 R
2005 10 14600 35 326450 R
2006 10 15100 35 336550 R
2007 10 15650 35 349700 R
2008 10 16050 35 357700 R
2009 10 16700 35 372950 D
2010 10 16700 35 373650 D
2011 10 17000 35 379150 D
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font: 10px sans-serif;
}
.axis path,
.axis line {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}
.line {
fill: none;
stroke: steelblue;
stroke-width: 1.5px;
}
#key {
font-size: 16px;
position: absolute;
top: 2em;
right: 8em;
background-color: white;
outline-style: dashed;
padding: 10px;
}
.event {
font-size: 12px;
}
rect {
opacity: 0.3;
}
</style>
<body>
<script src="http://d3js.org/d3.v3.js"></script>
<script>
var margin = {top: 20, right: 80, bottom: 30, left: 50},
width = 960 - margin.left - margin.right,
height = 500 - margin.top - margin.bottom;
var parseYear = d3.time.format("%Y").parse;
var x = d3.time.scale()
.range([0, width]);
var y = d3.scale.linear()
.range([height, 0]);
var color = d3.scale.category10();
var formatPercent = d3.format("");
var xAxis = d3.svg.axis()
.scale(x)
.orient("bottom");
var yAxis = d3.svg.axis()
.scale(y)
.orient("left")
.tickFormat(formatPercent);
var line = d3.svg.line()
.interpolate("step-after")
.x(function(d) { return x(d.year); })
.y(function(d) { return y(d.rate); }); //doublecheck this
var svg = d3.select("body").append("svg")
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
d3.csv("data.csv", function(error, data) {
color.domain(d3.keys(data[0]).filter(function(key) { return key === "Bottom bracket" ||
key === "Top bracket"; }));
data.forEach(function(d) {
d.year = parseYear(d.year);
});
var brackets = color.domain().map(function(name) {
return {
name: name,
values: data.map(function(d) {
return {year: d.year, rate: +d[name]};
})
};
});
x.domain(d3.extent(data, function(d) { return d.year; }));
y.domain([0,100]);
svg.append("g")
.attr("class", "x axis")
.attr("transform", "translate(0," + height + ")")
.call(xAxis);
svg.append("g")
.attr("class", "y axis")
.call(yAxis)
.append("text")
.attr("transform", "rotate(-90)")
.attr("y", 6)
.attr("dy", ".71em")
.style("text-anchor", "end")
.text("Income Tax Rate");
var bracket = svg.selectAll(".bracket")
.data(brackets)
.enter().append("g")
.attr("class", "bracket");
bracket.append("path")
.attr("class", "line")
.attr("d", function(d) { return line(d.values); })
.style("stroke", function(d) { return color(d.name); });
bracket.append("text")
.datum(function(d) { return {name: d.name, value: d.values[d.values.length - 1]}; })
.attr("transform", function(d) { return "translate(" + x(d.value.year) + "," + y(d.value.rate) + ")"; })
.attr("x", 3)
.attr("dy", ".35em")
.text(function(d) { return d.name; });
// begin event squares
//
//
svg.append("rect")
.attr("x", x(new Date(1939,09,01)))
.attr("y", 0)
.attr("width", function(){ return x(new Date(1945,09,02)) - x(new Date(1939,09,01)) })
.attr("height", height)
.attr("id", "World War II")
.attr('class', 'event')
.attr('fill', 'grey');
svg.append("text")
.attr('x', x(new Date(1938,06,01)))
.attr('y', 150)
.text("World War II")
.attr('class', 'event');
svg.append("rect")
.attr("x", x(new Date(1914,07,28)))
.attr("y", 0)
.attr("width", function(){ return x(new Date(1918,11,11)) - x(new Date(1914,07,28)) })
.attr("height", height)
.attr("id", "World War I")
.attr('class', 'event')
.attr('fill', 'grey');
svg.append("text")
.attr('x', x(new Date(1913,06,01)))
.attr('y', 250)
.text("World War I")
.attr('class', 'event');
svg.append("rect")
.attr("x", x(new Date(1929,08,29)))
.attr("y", 0)
.attr("width", 1)
.attr("height", height)
.attr("id", "Black Tuesday");
svg.append("text")
.attr('x', x(new Date(1923,04,01)))
.attr('y', 50)
.text("Black")
.attr('class', 'event');
svg.append("text")
.attr('x', x(new Date(1923,01,01)))
.attr('y', 60)
.text("Tuesday")
.attr('class', 'event');
// begin party squares
//
//
svg.append('rect')
.attr('x', x(new Date(1913,01,01)))
.attr('y', 0)
.attr('width', function(d){
return x(new Date(1921,01,01)) - x(new Date(1913,01,01))
})
.attr('height', height)
.attr('class', 'Democrat')
.attr('fill', 'blue');
svg.append('rect')
.attr('x', x(new Date(1921,01,01)))
.attr('y', 0)
.attr('width', function(d){
return x(new Date(1933,01,01)) - x(new Date(1921,01,01))
})
.attr('height', height)
.attr('class', 'Republican')
.attr('fill', 'red');
svg.append('rect')
.attr('x', x(new Date(1933,01,01)))
.attr('y', 0)
.attr('width', function(d){
return x(new Date(1953,01,01)) - x(new Date(1933,01,01))
})
.attr('height', height)
.attr('class', 'Democrat')
.attr('fill', 'blue');
svg.append('rect')
.attr('x', x(new Date(1953,01,01)))
.attr('y', 0)
.attr('width', function(d){
return x(new Date(1961,01,01)) - x(new Date(1953,01,01))
})
.attr('height', height)
.attr('class', 'Republican')
.attr('fill', 'red');
svg.append('rect')
.attr('x', x(new Date(1961,01,01)))
.attr('y', 0)
.attr('width', function(d){
return x(new Date(1969,01,01)) - x(new Date(1961,01,01))
})
.attr('height', height)
.attr('class', 'Democrat')
.attr('fill', 'blue');
svg.append('rect')
.attr('x', x(new Date(1969,01,01)))
.attr('y', 0)
.attr('width', function(d){
return x(new Date(1977,01,01)) - x(new Date(1969,01,01))
})
.attr('height', height)
.attr('class', 'Republican')
.attr('fill', 'red');
svg.append('rect')
.attr('x', x(new Date(1977,01,01)))
.attr('y', 0)
.attr('width', function(d){
return x(new Date(1981,01,01)) - x(new Date(1977,01,01))
})
.attr('height', height)
.attr('class', 'Democrat')
.attr('fill', 'blue');
svg.append('rect')
.attr('x', x(new Date(1981,01,01)))
.attr('y', 0)
.attr('width', function(d){
return x(new Date(1993,01,01)) - x(new Date(1981,01,01))
})
.attr('height', height)
.attr('class', 'Republican')
.attr('fill', 'red');
svg.append('rect')
.attr('x', x(new Date(1993,01,01)))
.attr('y', 0)
.attr('width', function(d){
return x(new Date(2001,01,01)) - x(new Date(1993,01,01))
})
.attr('height', height)
.attr('class', 'Democrat')
.attr('fill', 'blue');
svg.append('rect')
.attr('x', x(new Date(2001,01,01)))
.attr('y', 0)
.attr('width', function(d){
return x(new Date(2009,01,01)) - x(new Date(2001,01,01))
})
.attr('height', height)
.attr('class', 'Republican')
.attr('fill', 'red');
svg.append('rect')
.attr('x', x(new Date(2009,01,01)))
.attr('y', 0)
.attr('width', function(d){
return x(new Date(2011,01,01)) - x(new Date(2009,01,01))
})
.attr('height', height)
.attr('class', 'Democrat')
.attr('fill', 'blue');
svg.selectAll(".Democrat")
.on("mouseover", function(d){
d3.select(this)
.transition()
.attr('fill', 'darkblue')
})
.on("mouseout", function(d, i){
if (i !== data.length-1) {
d3.select(this).transition().attr('fill', 'blue')
}
});
svg.selectAll(".Republican")
.on("mouseover", function(d){
d3.select(this)
.transition()
.attr('fill', 'darkred')
})
.on("mouseout", function(d, i){
if (i !== data.length-1) {
d3.select(this).transition().attr('fill', 'red')
}
});
});
</script>
<div id="key">
<p>Data from <a href="http://www.ntu.org/tax-basics/history-of-federal-individual-1.html" target="_blank">ntu.org</a></p>
</div
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment