 Hi, this is Dr. Don back for part two of our debrief of the Quick Start. The next major thing you have to do is to create the graphic, the visualization of the data, all the things we just created. Now, notice here I've scrolled on down to the part of the worksheet that has the big data chunk that will create our graphic. It's pretty complicated. I'm going to walk you through how we do it. Note that I've just simplified over here. I got rid of those temporary files from part one. We now just have the UN votes 860,000 rows of 14 variables. And that's what we're calling here. If you've read the lab manual, we described this funny looking thing there. That's the pipe operator, and it just stands. It's a percentage greater than a percentage. There's a shortcut key that you can use to create that. But what it does, it just takes whatever is in the left side of it. Here, the UN votes data object and then filters it. It's, in other words, it stands for and then again. So, let's create a temporary object so I can show you what's going on. I'm just going to call it UN underscore TMP, use our assignment operator again. And now I'm going to the first thing, I'm going to run this first part of the code there, and what we're doing, we're taking UN votes. We're assigning it to a new data object UN TMP, and then we're filtering the data. This function there, the percentage in percentage as a filter code that says include only Russia, United States, and China ignore all the other countries. So I'm going to run that control inner. And if we look at UN TMP, you can see it's only got 16,000 rows, 14, same 14 variables, but it's down to just Russia. And let's look at it here. If you scroll down through there, you'll see it's just United States, Russia, and China, everything else has been filtered out. So that's what that first row does. The next thing we're going to do, we're using the mutate function here. And what that's doing, that's creating a new variable for us. We're going to call year, and the way we get that, we're taking the year that's out of the date. The date member had the month, day, year. We want to create a new variable that just has the year. So I'm going to highlight again everything up to the pipe operator. Run that control inner. Now, if we look at it, we're up to 15 variables. We've added a variable on the end there that is just the year. Remember, we've taken this long, complicated date there and extracted just the year out of it to create that new variable. Okay, the next thing we're going to do, we want to start setting up to calculate the percentage of yes votes. And we're going to do that by grouping by the country, and then the year, and then by the issue. And I'm going to run that next control inner. And it really is hard to see because we're setting something up. We go back here and look at UNTEMP, you can't really see that we've done anything because that's just storing that in the memory code group by. So for the next thing you will see, we're going to use the summarized function. And we're going to create a new variable called percent underscore yes. And it's going to be equal to the mean, which is the average. And that's the number of votes where the vote is identical equal to, this double equal size there, is yes. So I'm going to run that and we should control inner. Now we look at UNTEMP. You see, we reduced it down because we went through there. We grouped it by country, year, and issue. And then calculated the mean percent yes for that. So that's getting us ready to start doing the plotting. Now I'm going to get rid of this temporary data frame there. We don't need that when we start in the plot. We just want the UN votes. So this first line, you can see that we're starting to use the ggplot graphing function here. After that pipe operator, we've taken all the things we've done here and we're piping it into ggplot. The first thing it does, it's mapping. And that's what does this sheet of paper look like. And aes stands for aesthetic. That's in one of the videos you should have looked at there. The x-axis will be year. The y-axis percent yes. And then the color will be the country. So I'm going to take this and highlight all of that. When you're inside ggplot, instead of the pipe operator, we use a plus sign. So I'm just going to control enter, run. And if we go down here, you can see all we have is the blank sheet of paper with year on the x-axis and percent yes on the y-axis. And we don't have any colors yet because we have included that. Next thing we're going to do is include geompunt point function. That's to put a dot everywhere that we've got a data point. Alpha stands for transparency. Point four, in other words, is about 40% solid. 100% would be totally solid color. So I'm going to select this again and run it all the way to the plus sign, control enter. Now if you look at our graph, you can see we've got dots everywhere. And remember, we use color equal country. And you can see over here, it's added a legend. China, Russia, United States, those are our colors. So next thing we're going to do, we're going to manually change those colors away from the standard colors we've got. And we will just select that part and we'll do the plus sign again, control enter. And now we'll have purple, royal, blue, and orange for our colors for Russia, United States, and China. Next thing we're going to do is to plot some straight lines through this. And we use a function called geomsmooth. And the method equal lowest, don't worry about the technical stuff of that. You can look that up if you want to. And as the equal falls, this talks about standard error, confidence intervals that you'll learn about later in the course. We don't want to plot those as time, so that's false. So I'm going to go back and highlight everything up to that plus and then control enter. Now if we look at our graph down here, you can see where we've added those lines. A blue one, a purple and an orange one. And so you can see what their percentage of this has done over the years. But it's kind of hard to make out because we got all those different issues. So we're going to use a function that's called facet-wrap. And that's going to draw separate graphs for each issue. Remember we filtered out for the issue. So I'm going to go back up here again, highlight everything and go down to facet-wrap by issue, control enter. Now you can see we've got six issues that are plotted there. One of each one has a small graph. And the next thing we're going to do, we're just going to make the graph a little bit prettier. We're going to add a scale. We want the percentage here to be continuous on the percent. And then we want labels, LABS function. We want the overall title, percent yes votes, subtitle 46 to 2019. X is going to be labeled as the percent yes, excuse me, Y axis is percent yes. X axis label is year. And then we're going to have the colors of country. So we're going to run the entire thing this time. And I'm just going to click out up here and run that chunk. You can see now we've got those labels, the title, two titles and subtitle added up there. We put it up the legend over here and put it up the graph. So that's what we did there. You just can run step by step. And you can see how when you're using Gigi plot as you may have seen in that video, I hope you watch, that you're adding layers, one on top of the other. You start with a planche of paper. You label the axis. You tell it what type of geometry you want. You get a point or a line. And then you just add on layer by layer with a plus sign. So that's the quick debrief of what we did in your remix. What you'll have to do, of course, we want you to change out Russia and China for two other countries. And you can pick those. If you go back to your remix report there, down at the bottom, there's the appendix. You can check the spelling. You can just type in the search box for the name that you're looking for. Or you can go to the very bottom and just click through. You can find ones you want to use. And that will tell you how it's spelled and written up. So I hope this is helpful. And I look forward to seeing what you guys come up with.