R Visualization in SAP Analytics Cloud
in this blog post we will discuss about the R visualization in SAC .
In SAP Analytics cloud we can create many charts using the R visualization using the R library files. In this blog we will discuss some basic charts which we can create using library ggplot2.
We will create basic bar chart using ggplot (grammar of graphics plot) library. in a story we can add new R visualization chart and then we have to configure the input data and input parameters and we have to add the script.
The add script section is where we have to write the following script and preview section to preview the chart.We will create simple bar chart.
- Bar Chart
The sample set data set i have taken the product sales details in this the X – axis column is product and the Y axis is the Gross sales and using the library ggplot we can create a geom_bar chart.
ggplot(df,aes(x,y))+geom_bar(stat=”identity”, color=”black”, fill=”green”)
The color used is black and the fill color is Green this can be changed based on the chart.
2. Scatter Plot
The next chart is scatter plot we can use the same library ggplot2 and we have to use the type geom_point to plot the scatter plot.
3. Box Plot
The next chart is Box plot which help to visualize the distribution of quantitative values in a field using the same library.
Here the X – axis is Year and the Y axis is sales price and geom_boxplot function to plot box plot the color and fill we can change as per requirement.
The box are used to find the outliers .
We can see further more charts in the upcoming blogs .
Thanks for reading.