Skip to content

Instantly share code, notes, and snippets.

The graph references a paper by Emmanuel Saez that itself references a dataset.

The dataset includes two breakdowns, one including capital gains and one without. The following data is extracted from the capital gains-included set. It also omits the 1913–17 years since those don’t include 90–100 breakdowns.

FIRST_YEAR = 1917

#   0-100   90-100
data = """
    17,167  69,540

16,226 65,077

@alecperkins
alecperkins / abstract_component.scss
Last active August 29, 2015 14:07
Demonstrating how placeholder classes and a naming scheme (with a helper mixin) can create cleanly semantic output. (Also shows how marvelous the Sass indented syntax is :P)
%Highlight {
color: black;
font-size: 14px;
&%-image--right {
._Image {
float: right;
}
}
&%-image--left {
._Image {
@alecperkins
alecperkins / SassMeister-input-HTML.html
Last active August 29, 2015 14:07
Generated by SassMeister.com.
<div class="Site__">
<div class="_Products__">
<div class="ProductShowcase">
<img class="_Image" src="http://placepuppy.it/300/200">
<p class="_Description">Etiam porta sem malesuada magna mollis euismod. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Aenean lacinia bibendum nulla sed consectetur.</p>
</div>
<div class="ProductShowcase">
<img class="_Image" src="http://placepuppy.it/300/200">
<p class="_Description">Etiam porta sem malesuada magna mollis euismod. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Aenean lacinia bibendum nulla sed consectetur.</p>
@alecperkins
alecperkins / SassMeister-input-HTML.html
Created October 10, 2014 20:06
Generated by SassMeister.com.
<div class="Site__">
<div class="_Products__">
<div class="ProductShowcase">
<img class="_Image" src="http://placepuppy.it/300/200">
<p class="_Description">Etiam porta sem malesuada magna mollis euismod. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Aenean lacinia bibendum nulla sed consectetur.</p>
</div>
<div class="ProductShowcase">
<img class="_Image" src="http://placepuppy.it/300/200">
<p class="_Description">Etiam porta sem malesuada magna mollis euismod. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Aenean lacinia bibendum nulla sed consectetur.</p>
@alecperkins
alecperkins / nothirdparty.geojson
Created November 5, 2014 04:55
For the 2014 US Congressional midterm elections: a map showing districts with no third party (not Republican or Democratic), and a map showing districts with unopposed candidates.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alecperkins
alecperkins / SassMeister-input.sass
Created February 24, 2015 19:13
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
=replace-with-icon($x)
pretend-icon: $x
$icon-settings: 'settings-image'
$icon-settings_dark: 'settings-image--dark'
@alecperkins
alecperkins / gist:943636
Created April 27, 2011 02:47
Translate mobile Safari touch events to mouse events
// from http://ross.posterous.com/2008/08/19/iphone-touch-events-in-javascript
function touchHandler(event)
{
var touches = event.changedTouches,
first = touches[0],
type = "";
switch(event.type)
{
case "touchstart": type = "mousedown"; break;
@alecperkins
alecperkins / style.css
Created July 13, 2011 22:02
Basic variable-length args for a Sass mixin
div.foo-section h2, div.bar-section h2 { height: 20px; padding-left: 30px; background-position: left top; }
div.foo-section h2.my { background-image: url("images/my.png"); }
div.foo-section h2.very { background-image: url("images/very.png"); }
div.foo-section h2.excellent { background-image: url("images/excellent.png"); }
div.foo-section h2.mother { background-image: url("images/mother.png"); }
div.foo-section h2.just { background-image: url("images/just.png"); }
div.foo-section h2.sent { background-image: url("images/sent.png"); }
div.foo-section h2.us { background-image: url("images/us.png"); }
div.foo-section h2.nine { background-image: url("images/nine.png"); }
@alecperkins
alecperkins / app.coffee
Created July 15, 2011 20:01
3-player ROCKPAPERSCISSORSLIZARDSPOCK, a Pad Hacker test
choices = [
{ name: 'rock', beats: ['scissors', 'lizard'] }
{ name: 'paper', beats: ['rock', 'spock'] }
{ name: 'scissors', beats: ['paper', 'lizard'] }
{ name: 'lizard', beats: ['paper', 'spock'] }
{ name: 'spock', beats: ['rock', 'scissors'] }
]
tbody = $('tbody')
thead = $('thead')