Something I enjoy doing in software is opening the different components of a tool. Here’s an example of what I mean… Say I have a Data Visualization Desktop project that I have exported. I want to see what is in the export, so I unzip all the contents of the .dva to a folder.
Okay, cool. I have the project “guts”.
But what about other pieces that aren’t outputs, but pieces of the software puzzle? Since we proudly advertise that you can bring your own R scripts to DV, what should that file look like? The folder “script_repository” holds the key. Here you can see all the different Advanced Analytics and R scripts available to you for DV. Note that I have downloaded all possible R plugins from the Oracle BI Public Store, which is why I may have more scripts than you.
How about if you are just curious as to how the scripts work?
Taking “R.Correlation.xml” as an example, in your favorite text editor, you can see notes about the script as well as different options. Since there is more than one kind of correlation calculation, this particular script gives you the option to choose between Pearson, Kendall, and Spearman.
The default is Pearson.
In our custom calculation in DV, I am using R.CorrelationPlot.xml to calculate my data.
Here are the results from my correlation calculation. Note that also talked about this graph and how to use download plugins in a previous post.
Let’s say I wanted to use the Kendall calculation for correlation. Based on the script notes, I can change the option in this section for the script “R.CorrelationPlot.xml” that I referenced in my custom calculation.
I get the same results as before (based on the same dataset), but since it did not error out (ha), I can confirm that the script still works with the new option.
And for those R lovers out there, if you are curious as to the actual code used, it is at the bottom in the CDATA section.
All this to say… I encourage you to take a look at each of the XML scripts in the script_repository folder to see what options are available to you. You may not have to write a brand new script; perhaps you can modify one already available to you! Also, you can learn how DV processes advanced analytics and R scripts. You can even start your journey towards learning R by reverse engineering the code. 🙂 Each DVD installation comes with the option to install advanced analytics, and with this installation comes an installation of the R GUI. Take time to play with this if you are curious about data science…
More on using custom R scripts to come…