Hi, I can use ggplot to get the stacked columns, but only sorted alphabetically vertically. I have seen several examples of ordering manually but I have too many points to order them manually.
I need each column of the plot to stack in ascending order, using the $_CLEARED column.
Any help appreciated!
Stacked column:
ggplot(data, aes(fill=DUID, y=MW_CLEARED, x=INTERVAL_DATETIME)) +
geom_bar(position="stack", stat="identity")
DUID | STATE | INTERVAL_DATETIME | MW_CLEARED | $_CLEARED |
---|---|---|---|---|
MEWF1 | QLD1 | 31/01/2022 4:05 | 2.516 | -983.5 |
BARRON-1 | QLD1 | 31/01/2022 4:05 | 33 | -983.2 |
BARRON-2 | QLD1 | 31/01/2022 4:05 | 33 | -983.2 |
TNPS1 | QLD1 | 31/01/2022 4:05 | 360 | -972.3 |
COOPGWF1 | QLD1 | 31/01/2022 4:05 | 178.139 | -968.3 |
DDPS1 | QLD1 | 31/01/2022 4:05 | 255 | -962.9 |
YARWUN_1 | QLD1 | 31/01/2022 4:05 | 111.93 | -922.51 |
MPP_1 | QLD1 | 31/01/2022 4:05 | 425 | 14.48 |
MPP_2 | QLD1 | 31/01/2022 4:05 | 434.99689 | 14.48 |
GSTONE1 | QLD1 | 31/01/2022 4:05 | 120 | 64.47 |
CALL_B_1 | QLD1 | 31/01/2022 4:05 | 350 | 83.82 |
STAN-2 | QLD1 | 31/01/2022 4:05 | 215 | 86.98 |
STAN-1 | QLD1 | 31/01/2022 4:05 | 250 | 86.98 |
STAN-3 | QLD1 | 31/01/2022 4:05 | 250 | 86.98 |
TARONG#1 | QLD1 | 31/01/2022 4:05 | 190 | 90.58 |
TARONG#2 | QLD1 | 31/01/2022 4:05 | 190 | 90.58 |
TARONG#3 | QLD1 | 31/01/2022 4:05 | 190 | 90.58 |
TARONG#4 | QLD1 | 31/01/2022 4:05 | 190 | 90.58 |
CPP_3 | QLD1 | 31/01/2022 4:05 | 360 | 93.56 |
BRAEMAR5 | QLD1 | 31/01/2022 4:05 | 100 | 95.52 |
KAREEYA1 | QLD1 | 31/01/2022 4:05 | 22 | 97.53 |