Introduction to d3.js with Mike Taptich.
From part one of a two-part introduction to d3.js:
Don’t know Javascript? No problem.
This two-part introduction to d3.js is intended for beginners, even those with limited exposure to JavaScript — the language used by web browsers. Regardless of your background, I put together a few examples to get everyone (re)oriented to coding in the browser.
…
Sounds like your typical introduction to …. type tutorial until you reach:
My Coding Philosophy
Now, I am a firm believer in coding with a purpose. When you are first starting off learning JavaScript, you may want to learn everything there is to learn about the language (broad). I suggest that you instead only pick up the pieces of code you need in order to complete some bigger project (narrow). To give you a glimpse of what you could do in d3, check out Mike Bostock’s github repo here or Christopher Viau’s well-curated repository here.
You don’t know at that point but Part 2 is going to focus on maps and displaying data on maps! Some simple examples and some not quite so simple.
D3.js will do a lot of things but you can get a tangible result for many use cases by mapping data to maps.
Some random examples:
- Where in your city have the police shot civilians?
- Are there any neighborhoods where no one has been shot by the police?
- Restaurants by ethnic cuisine.
- Pothole incidence rates.
- Frequency of police patrols.
This rocks!
I first saw this in a tweet by Christophe Viau.