How to generate a sankey plot based on my data?

CorText Manager Q&A forumCategory: Network mappingHow to generate a sankey plot based on my data?
moggo asked 4 years ago

Hi, all,
Recently, I wanted to use this platform to generate flow-diagrams(Sankey) for visualization of interdisciplinary data. My data looked like this:

paper_id
ref_pattern
year

PMC3656028
10,11,13,16,24,27,28
2013

PMC7167772
10,11,13,15,16,17,23,24,25,27,28,29,30,34,35
2018

PMC7103128
10,13,27,30
2010

PMC7198456
13,24,27
2020

The numbers in ref_pattern denote the discipline code. In your website, i could’t find any useful information on how to genarate flow-diagrams(Sankey) based on my data. Can you please give me some suggestions? What format should I convert my data into to meet the needs of visualization? Thanks in advance.
Regards,

Yi Zhao

Lionel Staff replied 4 years ago

See below

2 Answers
Lionel Staff answered 4 years ago

Dear Yi Zhao,
 
So, the structure of your data is perfect, you just have to:

  • Build a csv (see our documentation there: https://docs.cortext.net/upload-corpus/#csv), with utf8 charset
  • Tabulation separated (no quote)
  • with *** to separate multiple values in “ref_pattern” field
  • Save it, and zippe it. 
  • Upload it to Cortext Manager, and parse it using Corpus Format = robust csv
  • In the Robust Csv parameters, do not forget to add Time Field = year to run dynamic analysis
  • See our documentation page for parsing there: https://docs.cortext.net/data-parsing/

When your corpus is parsed, enjoy the Network mapping script and play with the Dynamics tab to draw some sankey diagrams (https://docs.cortext.net/analysis-mapping-heterogeneous-networks/mapping-dynamical-analysis-options/).
 
I hope it helps
Best regards
Lionel Villard

moggo replied 4 years ago

Thanks for replying. The process is very clear. I ran into a new problem.
My data is from 1990 to 1999, including 10 years. However, no matter how I change the setting of time slices, my data is divided into 5 periods. I want to study the year-to-year changes of the discipline co-occurrence. Is there any suggestion?

Best
Yi Zhao

Lionel Staff replied 4 years ago

Dear Yi Zhao,

Could you invite me to your project? lionel dot villard at esiee dot fr
I will leave it after a short investigation.

Best
L

moggo replied 4 years ago

Dear Lionel,
I have invited you to the project, please check the request.

Best
Yi Zhao

Lionel Staff answered 4 years ago

Dear Yi Zhao,

Thanks!

See the Sankey diagram I have run: all the 10 periods are there! I have chosen not to filter any ref, no proximity measure (direct raw/frequency values for nodes), and regular periods (to fixe the 10 periods on 1 year each).
My guess is that with the filters you have made: 5 periods are empty (without any nodes/ref), so they do not appear in the Sankey diagram.

I hope it helps !
Lionel

 

 

moggo replied 4 years ago

Hi Lionel,
I saw the analysis you made, It’s perfect. I changed the data and followed your parameter settings. The log shows it succeeded but task didn’t show a result, task id is 2245450003308. Do you know what happened? You are still in my project, could you check it out for me in your free time?
Thanks in advance.
Best
Yi Zhao

Lionel Staff replied 4 years ago

Dear Yi Zhao,
Strange! We are investigating.
Would it be feasible for you to start new scripts, with the same parameters on the same datasets? I think this is the fastest way for you to have the all your results!
Best regards
Lionel Villard

moggo replied 4 years ago

Dear Lionel,
Thanks for your suggestions.
I tried to start a new script, but it didn’t work. The datasets and parameters are all the same as the previous dataset you run, the only difference is the time scope.
Best regards,
Yi

Lionel Staff replied 4 years ago

Dear Yi,

We have worked on the behaviour you describe. It has been solved today.
I have downloaded one of your datasets, changed the name, to run some tests. You will be able to see them in your project!!
I have leaved your project.

Thanks to have reported this behaviour
Enjoy CorText Manager!
Lionel Villard

moggo replied 4 years ago

Dear Lionel,
Thanks for your continued help!
Cortext is a really great analysis platform and I will share it with my friends.

Best regards,
Yi Zhao