Day 174 of 180 Days of Data Viz Learning #jfdi

I’m doing some form of data visualization learning for 180 days because I need to #JFDI.

See post explaining how and why I’m doing this.

Eljiah Meeks D3.js in Action

Chapter 4 General Charting Principles 

Three Takeways Today

  • Using .each() really a choice of syntax in many cases p 121
  • When you write line generator functions, you need to define how it accesses the data to draw the line, append a <path> to the vans, and set its d attribution as equal to the the defined generator function. p 127
    • var tweetLine = d3.svg.line()
      • x(function(d) {
        • return xScale(d.day); // defines accessor function to take day as attribute and pass it to xScale first
      • })
      • .y(function(d) {
      • return yScale(d.tweets); // Take tweets and pass it to yScale
      • });
    • d3.select(“svg”)
      • .append(“path”)
      • .attr(“d”, tweetLine(data)) // appended path is drawn according to the generator with loaded data
      • .attr(“fill”, “none”)
      • .attr(“stroke”, “blue”)
      • .attr(“stroke-width”, 2);
  • If you create multiple lines, you’ll need multiple generator functions and multiple svgs with a different .attr(“d”, tweetLine(data), .attr(“d”, retweetLine(data))  p 128

Reading and Learning Data Visualization Theoretically/Critically:

Chapter 3 Differing Roles of Tables and Graphs
Three Takeaways Today
  • Use tables when you need people to look up individual value as easily as possible.  Use graphs for when people need to be able to see patterns. p 44
  • Tables for reporting on small sets of 20 numbers or less.  Then get into graphs p 50
  • Remember to design graphs for the story you want to tell p 51
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s