Alle Daten plotten: Beeswarm-Plots

Statistical Thinking in Python (Teil 1)

Justin Bois

Teaching Professor at the California Institute of Technology

US-Swing States 2008: Wahlergebnisse

ch1-3.003.png

1 Daten von Data.gov (https://www.data.gov/)
Statistical Thinking in Python (Teil 1)

US-Swing States 2008: Wahlergebnisse

ch1-3.005.png

1 Daten von Data.gov (https://www.data.gov/)
Statistical Thinking in Python (Teil 1)

Binning-Bias

  • Gleiche Daten wirken je nach Bins anders
Statistical Thinking in Python (Teil 1)

Beeswarm-Plot

ch1-3.009.png

1 Daten von Data.gov (https://www.data.gov/)
Statistical Thinking in Python (Teil 1)

Aufbau des DataFrames

ch1-3_v2.011.png

1 Daten von Data.gov (https://www.data.gov/)
Statistical Thinking in Python (Teil 1)

Aufbau des DataFrames

ch1-3_v2.012.png

Statistical Thinking in Python (Teil 1)

Aufbau des DataFrames

ch1-3_v2.013.png

Statistical Thinking in Python (Teil 1)

Beeswarm-Plot erstellen

_ = sns.swarmplot(x='state', y='dem_share', data=df_swing)
_ = plt.xlabel('state')
_ = plt.ylabel('percent of vote for Obama')
plt.show()
Statistical Thinking in Python (Teil 1)

US-Swing States 2008: Wahlergebnisse

ch1-3_v2.018.png

1 Daten von Data.gov (https://www.data.gov/)
Statistical Thinking in Python (Teil 1)

Lass uns üben!

Statistical Thinking in Python (Teil 1)

Preparing Video For Download...