I am working with employee history of members of the financial industry, and would like to make an edgelist to visualize it in a Sankey Flow. So far, my data is in strings of comma-separated entities, like this:
A, B, D
C, A, E, B
F, B
etc.
Of particular interest is ONE of these companies (call it Company B for example). I need to turn these data above into something resembling this:
A, B
B, D
C, B
A, B
E, B
F, B
etc.
Again, the importance is on company B, so I need a way to discern on that factor specifically, and deal with strings of varying length. In the end, I need an edgelist in which every row has Company B, with the data taken from those companies surrounding Company B in the comma-separated strings.