<tableau>Jitter plot
今回はtableauでJitter plotを作ったので、そのtipsをまとめます。
今回はWorkout Wedensdayのお題の中で実施しましたので、
それをまとめていきます!
Jitter plotとは
箱ひげ図などを作成した時に、一つの項目に対して、複数サンプルが存在して、中には同じ値が得られる場合があります。
→今回で言うと年齢は同じだけどplayercodeが違う選手が存在。
このようなデータを点グラフで表すと、同じ値は同じ所にプロットされます。そのため、点と点が重なって散らばり具合がうまく可視化できません。
その時に利用するのがJitter plotです。
データをばらして可視化することで、点が重ならないようにグラフをかけるようになります。(図1.Jitter plotありなしの比較)

WOW(WorkoutWedensday)とは
WOWとは、下記URLにあるように、指定された要求(requirements)のダッシュボードをトレースして勉強するためのサイトです。
今回のrequirementsの概要は、
MBAの選手の所属するteamや年齢のデータに対して、playercode毎の年齢をplotして箱ひげ図を作りそこのプロットにjittre plotを適用することです!
Jitter plot反映前のシートがこちらです。

Jitter plotのつくり方
Jitter plotのつくり方は2つのメジャーなやり方があります。
Random関数を利用してばらばらにする
index関数を利用してばらばらにする
参考URL
https://www.dataplusscience.com/TableauJitter.html
Random関数の利用
Tableauには、抽出やライブ接続 (Excel やテキスト ファイルなど) のデータで動作で利用できるRandom関数が存在します。
Random関数を計算フィールドで作成(図4)
それを列に投入(図5)


Index関数の利用
これなかなかうまくいかなくて苦戦しました…
参考
http://tableaujpn.blogspot.com/2018/05/jitterchart.html
計算フィールドに、index()関数で番号を振りそれを特定の数字(13など)でわった余りを出します(図6)
これを列に投入します→あればらけない(図7)
表計算の編集で今回だと、player codeを選択します(うまく反映されない時は、表計算の編集を確認してみるといいかも)(図8)





無事完成しました~!
#Datasaber
#箱ひげ図
#Jitter plot