
Explore the d-3 JavaScript library and its DOM tools to create interactive data visualizations. Build an interactive scatterplot for donut mogul, focusing on two-dimensional data and user interaction.
Prepare with a contemporary browser and dev console (chrome, firefox, or safari), plus a plain text editor like Sublime Text 2, and ensure basic HTML, CSS, and JavaScript knowledge.
Establish a fluid development workflow for D-3 by setting up your environment, editing index.html and files in a text editor, and using Chrome developer tools to test and view updates.
Explore the d3.js project template by linking the minified d3.js library in index.html, editing index.html and main.js, and applying basic styling to render a centered hello.
Learn to navigate the D3 API reference hub, bookmark the documentation, and quickly look up methods like select to understand root level functionality and chaining in D3.
Download, extract, and place the working files on your desktop, then access them from the course player or disk to work alongside the author.
Explore how to use the JavaScript array filter and map methods to transform and retrieve data, including filtering numbers above a threshold and reshaping objects with key-value properties for visualization.
Learn to use d3 array functions to compute min, max, and extent from arrays, including objects, by supplying an accessor that reads the value property.
Create an svg element programmatically with d3 by selecting the body, appending the svg, and configuring attributes such as id, width, and height for data visualizations.
Improve D3 visualizations by styling bars with CSS using a bar class, setting fill to purple, and applying shape-rendering: crisp edges to reduce aliasing.
Add and position text labels on bars in a D3.js chart by binding data to text elements, adjusting x, y, and dy, and using text-anchor and CSS for alignment.
Learn to create a custom reusable chart function that plots data by passing a data object, binding this to the SVG element with Function.prototype.call, and drawing the chart flexibly.
Append a chart group to the SVG, create a 20-pixel margin, calculate width and height from the margins, and translate the group to apply the margins.
Learn to work with arrays of objects in d3.js by converting numeric data to objects with key and value, and using accessors to compute domains and render bars.
Create an ordinal y axis in d3 by extracting keys from the data, forming a distinct domain with those keys, and using range bands to position each bar.
Apply linear and ordinal color scales in D3.js to distinctly color chart bars, using a brown-to-orange gradient or a category 20 palette to visually encode data.
Learn to add x and y axes to a d3.js chart using scales and bottom and left orientation. Style the axes for crisp, readable visuals and adjust margins.
Flip the axes in a D3 bar chart to create a column chart by swapping the x and y scales and adjusting ranges, labels, and margins for vertical orientation.
Add grid lines to the y axis in a D3 chart by duplicating the y axis and styling a grid line class, using the same scale for horizontal alignment.
Rotate the x axis text to 45 degrees to free space for labels. Adjust margins and apply translate and rotate transforms to the x axis group to prevent clipping.
Add axis labels to the d3 chart by labeling the x axis with donor type and the y axis with units sold, including rotation and centering.
Update the plot function to accept a data object with x and y axes and grid lines, avoiding direct references for a flexible, reusable d3 chart.
Add a sort button to a D3.js chart by creating a controls div and button, then toggle ascending and descending data with a click event using D3's on and select.
Click the sort button to toggle ascending or descending order and update the chart by sorting the data array and refreshing the plot with the new data source.
Update charts efficiently by implementing enter, update, and exit phases in d3.js, binding data, and updating scales and axes to reflect data changes.
Extract the axis drawing into a dedicated draw axis function, initialize the chart once, and update the axes and labels efficiently as data changes using d3.
Learn to animate data changes in D3.js by applying transitions to bars, labels, and axes, with duration, easing, and delays that enhance sorting visuals.
Attach mouse events to chart bars with D3, creating a rollover effect that highlights bars in yellow and reverts color on mouse out using an ordinal color scale.
Parse date strings into JavaScript date objects using D3 time format and plot multi-series line charts with time on the x-axis and values on the y-axis, using temperature data.
Plot time data with D3.js by parsing date strings into JavaScript Date objects, creating y and x scales, binding the dataset values to circle points, and rendering January 2014 data.
Format a time scale axis in a d3.js chart by adding x and y axes, setting scales, and refining ticks and date formatting to show month and day.
Learn to draw a time-series line in d3.js by using a line path generator, binding data, and updating a single path via the D attribute.
Create an area under a time series in d3 by building an area generator, binding x and y data, and styling a translucent fill with a matching stroke.
Explore line interpolation options in D3's line generator, switching between cardinal, monotone, and step-after, and learn to style with stroke-dasharray for dashed lines that match areas.
Explore building an interactive scatterplot with d-3, mapping age to the x-axis and donut ratings to the y-axis, while visualizing point size as response count and highlighting datasets on hover.
Examine a donut survey dataset for a scatterplot, loading an external data file and using d3.js to plot donut types (glazed, jelly, powdered, sprinkles) with age and response counts.
access the data variable from the data file, set up linear x and y scales, and plot data points with a custom d3 plot function, including update and exit phases.
Plot multiple donut data groups with d3.js by building a donuts array, filtering age and responses, creating groups, binding data, and applying enter/update/exit to render data points.
Learn to add the y axis and grid lines in a D3.js chart by building a draw axis function, setting the y scale, ticks, and grid lines.
Create the x axis and x grid lines in d3 by configuring the x scale, orienting the axis at the bottom, and applying tick values that align with the grid.
Create a color scale using D3's category10 to differentiate four datasets on the donut chart, apply colors via group styles so children inherit, and adjust opacity to fade datasets.
Add interactivity to the data visuals by binding mouseover and mouseout events in d3 to fade datasets in and out via opacity changes with transitions.
Explore adding axis labels and a dynamic chart header in D3.js, with interactive hover showing age, responses, and average rating for each data point.
Learn how the D-3 library loads CSV data with a CSP file, run on a web server, and troubleshoot asynchronous parsing, data types, and load order in a browser scatterplot.
Explore the D3 gallery to discover interactive, beautiful data visualizations and ideas that reveal deeper meaning in your data.
This Learning to Visualize Data with D3.js training course from Infinite Skills teaches you how to build data visualizations with the D3 JavaScript library. This course is designed for users that already have some HTML, CSS, and JavaScript programming experience.
You will start by learning the basics of D3, including how to bind data from JavaScript arrays to elements, scale data, and style simple data visualizations with CSS. From there, This course will show you how to introduce interactivity into your data visualization, including how to add a sort button, animate changes, and respond to other mouse events. This video tutorial will also cover how to create a line chart and a scatter-plot data visualization.
Once you have completed this computer based training course, you will have developed a solid working knowledge of D3, and be able to build your own data visualizations. Working files are included, allowing you to follow along with the author throughout the lessons.