Anatomy of a Stepper Graphic
Today we published a small graphic, “Anatomy of a Trade,” to accompany an article about Freddie Mac by ProPublica’s Jesse Eisinger and NPR News’s Chris Arnold. The article describes some “financial alchemy” performed by Freddie to protect one of their mortgage-backed investments. The stakes were high and the financial details enormously complex, so we wanted to walk readers through things step-by-step.
We were inspired to try stepper graphics, like this one, by Shan Carter of the New York Times, who gave a fantastic talk about them a few months ago.
We wrote a small framework to handle the transitioning logic which is over on GitHub. At their base, stepper graphics are just slideshows, and slideshows are just linked lists, so our library simply uses a linked list to control navigation. The API is pretty simple; only two functions are required. Here’s an example:
$(function(){
var steps = new Stepper("#steps");
steps.addSlide(1, function(){ this.canvas.text("slide 1"); });
steps.addSlide(2, function(){ this.canvas.text("slide 2"); });
steps.addSlide(3, function(){
this.stop();
fancyAsyncThing(function(){
steps.canvas.text("slide 3");
steps.start();
});
});
steps.go();
});
If you want to do fancy asynchronous animations you can call the stop and start functions to disable and enable navigation respectively so people can’t click off of a slide while it’s still rendering.
It’s a small library. We hope to use it again and work out the kinks.
The ProPublica News apps desk is:
Safeguard the public interest.
Support ProPublica’s award-winning investigative journalism.
Recent News Apps
News Nerds
Colophon
- Hosting: Rackspace and Amazon AWS (all praise to Varnish)
- Webserver: Apache (with Passenger)
- CMS: ExpressionEngine (via Solspace)
- Site Designers: Mule
- Headline Font: Meta Serif Web Medium (via Typekit)
- What We Code In: Ruby (Rails and Sinatra), JavaScript
- What We Code In but Pretend We Don't: PHP
- Languages We Miss: Perl, Latin
- Favorite HTTP Status Code: 417 Expectation Failed
Get Our Data and Reporting Tools
We frequently publish data, and reporting tools like tipsheets and guides.
Our Hottest Stories
- Donations to Scott Walker Flagged as Potential Fraud
- In Race For Better Cell Service, Men Who Climb Towers Pay With Their Lives
- Billion Dollar Bait & Switch: States Divert Foreclosure Deal Funds
- Pardon Attorney Torpedoes Plea for Presidential Mercy
- Patient Died at New York VA Hospital After Alarm Was Ignored
- Finding Oscar: Massacre, Memory and Justice in Guatemala
- Introducing the ProPublica Patient Harm Community on Facebook
- Built for a Simpler Era, OSHA Struggles When Tower Climbers Die
- Got Student Loans? Share Your Documents With Us
- Remember Stuxnet? Why the U.S. is Still Vulnerable
- Donations to Scott Walker Flagged as Potential Fraud
- Pardon Attorney Torpedoes Plea for Presidential Mercy
- In Race For Better Cell Service, Men Who Climb Towers Pay With Their Lives
- Air Force Pilots Balk at Flying the World’s Most Expensive Fighter Jet
- Patient Died at New York VA Hospital After Alarm Was Ignored
- Watchdog Group Calls for Probe of Lobbyists Behind Congressional Trip to Taiwan
- Billion Dollar Bait & Switch: States Divert Foreclosure Deal Funds
- Finding Oscar: Massacre, Memory and Justice in Guatemala
- Broadcasters Sue to...Block Transparency
- Happy Graduation! Here's The Best, Most Depressing Journalism on Student Debt






0 comments