データサイエンス初学者が最短でPythonを学ぶ方法
PythonやRは今や機械学習・統計解析の実務についてはほぼ必須となるスキルです
カテゴリ一 記事一覧
PythonやRは今や機械学習・統計解析の実務についてはほぼ必須となるスキルです
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
#辞書を要素とするリストとして渡す links = [ {'source': '20x1_All', 'target': 'S_20x1', 'value': 180}, {'source': '20x1_All', 'target': 'A_20x1', 'value': 380}, {'source': '20x1_All', 'target': 'B_20x1', 'value': 180}, {'source': 'S_20x1', 'target': 'S_20x2', 'value': 100}, {'source': 'A_20x1', 'target': 'S_20x2', 'value': 80}, {'source': 'B_20x1', 'target': 'S_20x2', 'value': 10}, {'source': '新規', 'target': 'S_20x2', 'value': 10}, {'source': 'S_20x1', 'target': 'A_20x2', 'value': 50}, {'source': 'A_20x1', 'target': 'A_20x2', 'value': 200}, {'source': 'B_20x1', 'target': 'A_20x2', 'value': 40}, {'source': '新規', 'target': 'A_20x2', 'value': 20}, {'source': 'S_20x1', 'target': 'B_20x2', 'value': 20}, {'source': 'A_20x1', 'target': 'B_20x2', 'value': 80}, {'source': 'B_20x1', 'target': 'B_20x2', 'value': 100}, {'source': '新規', 'target': 'B_20x2', 'value': 30}, {'source': 'S_20x1', 'target': '退会', 'value': 10}, {'source': 'A_20x1', 'target': '退会', 'value': 20}, {'source': 'B_20x1', 'target': '退会', 'value': 30}, {'source': '新規', 'target': '退会', 'value': 10},] layout = Layout(width ='1400',height='700') rank_sets=[{"type":"same","nodes":['20x1_All','新規']}] #オブジェクト化 w = SankeyWidget(links=links, layout=layout,margins=dict(top=0, bottom=0, left=50, right=100),rank_sets=rank_sets) #表示w |
サンキーダイアグラムとは サンキーダイアグラムはinとoutをもつフローを可視化