This video explains how to filter data and how it is different to other filters.
- [Narrator] There are times when you don't want to show…an element for every data point you have.…In this version three block,…a data set's been used to generate a line…and the same data set has been used…to add some circles to the line.…But only the most recent data points…have been added as dots.…In cases like this, d3.filter can be just what you need.…So we're going to go back to our select.js example,…closing data handlers, and opening Select there.…
We can refresh the page like so…and we can comment out those logs to the console there.…So we've got line 58.…We'll delete that one and we can delete this one as well.…Now the circles here are showing…the numbers 1 to 18 from the array.…We're going to use d3.filter to show circles…only where the data point is above 10.…So what we do is we find relevant block of code,…which in this case is circles,…and after the append statement we type .filter.…
Within the filter we have a function.…So what the filter does is it goes through…and checks each row against the condition.…
- Making a simple bar chart with D3
- Understanding SVG graphics
- Drawing basic shapes
- Adding text
- Using generators and the path element
- Creating a scale and axes
- Importing data into D3
- Creating trees and Voronoi tessellations
- Preparing your data for advanced graphics
- Adding interactivity and transitions
- Choosing the right graphic
- Finding D3.js plugins
Skill Level Intermediate
Data Visualization for Data Analystswith Bill Shander1h 31m Beginner
2. Making a Simple Bar Chart with D3
3. Basic Shapes, Courtesy of SVG
4. Advanced Shapes, with D3 and Path
5. Scales and Axes
6. Importing Data into D3
7. Additional Graphics with D3 Layout
8. Preparing Your Data for Advanced Graphics
10. Picking the Right Graphic
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.