Skip to content

aliyarahman/d3samples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

D3 tutorials you've probably already seen, commented for learners

As I've thought more about data as a story-telling process for social justice work, I've learned and written a lot of d3. Because someone usually needs to move fast on a civil rights campaign or an event or a training, I've almost always quickly hacked my way through to generate visualizations that work well and look good - but that are barely commented and as such not too useful when I come back to reuse for a slightly (or entirely) different need.

My sensei used to tell me this story (which felt like a horror story, at the time) of the karateka who got a black belt and them promptly discarded it to go back to the beginning and train again from white belt, now with ten years more knowledge. When I got old enough I tried that in the dojo. It did amazing things for my technical skill and understanding. So I'm trying that in code land.

I'm not making up and posting new tutorials (yet) - there are plenty of those, and I actually think the d3.js site actually lists them in an order that works well for a beginner's syllabus. Instead, I'm redoing some of the best tutorials with good commenting that should stand alone to explain the code when I come back to it (and that explains some possible stuck points that aren't totally explained in the tutorials themselves - like how to serve external files on your local computer if you want to pull data from a csv or tsv or json file without security errors).

So far, I've included code and comments for:

*00bar_chart: Mike Bostock's tutorial on basic bar charts, parts I and II (just horizontal bars). http://bost.ocks.org/mike/bar/1/

*01bar_chart * not done: Mike Bostock's tutorial on bar charts, part III (vertical bars, and adds labels) http://bost.ocks.org/mike/bar/3/

About

Commented-for-learners sample code for data visualization with d3.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published