I am trying to generate a stacked area graph in r using below command:
ggplot(p_ash_r_100,aes(x=SMPL_TIME,y=SMPL_CNT,col=EVENT,group=1))+ geom_area()
Here EVENT is the 3rd variable which I want to chart out based on time and sample counts in the ORACLE DB.
But the graph with above commands is returning empty.
My questions are:
How to fix the empty graph problem.
How to filter only the 10 top variables based on the amount of data when displaying or earlier? We can do it easily in excel as I show here in the image file.
my dataset looks like this:
> p_ash_r_100
SMPL_TIME SQL_ID MODULE EVENT SMPL_CNT
1 11-APR-17 09:00 03d5x9busf1d8 SQL*Plus CPU 1
2 11-APR-17 09:00 2pb7bzzadj0pn OGG-RCASI004-OPEN_DATA_SOURCE db file sequential read 1
3 11-APR-17 09:00 NO_SQL GoldenGate CPU 1
4 11-APR-17 09:00 NO_SQL MMON_SLAVE CPU 1
5 11-APR-17 09:00 NO_SQL NO_SQL Log archive I/O 1
6 11-APR-17 09:00 NO_SQL XStream CPU 1
7 11-APR-17 09:00 acuzxh557cq81 GoldenGate db file sequential read 1
8 11-APR-17 09:00 cqtby4bsrmxzh GoldenGate CPU 1
9 11-APR-17 09:00 dgzp3at57cagd GoldenGate db file sequential read 2
10 11-APR-17 09:00 fjp9t92a5yx1v GoldenGate db file sequential read 1
11 11-APR-17 09:00 guh1sva39p9db GoldenGate db file sequential read 1
12 11-APR-17 09:01 0hz0dhgwk12cd GoldenGate direct path write 1
13 11-APR-17 09:01 2jafq5d4n0akv GoldenGate CPU 1
14 11-APR-17 09:01 37cspa0acgqxp GoldenGate db file sequential read 2
15 11-APR-17 09:01 79rugrngrvpt1 OGG-RADDR025-OPEN_DATA_SOURCE db file sequential read 1
16 11-APR-17 09:01 7k6zp92kbv28m GoldenGate CPU 1
17 11-APR-17 09:01 7nvtkfc0bt8vv GoldenGate db file sequential read 1
18 11-APR-17 09:01 7pvpzvd1g769d GoldenGate CPU 1
19 11-APR-17 09:01 9gduk46rmt5jy GoldenGate db file sequential read 1
20 11-APR-17 09:01 NO_SQL GoldenGate CPU
7
Adding image of the dataset below for ease of understanding
The end graph which I want to get it something like this one from excel=>
Value filters in excel to get Top 10 events in excel =>