Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlight flow in parallel set #226

Open
jugdemon opened this issue Mar 1, 2021 · 0 comments
Open

Highlight flow in parallel set #226

jugdemon opened this issue Mar 1, 2021 · 0 comments
Labels
feature a feature request or enhancement

Comments

@jugdemon
Copy link

jugdemon commented Mar 1, 2021

I had hoped to use the alpha in the parallel set to highlight the flow of one kind of information.

I have 390 devices sending data through 3 gateways received on a server. I group the data by the server status. It works if I want to highlight the status at the server:

ggplot(ggforce.parallel.sets, aes(x, id = id, split = y, value = value)) +
    geom_parallel_sets(aes(fill = Server, alpha = Lost), axis.width = 0.3, sep=0) +
    geom_parallel_sets_axes(axis.width = 0.35, color='transparent', sep=0) +
    geom_parallel_sets_labels(colour = 'white', angle=0, sep=0,size = 3)

(Code does not include ggplot formating used):
fer_teaser_lost

But now I want to highlight the information passing through gateway 3 and here the functionality breaks down:

ggplot(ggforce.parallel.sets, aes(x, id = id, split = y, value = value)) +
    geom_parallel_sets(aes(fill = Server, alpha = GW3), axis.width = 0.3, sep=0) +
    geom_parallel_sets_axes(axis.width = 0.35, color='transparent', sep=0) +
    geom_parallel_sets_labels(colour = 'white', angle=0, sep=0,size = 3)

Here is the result that just gives some base-alpha (probably the default?):
fer_teaser

Is it possible to expand the package so that each diagonal uses its own alpha value provided by a column in the input data?

