d3.js Remove Video Lecture Transcript This transcript was automatically generated by Zoom, so there may be discrepancies between the video and the text. 12:28:33 Hi! Everybody! Welcome back in this video. We're going to learn about how you can remove elements with D, 3 js, remove. 12:28:43 So remove any selection element can be removed by calling Dot removed. 12:28:48 So as an example, perhaps on a click, interaction, you'll select the clicked element and then remove it. 12:28:55 So before we mention like, why you might want to do something like that. 12:28:58 Let's go ahead and look at the code, and then the resulting web page. 12:29:02 So what we've done here is we've added an on a click update so that when the user clicks on the selected circle it gets removed. So let's go ahead and see this in action with our code. 12:29:19 And so now I can click on a circle and it goes away. 12:29:24 So maybe what's useful is to you know. See, here's a circle. 12:29:30 There's the highlighted circle and now it's gone, and so now you can just go through if you wanted to. 12:29:36 You could collect all circles and get rid of all of them. 12:29:41 So that's remove. You might be asking yourself why would I want to remove these elements that I wrote the code for to add, so remove can typically be used like, if you're doing something like a dashboard where you wanna show certain subsets of the data so maybe you start off by default showing all 12:29:58 of the data and then you make some subsets of, okay. 12:30:03 Now, the user wants to see data that only falls into this certain category. 12:30:06 So you would remove the points that are not relevant to that category. 12:30:10 So, that's the reason why you might want a user remove. 12:30:14 So you might want to give your users the ability to change what is actually plotted by interacting with the plot. 12:30:21 So that's one reason why you might want to use. 12:30:23 Remove. So now you know how to use remove on your updates or or transitions. I don't know if remove can be combined with the transcription, but you can try it out, and if you can, then there you go so I hope you enjoyed learning about remove and hopefully you 12:30:37 see the utility of it. I hope to see you next time, when we show you how you can use d 3 dot Js.