棒グラフ

データ可視化への理解

Richie Cotton

Data Evangelist at DataCamp

棒グラフはどんなときに使うべきか?

最も一般的なケース:

  1. カテゴリ変数があるとき
  2. 各カテゴリごとの件数または割合が必要なとき

まれにあるケース:

  1. 各カテゴリに別の数値スコアが必要で、グラフにゼロを含める必要があるとき
データ可視化への理解

When will I, will I be famous?(いつになったら有名になれるのか?)
I can't answer, I can't answer that (そんなことはわからない)

Bros – "When will I be famous?"

The album cover for 'When will I be Famous' by Bros.

データ可視化への理解

2017年 ESPN「最も有名なアスリート100人」

順位 競技
1 ロナウド クリスティアーノ サッカー ポルトガル
2 ジェームズ レブロン バスケットボール アメリカ
3 メッシ リオネル サッカー アルゼンチン
4 フェデラー ロジャー テニス スイス
5 ミケルソン フィル ゴルフ アメリカ
... ... ... ... ...
1 https://data.world/wesmagee/2017-espn-world-fame-100
データ可視化への理解

国別人数の棒グラフ

A bar plot of counts of people on the ESPN top 100 famous athletes list, by country. Countries are ordered alphabetically.

データ可視化への理解

縦棒

A bar plot of counts of people on the ESPN top 100 famous athletes list, by country. Countries are ordered alphabetically. The x and y axes are swapped so that the bars are vertical.

データ可視化への理解

件数での並べ替え

A bar plot of counts of people on the ESPN top 100 famous athletes list, by country. Countries are ordered by decreasing count.

データ可視化への理解

子どもの果物と野菜の摂取量

個数
n = 0 2001 10.921779
n < 1 2001 3.843093
1 <= n < 2 2001 23.659102
... ... ...
4 <= n < 5 2018 12.28728
5 <= n 2018 17.87497
1 https://digital.nhs.uk/data-and-information/publications/statistical/health-survey-for-england/2018/health-survey-for-england-2018-data-tables
データ可視化への理解

積み上げ棒グラフ

A stacked bar plot of the number of portions of fruit and vegetables consumed each day by UK children versus year. Darker green colors correspond to more fruit and veg eaten.

データ可視化への理解

棒グラフ vs. 箱ひげ図

Box plots of the age of start of rule of kings and queens, one for each royal house.

A bar plot of counts of kings and queens by royal house.

データ可視化への理解

件数以外のその他の指標

Box plots of the age of start of rule of kings and queens, one for each royal house.

A bar plot of the mean age of start of rule of kings and queens by royal house.

データ可視化への理解

練習しましょう!

データ可視化への理解

Preparing Video For Download...