asjadnaqvi / stata-alluvial

A Stata package for alluvial plots
MIT License
5 stars 3 forks source link

Following something through variables #12

Open ZeldaDoyle opened 1 year ago

ZeldaDoyle commented 1 year ago

I am trying to track movements by year - so seeing how people move between places by their graduation year. Currently the only way I can seem to do it is alluvial GradYear var1 GradYear v2 etc etc. Ideally I would like to dosomething like by GradYear: alluvial var1 var2 etc, but have all the gradyears on the graph.

asjadnaqvi commented 1 year ago

Can you give an example with code or graph please.

ZeldaDoyle commented 1 year ago

Can you give an example with code or graph please. Sure!
The code I am currently using is . alluvial GradYear PGY12 PGY34 GradYear PGY56 PGY78 GradYear PGY910 which gives me the attached graph. Example.pdf

What I would like is for the GradYear to follow through PGY12 PGY34 etc, so I don't have to stick the extra GradYears in to see the breakup. Hope this helps.

asjadnaqvi commented 1 year ago

Thank you for the detailed example! I can now see what you are trying to do and it is good to see that the command is at least working for all these layers :)

You have a very specific implementation request so I have to think about a generic implementation to be able to by() the diagram.

It might even be better to split each year into different Alluvials and then use graph combine to stack them on top of each other. Otherwise the way it is done now, over inflates the Metro category.

asjadnaqvi commented 1 year ago

merge with #18