After establishing the connectivity between HANA and R, It is time to Integrate these two in memory technologies for data analysis and data visualization.

Both environments support excellent tools for data analysis including predictive analysis and data visualization.  Analytic & Graphics based  Data Visualization Applications  can be easily developed in both environments and bundled into a Web Product.  If Vector operations in R make it ideal for statistical and data analysis of large data sets, then HANA in memory SQL operations and calculations are better suited for constructing entity relationships of the data. If interactive and animated graphics are more easily produced in R then HANA Cloud Platform is ideal to roll out a web based solution.

Though advanced graphs for data visualization, for example plotting data points over Google maps can be made in either platform, R supports variety of libraries and packages, which makes producing multivariate graphs very easy compared to SAPUI5 library. The choices are plenty for enabling end user scenarios. Best of the breed is the way forward and Integrating the process and data remains the key.

For my test case, I decided to use HANA’s Data base artifacts created by SQL for storing Sales data in memory data base. Shown below is an Image of Analytic view created in HANA for Sales Orders Line items  (for die hard R/3’r it is filled with table VBAP data). It can be easily created in HANA Studio IDE as a catalog object and its column attributes can be extended by joining it with Product , Customer and Supplier/Vendor  Master data tables.

R Integration Pic - Sales Order Lines Analytic View.JPG

The extended sales line item data in this view is read to an R environment as shared in the earlier post.

Once the sales information data is available in a R data.frame object. It can be easily consumed by R functions.

Product Category is one of the attributes available on the data view which describes what kind of product was sold i.e. Notebook computer or Handheld device or a printer. If we are interested to analyze sales of Notebook computers  then sales information regarding Notebooks can be easily extracted to R data.frame object without using SQL by use of following R code.

notebooks <-  result[result$Product_Category == “Notebooks”,]

Now , sales information for notebooks can be analyzed further.

Typical Sales information analysis like how much sold by customer, region, product category is important and data visualization for analysis is quite easily achieved.

However, If we wish to visualize and analyze sales based on country of products origin or supplier of the product, Multi variable Graph Plot to group sales of products by their country of origin or suppliers as shown in the image below can be easily created using R graph functions, for example.

qplot(NetAmount,data = notebooks, facets = .~Supplier_Country, main = “Sales by Supplier Country”, binwidth = 500)

R Intgeration with HANA - Plot 1.png

Notice, there are no orders worth between $2500 and $4000 that are being supplied from Japan.

Graph plot to visualize correlation between Product Price and Sales Amount , creating scatter plot by supplier country can be easily achieved by using R Functions, for example

qplot(Product_Price,NetAmount,data = notebooks, facets = .~Supplier_Country)

R Integration with HANA - Plot 2.png

There are many more advance functions in R to plot graphs and do data visualization.

There are plenty of data sheets available that depict performance criterion of using these environments.

Their capabilities to do fast computations on huge volumes of data are unquestioned.

Illustrated above are just quick examples to show how easy it is to visualize data from HANA using R graphs.

Next task is to work on use case to analyze data combining ERP and Non ERP domain data !

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply