Sunday, December 17, 2017

How do you draw a bar graph from a table of X,Y values?

In a previous post you saw how to create a data frame in R using a set off x and y values as shown:

  x      ItmVal
1 A     69
2 B     47
3 C     11
4 D     12
5 E     42
6 F     24

Here 1 to six are line numbers.

It is easy to draw a bar graph using this data:
>  dap <- br="" data.frame="">+  x=factor(c("A","B","C","D","E","F"), levels=c("A","B","C","D","E","F")),
+ ItmVal=c(69,47,11,12,42,24)
+ )
You map the data to aesthetics as shown and you can display your graph as shown.


On the other hand if you want a different color for each of the different x values you could use this:


What is Linius Video Virtualization?

Video content need not be a black-box containing the various stuff that go into video like, images, audio, etc. Video Virtualization takes your video file and converts it into another file where the individual pieces in the original video can be edited.

Microsoft, Amazon and IBM are investing in Video Virtualization. Microsoft with the help of Magenic is making Video Virtualization available on Microsoft Azure.

Here is a video that explains Video Virtualization of Linius.

Linius has perfected Video Virtualization protected by patents that all the three previously mentioned cloud companies are using (going to use?).

This is serious stuff as most user experience these days are driven by videos, be it entertainment, news or anything else. Being a single technical source, Linius will profit hugely.

I was driven by curiosity and wanted to see how far I can go in creating a Virtual Video file using Linius Video Virtualization Engine (VVE). I did get to the part of bringing in my video file here:

Video created to describe a visit to Amalfi in Italy.

I was able to get this file into VVE at this site:

When I tried to edit, the software broke my file (which was actually a slide-show) into attached individual frames for each slide. There were no controls in Step 2 where you can edit. Anyway, I published it after the second step and it produced another file at the VVE site.

Now I am not sure how to go from here to edit this '186490283' file. The above produced an error on a web page.

Some of my unanswered questions are:
Do I need to get to the file on VVE site to edit it?
How do I edit it? Graphic User Interface? If Programmatic, how?
How do I use its features, Search, modifying content, introduce ads, etc.?

Friday, December 15, 2017

How do I ‌put x and y values as data input in R programming?

In constructing relationship between x and y, we create a table with two columns, with x in the first column and corresponding y in the second column. The value of x may be discrete (numeric or non-numeric) or continuous(numeric) and y is numeric. A graph with x and y represents the table of values.
In the following there are six categories (A through F) and for each of these categories a value has been assigned (67,47,11,12,22,24). Now how do I create a data in R that I could work on?
This is easily carried out by creating a data frame as shown:

>  dap <- br="" data.frame="">+  x=factor(c("A","B","C","D","E","F"), levels=c("A","B","C","D","E","F")),
+ ItmVal=c(69,47,11,12,42,24)


What is the best program to review report rdl file?

A RDL file is a report definition language (RDL) file. It has every bit of information in the file.

You have several options to look at a report's rdl file as shown (by right clicking the (any report) reportany.rdl file.


You could open in Notepad and it is going to be a very large file and you may get yourself lost in it without recognizing the key areas. Even using Microsoft Edge it is the same. You could open in Microsoft Visual Studio, but not every one may have it.
The reccommendation is XML Notepad. This is a good application to review the properties of a report rdl file.
You may download XML Notepad as described here. it is free.
Launch XML Notepad and click FIle menu to open the rdl file. In this case I am using a simple file called SimpleReport.rdl.
The file gets opened as shown. Now you see why I recommend this application. You canveyr clearly see how ggthe report is constructed.


Expand the DataSource to see the details.


Now open the DataSets node as shown.


Click the Fields to see the fields in the data as shown.


Well, you can also see the report design.


Explore more and enjoy!

I guess you agree with my assertion that XML Notepad is the best to see the report rdl file.

Thursday, December 14, 2017

How do you use factor/s in R Programming?

Factors are variables to represent categories. Categories are discrete and not continuous. In statistics there is a need for such a variable.

Let us say, I roll the dice a dozen times and come up with values for each roll as shown:
2,4,5,3,2,6,10,5, 9,6,4,5

I can gather these in a data as shown in R with "dat":

Now I use 'factor' as used in R:

factor just took one unique item from the list presented to it to display in Levels. There were two 4's, three 5's and two 6's. It categorized them.

While the original data was numeric they could be also character data in "datac" below:

We know the unique ones in the above data. How are we going to find how many of each are there?
For this we can use the table() in R as shown below:

You can check for yourself, that it picked the correct value for each category.

Wednesday, December 13, 2017

How do you plot using GGPLOT in Power BI?

We saw an example of plotting using GGPLOT earlier in the RGUI.

Herein we use ggplot in Power BI.

We connect to Northwind database on an instance of SQL Server 2016 Developer. We load data from Products and OrderDetails table into Power BI.

