Data visualization in R
Good data visualization draws insights from a large amount of data and serves as a medium to communicate to the audience. Fortunately, R has powerful built-in functions as well as packages that can help you to create good data visualization. In this section, we will go through a number of built-in graphical functions and R libraries to show their capabilities. Then we'll walk through an example on how to stitch it together with T-SQL. You will also learn how to display graphics from R in SQL Operations Studio. Similar to the previous section, we will be using the orders
dataset and will create a data frame d to narrow down the analysis for sales persons Amy, Jack, and Hudson.
Plot
The plot()
function in R draws a simple scatterplot showing the relationship between two variables and distribution trends/outliers.
Here's an example of a script that visualizes the relationship between the number of orders and the monthly sales amount for Amy
, Jack
, and Hudson
in 2015:
>...