Popular Post

_

Wednesday, March 21, 2012

R-script to plot IT-Control Chart against MySQL

Continuing playing with the open-source tools to build some SEDS elements, I have developed the simple R-script to plot the IT-Control chart against data stored in MySQL database.

I used the same MySQL data that was already been built and used for IT-Control Charting by BIRT reporting system. See the following post about how that was done: Building IT-Control Chart by BIRT against Data from the MySQL Database. To do that I have used RODBC package to connect and query data from MySQL database through the MySQL ODBC driver.

Actually, I have just slightly modified the R-script which I wrote for my "Power of Control Chart" workshop That script could be found in the following post: IT-Chart: The Best Way to Visualize IT Systems Performance

Here is my new script (click on it to enlarge) :

Here is the result:
 
















which practically identical with what was done by BIRT (see link to BIRT based  picture here).

If you are a programmer you would notice how it is easier to build charts using R versus BIRT (not-for-programmer, menu-based report generator).

The data used for this exercise was already preprocessed to the DATA-cubical format from raw date-hour stamped data (see the SQL script for that here). But what about doing this pre-processing also by R?

That is the next task ... (could be your homework ;). The simplest approach is again to use RODBC package just to run the mentioned above SQL script within R-system. Other and better approach is to do that using the natural R-system data manipulation technique.

4 comments:

AlexGilgur said...

Igor, excellent choice!

MySQL + R via RODBC = success, especially since you can do all the big data aggregations in MySQL (would take much longer in R) and use R for analytics and plotting.

Anonymous said...

B21318A2
Bolu
Amasya
Batman
Balıkesir
Şırnak
Konya
Tokat
Kırşehir
Antep

Anonymous said...

AD054F3D
Erzurum
Nevşehir
Çorum
Batman
Bilecik
Kırşehir
Hakkari
Sivas
Karaman

Anonymous said...

40C3D858
Bayburt
Yalova
Kırklareli
Niğde
Çorum
Ordu
Karabük
Giresun
Adıyaman

Post a Comment