Here is the data in a CSV format to reproduce the above image:
Server,value,id,Device by Type,Gateway,x,y,Arrived,Restored,Lost,GW3
Restored,161141,1,1,138,Server,Restored,0,0.3,0,0
Lost,8714,2,1,138,Server,Lost,0,0,0.3,0
Arrived,389534,3,1,138,Server,Arrived,0.3,0,0,0
Restored,68709,4,1,139,Server,Restored,0,0.3,0,0
Lost,8714,5,1,139,Server,Lost,0,0,0.3,0
Arrived,445203,6,1,139,Server,Arrived,0.3,0,0,0
Restored,482296,7,1,140,Server,Restored,0,0.3,0,0.3
Lost,8714,8,1,140,Server,Lost,0,0,0.3,0.3
Arrived,86683,9,1,140,Server,Arrived,0.3,0,0,0.3
Restored,226120,10,2,138,Server,Restored,0,0.3,0,0
Lost,125723,11,2,138,Server,Lost,0,0,0.3,0
Arrived,2384417,12,2,138,Server,Arrived,0.3,0,0,0
Restored,135005,13,2,139,Server,Restored,0,0.3,0,0
Lost,125723,14,2,139,Server,Lost,0,0,0.3,0
Arrived,2429822,15,2,139,Server,Arrived,0.3,0,0,0
Restored,2624551,16,2,140,Server,Restored,0,0.3,0,0.3
Lost,125723,17,2,140,Server,Lost,0,0,0.3,0.3
Arrived,1012866,18,2,140,Server,Arrived,0.3,0,0,0.3
Restored,211641,19,3,138,Server,Restored,0,0.3,0,0
Lost,125486,20,3,138,Server,Lost,0,0,0.3,0
Arrived,1549587,21,3,138,Server,Arrived,0.3,0,0,0
Restored,79236,22,3,139,Server,Restored,0,0.3,0,0
Lost,125486,23,3,139,Server,Lost,0,0,0.3,0
Arrived,1615903,24,3,139,Server,Arrived,0.3,0,0,0
Restored,1954056,25,3,140,Server,Restored,0,0.3,0,0.3
Lost,125486,26,3,140,Server,Lost,0,0,0.3,0.3
Arrived,565982,27,3,140,Server,Arrived,0.3,0,0,0.3
Restored,245970,28,4,138,Server,Restored,0,0.3,0,0
Lost,19254,29,4,138,Server,Lost,0,0,0.3,0
Arrived,583040,30,4,138,Server,Arrived,0.3,0,0,0
Restored,211077,31,4,139,Server,Restored,0,0.3,0,0
Lost,19254,32,4,139,Server,Lost,0,0,0.3,0
Arrived,607470,33,4,139,Server,Arrived,0.3,0,0,0
Restored,828343,34,4,140,Server,Restored,0,0.3,0,0.3
Lost,19254,35,4,140,Server,Lost,0,0,0.3,0.3
Arrived,46413,36,4,140,Server,Arrived,0.3,0,0,0.3
Restored,489806,37,5,138,Server,Restored,0,0.3,0,0
Lost,396080,38,5,138,Server,Lost,0,0,0.3,0
Arrived,932818,39,5,138,Server,Arrived,0.3,0,0,0
Restored,144468,40,5,139,Server,Restored,0,0.3,0,0
Lost,396080,41,5,139,Server,Lost,0,0,0.3,0
Arrived,1106971,42,5,139,Server,Arrived,0.3,0,0,0
Restored,953685,43,5,140,Server,Restored,0,0.3,0,0.3
Lost,396080,44,5,140,Server,Lost,0,0,0.3,0.3
Arrived,109922,45,5,140,Server,Arrived,0.3,0,0,0.3
Restored,161141,1,1,138,Device by Type,Sound,0,0.3,0,0
Lost,8714,2,1,138,Device by Type,Sound,0,0,0.3,0
Arrived,389534,3,1,138,Device by Type,Sound,0.3,0,0,0
Restored,68709,4,1,139,Device by Type,Sound,0,0.3,0,0
Lost,8714,5,1,139,Device by Type,Sound,0,0,0.3,0
Arrived,445203,6,1,139,Device by Type,Sound,0.3,0,0,0
Restored,482296,7,1,140,Device by Type,Sound,0,0.3,0,0.3
Lost,8714,8,1,140,Device by Type,Sound,0,0,0.3,0.3
Arrived,86683,9,1,140,Device by Type,Sound,0.3,0,0,0.3
Restored,226120,10,2,138,Device by Type,PIR,0,0.3,0,0
Lost,125723,11,2,138,Device by Type,PIR,0,0,0.3,0
Arrived,2384417,12,2,138,Device by Type,PIR,0.3,0,0,0
Restored,135005,13,2,139,Device by Type,PIR,0,0.3,0,0
Lost,125723,14,2,139,Device by Type,PIR,0,0,0.3,0
Arrived,2429822,15,2,139,Device by Type,PIR,0.3,0,0,0
Restored,2624551,16,2,140,Device by Type,PIR,0,0.3,0,0.3
Lost,125723,17,2,140,Device by Type,PIR,0,0,0.3,0.3
Arrived,1012866,18,2,140,Device by Type,PIR,0.3,0,0,0.3
Restored,211641,19,3,138,Device by Type,CO2,0,0.3,0,0
Lost,125486,20,3,138,Device by Type,CO2,0,0,0.3,0
Arrived,1549587,21,3,138,Device by Type,CO2,0.3,0,0,0
Restored,79236,22,3,139,Device by Type,CO2,0,0.3,0,0
Lost,125486,23,3,139,Device by Type,CO2,0,0,0.3,0
Arrived,1615903,24,3,139,Device by Type,CO2,0.3,0,0,0
Restored,1954056,25,3,140,Device by Type,CO2,0,0.3,0,0.3
Lost,125486,26,3,140,Device by Type,CO2,0,0,0.3,0.3
Arrived,565982,27,3,140,Device by Type,CO2,0.3,0,0,0.3
Restored,245970,28,4,138,Device by Type,PIR,0,0.3,0,0
Lost,19254,29,4,138,Device by Type,PIR,0,0,0.3,0
Arrived,583040,30,4,138,Device by Type,PIR,0.3,0,0,0
Restored,211077,31,4,139,Device by Type,PIR,0,0.3,0,0
Lost,19254,32,4,139,Device by Type,PIR,0,0,0.3,0
Arrived,607470,33,4,139,Device by Type,PIR,0.3,0,0,0
Restored,828343,34,4,140,Device by Type,PIR,0,0.3,0,0.3
Lost,19254,35,4,140,Device by Type,PIR,0,0,0.3,0.3
Arrived,46413,36,4,140,Device by Type,PIR,0.3,0,0,0.3
Restored,489806,37,5,138,Device by Type,VOC,0,0.3,0,0
Lost,396080,38,5,138,Device by Type,VOC,0,0,0.3,0
Arrived,932818,39,5,138,Device by Type,VOC,0.3,0,0,0
Restored,144468,40,5,139,Device by Type,VOC,0,0.3,0,0
Lost,396080,41,5,139,Device by Type,VOC,0,0,0.3,0
Arrived,1106971,42,5,139,Device by Type,VOC,0.3,0,0,0
Restored,953685,43,5,140,Device by Type,VOC,0,0.3,0,0.3
Lost,396080,44,5,140,Device by Type,VOC,0,0,0.3,0.3
Arrived,109922,45,5,140,Device by Type,VOC,0.3,0,0,0.3
Restored,161141,1,1,138,Gateway,GW1,0,0.3,0,0
Lost,8714,2,1,138,Gateway,GW1,0,0,0.3,0
Arrived,389534,3,1,138,Gateway,GW1,0.3,0,0,0
Restored,68709,4,1,139,Gateway,GW2,0,0.3,0,0
Lost,8714,5,1,139,Gateway,GW2,0,0,0.3,0
Arrived,445203,6,1,139,Gateway,GW2,0.3,0,0,0
Restored,482296,7,1,140,Gateway,GW3,0,0.3,0,0.3
Lost,8714,8,1,140,Gateway,GW3,0,0,0.3,0.3
Arrived,86683,9,1,140,Gateway,GW3,0.3,0,0,0.3
Restored,226120,10,2,138,Gateway,GW1,0,0.3,0,0
Lost,125723,11,2,138,Gateway,GW1,0,0,0.3,0
Arrived,2384417,12,2,138,Gateway,GW1,0.3,0,0,0
Restored,135005,13,2,139,Gateway,GW2,0,0.3,0,0
Lost,125723,14,2,139,Gateway,GW2,0,0,0.3,0
Arrived,2429822,15,2,139,Gateway,GW2,0.3,0,0,0
Restored,2624551,16,2,140,Gateway,GW3,0,0.3,0,0.3
Lost,125723,17,2,140,Gateway,GW3,0,0,0.3,0.3
Arrived,1012866,18,2,140,Gateway,GW3,0.3,0,0,0.3
Restored,211641,19,3,138,Gateway,GW1,0,0.3,0,0
Lost,125486,20,3,138,Gateway,GW1,0,0,0.3,0
Arrived,1549587,21,3,138,Gateway,GW1,0.3,0,0,0
Restored,79236,22,3,139,Gateway,GW2,0,0.3,0,0
Lost,125486,23,3,139,Gateway,GW2,0,0,0.3,0
Arrived,1615903,24,3,139,Gateway,GW2,0.3,0,0,0
Restored,1954056,25,3,140,Gateway,GW3,0,0.3,0,0.3
Lost,125486,26,3,140,Gateway,GW3,0,0,0.3,0.3
Arrived,565982,27,3,140,Gateway,GW3,0.3,0,0,0.3
Restored,245970,28,4,138,Gateway,GW1,0,0.3,0,0
Lost,19254,29,4,138,Gateway,GW1,0,0,0.3,0
Arrived,583040,30,4,138,Gateway,GW1,0.3,0,0,0
Restored,211077,31,4,139,Gateway,GW2,0,0.3,0,0
Lost,19254,32,4,139,Gateway,GW2,0,0,0.3,0
Arrived,607470,33,4,139,Gateway,GW2,0.3,0,0,0
Restored,828343,34,4,140,Gateway,GW3,0,0.3,0,0.3
Lost,19254,35,4,140,Gateway,GW3,0,0,0.3,0.3
Arrived,46413,36,4,140,Gateway,GW3,0.3,0,0,0.3
Restored,489806,37,5,138,Gateway,GW1,0,0.3,0,0
Lost,396080,38,5,138,Gateway,GW1,0,0,0.3,0
Arrived,932818,39,5,138,Gateway,GW1,0.3,0,0,0
Restored,144468,40,5,139,Gateway,GW2,0,0.3,0,0
Lost,396080,41,5,139,Gateway,GW2,0,0,0.3,0
Arrived,1106971,42,5,139,Gateway,GW2,0.3,0,0,0
Restored,953685,43,5,140,Gateway,GW3,0,0.3,0,0.3
Lost,396080,44,5,140,Gateway,GW3,0,0,0.3,0.3
Arrived,109922,45,5,140,Gateway,GW3,0.3,0,0,0.3

@thomasp85 thomasp85 added the feature a feature request or enhancement label Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants