Veriden otomatik şekiller

Matplotlib ile Veri Görselleştirmeye Giriş

Ariel Rokem

Data Scientist

Neden otomatikleştirelim?

  • Kolaylık ve hız
  • Esneklik
  • Sağlamlık
  • Yeniden üretilebilirlik
Matplotlib ile Veri Görselleştirmeye Giriş

Kaç farklı veri türü?

summer_2016_medals["Sport"]
ID
62            Rowing
65         Taekwondo
73          Handball
             ...
134759      Handball
135132    Volleyball
135205        Boxing
Name: Sport, Length: 976, dtype: object
Matplotlib ile Veri Görselleştirmeye Giriş

Bir sütundaki benzersiz değerleri alma

sports = summer_2016_medals["Sport"].unique()

print(sports)
['Rowing' 'Taekwondo' 'Handball' 'Wrestling' 
'Gymnastics' 'Swimming' 'Basketball' 'Boxing' 
'Volleyball' 'Athletics']
Matplotlib ile Veri Görselleştirmeye Giriş

Tüm sporlar için boy bar grafiği

fig, ax = plt.subplots()

for sport in sports:
  sport_df = summer_2016_medals[summer_2016_medals["Sport"] == sport]

ax.bar(sport, sport_df["Height"].mean(), yerr=sport_df["Height"].std())
ax.set_ylabel("Height (cm)") ax.set_xticklabels(sports, rotation=90) plt.show()
Matplotlib ile Veri Görselleştirmeye Giriş

Veriden otomatik türetilen şekil

Matplotlib ile Veri Görselleştirmeye Giriş

Görselleştirmeleri otomatikleştirmeyi uygulayın!

Matplotlib ile Veri Görselleştirmeye Giriş

Preparing Video For Download...