3 ms·
A lot of great comments here on the content and presentation. I'm really interested, also, in the technical aspects of how this was put together. For instance
by jawns 11y ago
A lot of great comments here on the content and presentation.
I'm really interested, also, in the technical aspects of how this was put together.
For instance, the app was able to recognize the shape of the line I drew. On my first attempt, it correctly identified that my line was an S shape; then when I started fiddling around, it was able to identify that my line was (roughly) straight. I wonder what method they used to identify those shapes.
- emaste 11y agoI'm very intrigued by this as well. I tried a variety of shapes and the only ones it recognized for me were "S shaped" and "very straight." I did get these too though: "Your guess was extremely accurate. Is that you, Raj Chetty?" "We’re going to be honest here: Your line was pretty odd. Did you even try?"
- astine 11y agoI just a took really quick look at the javascript they used and it looks like they matched the lines to a limited set of line shapes based on various heights. So, if the low income part of the line is between these certain values, the medium low income between these, etc, then they show this result. Here's a list of the possible results: [{ key: "kindaSShaped", sentence: "Your line looked a little bit like an S, with a gradual increase for the poorest families and a leveling off for the rich. That’s what we guessed the first time, too. But we were wrong. It’s a straight line." }, { key: "underEstimatePoor", sentence: "You underestimated the chances of college enrollment for the very poorest children. In reality, about one in four children in America’s poorest families go to college. (You guessed around " + e.round(t[0]) + " percent.)" }, { key: "overEstimatePoor", sentence: "You overestimated the chances of college enrollment for the very poorest children. In reality, about one in four children in America’s poorest families go to college. (You guessed around " + e.round(t[0]) + " percent.)" }, { key: "justRightOnPoor", sentence: "You correctly guessed that children from the very poorest families face tough odds in going to college – only about one in four do." }, { key: "underEstimateRich", sentence: "You underestimated the chances of college enrollment for the very richest children. In reality, about 94 percent of children from America’s richest families go to college. (You guessed around " + e.round(t[20]) + " percent.)" }, { key: "overEstimateRich", sentence: "You overestimated the chances of college enrollment for the very richest children. In reality, about 94 percent of children from America’s richest families go to college. (You guessed around " + e.round(t[20]) + " percent.)" }, { key: "justRightOnRich", sentence: "You correctly guessed the exceptionally high rates of college enrollment for children from the very richest families – about 94 percent." }, { key: "veryStraight", sentence: "Your line was very straight, which means you correctly guessed one of the more striking findings of this research: The relationship between college enrollment and parental-income rank is linear." }, { key: "kindOfStraight", sentence: "Your line was relatively straight, reflecting one of the more striking findings of this research: The relationship between college enrollment and parental-income rank is linear." }, { key: "lineButNotSteepAddition", sentence: "Your line was not steep enough: There’s more inequality than you guessed." }, { key: "lineButTooSteepAddition", sentence: "Your line was too steep: There’s more equality than you guessed." }, { key: "perfectAddition", sentence: "Your guess was extremely accurate. Is that you, <a target='_blank' href = 'http://www.rajchetty.com/'>Raj Chetty</a>?" }, { key: "youAreWeird", sentence: "We’re going to be honest here: Your line was pretty odd. Did you even try?" }, { key: "youAreCanada", sentence: "Your line, which was relatively horizontal, was admirable: It suggests that everyone has the same chance of going to college regardless of parental income. <a target = '_blank' href = 'http://www.nber.org/papers/w17218'>But not even Canada</a> is that egalitarian." }, { key: "trustFundDip", sentence: "You guessed that there would be a small decrease in college attendance for the richest families – something we’ve called the trust-fund dip. It makes some intuitive sense – if you’re born into an extremely wealthy family, it’s reasonable to think that there’s less incentive to attend college. But the trust-fund dip does not exist." }, { key: "youIgnoredOurNote", sentence: "It looks as if you didn’t use the free point we gave you, which may be one of the reasons you performed worse than other people." }, { key: "downwardSlope", sentence: "Your line sloped downward. Did you believe that rich children were less likely to go to college than poor children? Or did you misunderstand the axis?"
- balls187 11y agoI got the "you are weird" value.
- ffn 11y agoYeah, I was really interested too. From what I can get from playing around in the console, they (probably jashkenas and his cronies) they're using d3 to do the rendering. Since d3 has convenient map / filter / reduce chains, I assume (though have no proof), they can figure out the shape of your line by doing ye olde' rise / run calculation for each point. If your slopes gets significantly bigger at some point, you must have a S shape. They also force you draw only 1 point per x-increment, so they don't have to handle bad users drawing vertical lines.
- kquealy 11y agoGlad to see so much discussion of this here! Always cool to see our work on HN. To answer this question, yes, we (Jeremy's cronies) are indeed using D3 to do most of the drawing and interactions. He also forced us to use Underscore. The heat map showing everyone's responses is done in Canvas. Hope that helps. -KQ