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.

Code Learning:

Udacity Data Visualization and D3.js DimpleJS lectures

  • Example of chained use -> every two years in tick marks
    • var time_axis = d3.svg.axis()
      • .scale(time_scale)
      • .ticks(d3.time.years, 2)
  • Think of the ‘g’ element in svg as a div – an invisible fence around other svg objects. eg
    • d3.select(“svg”)
      • .append(‘g’)
      • .attr(‘class’, ‘x axis’)
      • .attr(‘transform’, “translate(0,” + height + “)”) // moves everything in to coordinates
      • .call(time_axis)
  • Use anonymous accessor function to find min and max of a column
    • var count_extent  = d3.extent(data, function (d) { return d[‘attendance’];
    • }); // pulls bound data
Posted in , , ,

Leave a Reply