We drop the R Script Visual from the Visualizations onto the designer.

The R script editor opens up as shown


Add the following code as shown:
y=ggplot(data=dataset, aes(x=ProductName, y=Quantity))
y=y + geom_point(aes(color="red"))

If you run this code using the R script

You get an error:

Now modify the above to this:
y=ggplot(data=dataset, aes(x=ProductName, y=Quantity))

Now run the script. You will see the plot as shown. The size shows the value of "Quantity" and the color=red is supposed to make it red.

The correct code for aes is modified to this:
y=ggplot(data=dataset, aes(x=ProductName, y=Quantity))
y=y+geom_point(aes(size=Quantity, color="red"))

Run this code again. You get the following visualization.

Looks like there may some error in rendering of the color. Changing it to blue makes it still 'red'.

Tuesday, December 12, 2017

How do you find details about your computer operating system using Windows Management Instrumentation?

Call up WMIC from a command prompt to begin as shown.e  It is better to start the CMD  as an adminsitrator.
Now you are at the root, use the following statement to find the help file for the Operating System (OS):
wmic:root\cli>OS /?
OS - Installed Operating System/s management.
HINT: BNF for Alias usage.
( [WMIObject] | [] | [] ) [].

OS GET [] []
OS LIST [] []

You should get help for each of these as well. Here is an example for OS Get:
Execute the following statement:
wmic:root\cli>OS GET /?
Property get operations.
GET [] []
NOTE: ::= |

The following properties are available:
Property                                Type                    Operation
========                                ====                    =========
BootDevice                              N/A                     N/A
BuildNumber                             N/A                     N/A
BuildType                               N/A                     N/A
CSDVersion                              N/A                     N/A
CSName                                  N/A                     N/A
CodeSet                                 N/A                     N/A
CountryCode                             N/A                     N/A
CurrentTimeZone                         N/A                     N/A
Debug                                   N/A                     N/A
Description                             N/A                     N/A
Distributed                             N/A                     N/A
EncryptionLevel                         N/A                     N/A
ForegroundApplicationBoost              N/A                     N/A
FreePhysicalMemory                      N/A                     N/A
FreeSpaceInPagingFiles                  N/A                     N/A
FreeVirtualMemory                       N/A                     N/A
InstallDate                             N/A                     N/A
LastBootUpTime                          N/A                     N/A
LocalDateTime                           N/A                     N/A
Locale                                  N/A                     N/A
Manufacturer                            N/A                     N/A
MaxNumberOfProcesses                    N/A                     N/A
MaxProcessMemorySize                    N/A                     N/A
Name                                    N/A                     N/A
NumberOfLicensedUsers                   N/A                     N/A
NumberOfProcesses                       N/A                     N/A
NumberOfUsers                           N/A                     N/A
OSLanguage                              N/A                     N/A
OSProductSuite                          N/A                     N/A
OSType                                  N/A                     N/A
Organization                            N/A                     N/A
OtherTypeDescription                    N/A                     N/A
PlusProductID                           N/A                     N/A
PlusVersionNumber                       N/A                     N/A
Primary                                 N/A                     N/A
QuantumLength                           N/A                     N/A
QuantumType                             N/A                     N/A
RegisteredUser                          N/A                     N/A
SerialNumber                            N/A                     N/A
ServicePackMajorVersion                 N/A                     N/A
ServicePackMinorVersion                 N/A                     N/A
SizeStoredInPagingFiles                 N/A                     N/A
Status                                  N/A                     N/A
SystemDevice                            N/A                     N/A
SystemDirectory                         N/A                     N/A
SystemDrive                             N/A                     N/A
TotalSwapSpaceSize                      N/A                     N/A
TotalVirtualMemorySize                  N/A                     N/A
TotalVisibleMemorySize                  N/A                     N/A
Version                                 N/A                     N/A
WindowsDirectory                        N/A                     N/A
The following GET switches are available:
/VALUE                       - Return value.
/ALL(default)                - Return the data and metadata for the attribute.
/TRANSLATE:      - Translate output via values from
/EVERY: [/REPEAT:] - Returns value every (X interval) seconds, If /REPEAT specified the command is executed times.
/FORMAT:   - Keyword/XSL filename to process the XML results.

NOTE: Order of /TRANSLATE and /FORMAT switches influences the appearance of output.
Case1: If /TRANSLATE precedes /FORMAT, then translation of results will be followed by formatting.
Case2: If /TRANSLATE succeeds /FORMAT, then translation of the formatted results will be done.
Now here are a few things about my operating system (Windows 10 Professional)
wmic:root\cli>OS GET BootDevice

wmic:root\cli>OS GET SerialNumber

wmic:root\cli>OS GET Manufacturer
Microsoft Corporation

wmic:root\cli>OS GET Version

This was just a sample of what you can find. You can try a whole lot on yourself.