 I'm going to introduce you in this lecture to Plotly. Let me write this plot.ly, that's the web address, or just Plotly. It is a website. You can also download some software. You can ask Plotly, left pay for it of course, to come and install a service at your university or place of work. But you can use it free of charge on the internet. The reason why I want to introduce you to Plotly is if you look at your data here, I've just got some mock data here, variable 1 and variable 2, all sorts of values. Now imagine you had tons of columns and thousands of rows, feel difficult for human being to look at a spreadsheet like this or look at data like this and form any kind of understanding as far as this data is concerned. So the first thing I like to do is just to plot. Human beings are very good at understanding graphs. And if you plot your data, that would be the first thing. Before you do any analysis, just plot your data. Now you can plot your data right inside of a spreadsheet, but I want to introduce you to this Plotly. So what I'm going to do, I can either save this file and import it directly into Plotly, but I'm going to just take all my values, all my values, I've excluded the name there. And I'm going to say right click and copy. I'm going to go over to Plotly, there's Plotly. Beautiful website here, you can see other people's work behind the scenes and that's why I like to call this a social network because the graphs that you do here, the analysis that you do in Plotly you can share with others. If you have a paid account, you can do most of your work, keep it private, but the free account you share with other people, of course the paid one you can share as well. But if you don't pay, if you don't get a subscription, you don't have that much access to space for private work. That's not what it's about though, it's about sharing your work with others and your data with others. Yet I'm going to use it just for us as a quick tool to understand our data. So you'll have to sign up for your free account, I'm just going to sign in. See there you can sign in with your social networks, that makes things very interesting. And as the page loads, what you're going to see here is some recent work that you've been busy with on the one side, but more importantly some stuff other people have been working on. And it's so phenomenal, you can learn from other people, learn what they've done, see what type of graphs are available. So people have just imported like I'm going to import this data now, that's all they did. And they can share this with each other, not only the graph, but the actual data that lives behind the graph. So what you want to do is go to Workspace, there you go and it's now going to load the workspace for us. There you go, you'll see the two buttons there, New Grid or Import. If I save my spreadsheet file, I can import that file from my hard drive. I'm going to say New Grid though, I'm going to come here to the first, see it looks like a spreadsheet. And I'm just going to say on a Mac, Command V or Mac or Linux, Control V, just to paste my data in. There you go, the data's there, looks exactly the same as it was in our spreadsheet. Now I can rename these columns, look they rename, remember that was VAR1. And I can rename this one just by that little triangle they rename VAR underscore 2, it Enter. And now look at this, I'm going to show you this analysis first. You can take the derivative integral or fit your data, don't worry about that. Statistics, you can do basic statistics on this chi-square test. You can do t-tests or ANOVA analysis of variance right inside of Plotly. But let's, before we do any statistical analysis, let's just plot our data. So there, make a plot. Look at all the types of plots Plotly can do. Let's do a box plot to understand our data. It says they choose Y, I want to choose, I want to plot both of them. Both of these sets. And all I'm going to say, I don't have to worry about all of these things, I'm just going to say plot. And lo and behold, two box plots. Isn't that fantastic? Now I can start understanding my data. I can see, well, see there was a higher median, smaller range there for variable 2 than for variable 1. And obviously, the median there, remember box plot? This would be the 50th percentile, the median. Oh, and look at that. If I hover over that, it'll actually show me. Well, the median there was 11.9, the median there was 11.2. Not only that, look at these buttons, links up here. Trace. If I hit trace, I can change all sorts of things about this graph. Let's change them for both, var1 and var2. I can say, look, I want to immediately change it to a scatter, or bar, or histogram, but let's stick with a box plot. I want to see all my data points. Boom, there they all are. Nicely done. I also want to see the average, the mean. I want to see the standard deviation. And the plot updates immediately. The style. And that is where we do this. See all these data points? I can add some jitter to them. The jitter just means, look how they all start coming into a little line there. The jitter just introduces some spacing between them. So if there are points that fall on top of each other, you can see all of them. And the offset is just how far away from the box plot you draw them. So that's one thing you can do. You can change the layout, global fonts, the title font, its size, its color, the margins. You can change the axes, the lines, the ticks, the labels. The layout, so the labels will just change their font and style and where they are. But to do that on this as well, we're just going to say comparing, comparing our variables. That's all we're doing there. We're going to give this y axis, let's call this white self count. And we have var 1 and var 2. It might as well have been our groups 1, groups 2, whatever the situation might be. Now you can save this. You can export it. Or before I get there, there's some built-in templates there. But all of this you can get from changing all of these up there. But you can export it and you can export it as a PNG, PDF, SVG, EPS. You can do the sizes which you want. Or you can even build an extra resolution. So if you want to have, you know, print this out really large, say for instance for some poster. You can say, well, just build in a lot extra resolution for me there. So I can really do nice, crisp, large print. And you can download that. So that's phenomenal. You can save it, which means everything will be saved. You can give it a name there. And now it's saved. You can make it private. As I say, if you don't have a paid account, not many of them can be private or public. You can embed them. You can let people know right away, come on guys, come look at my data here. And all sorts of other things you can do with the sharing of it and the saving of it. So this data will live there. You can manipulate it if you shared it with your collaborators. They can come and manipulate it. Everyone can work together. And that's why I say it's a beautiful social network. And the beauty of it all, if you look at the API libraries there, you can install it in Python. So you can say, install Plotly as whatever. And then use Plotly code right inside there. You see it also exists for Matlab, R, Node.js, Julia, and Excel even. So beautiful what you can do with Plotly. I really love Plotly. So my advice to you, whenever you start with your data, come and plot it here in Plotly. Just get a feel for what's happening. And that might guide you. You might have so much data and it will guide you to the kind of analysis really that you want to do.