Plotting in RStudio

 Welcome to "Plotting in RStudio." After watching this video, you will be able to:


List the R data visualization packages.

Use the inbuilt R plot function.

Use the R ggplot library to add functions and arguments to the plot.

Add titles and names to the plot.

With the increasing volume of data, one of your main responsibilities as a data scientist is to generate insights using visualizations. R offers various packages for data visualization to suit different requirements. To install these packages in your R environment, you can use the install.packages() function followed by the package name.


Some examples of R packages for data visualization include:


ggplot, which is used for creating various visualizations such as histograms, bar charts, and scatterplots. It allows for adding layers and components to a single visualization.

plotly, which is ideal for web-based data visualizations that can be displayed or saved as HTML files.

lattice, which is used for implementing complex, multi-variable data sets. It is a high-level data visualization library that can handle graphics without requiring extensive customization.

leaflet, which is used for creating interactive plots.

R also provides inbuilt functions for creating plots and visualizations. For instance, you can create a scatterplot using the plot() function, which returns a scatterplot of values vs. the index. You can further enhance the visualization by adding lines and titles using appropriate functions.


When using the ggplot library, you can create informative visualizations by adding layers to plots using different functions and arguments. For example, to create a scatter plot, you can use the ggplot() function on a dataset like Mtcars, specify the X and Y axes, and add the geom_point() function to create a scatter plot. Additionally, you can customize the plot by adding titles and changing axis names using the ggtitle and labs functions.


In the lab, you will have the opportunity to recreate graphics using ggplot and the extension library called GGally. GGally extends ggplot by providing additional functions to simplify the combination of geometric objects with transformed data.


In summary, in this video, you learned about:


Popular data visualization packages in R.

Plotting with the inbuilt R plot function.

Plotting with ggplot.

Adding titles and changing axis names using the ggtitle and labs functions.




Comments

Popular posts from this blog

Lila's Journey to Becoming a Data Scientist: Her Working Approach on the First Task

Notes on Hiring for Data Science Teams

switch functions