Vizualizujte všechna data: Bee swarm ploty

Statistical Thinking in Python (Part 1)

Justin Bois

Teaching Professor at the California Institute of Technology

Výsledky voleb v USA 2008 – swing states

ch1-3.003.png

1 Data retrieved from Data.gov (https://www.data.gov/)
Statistical Thinking in Python (Part 1)

Výsledky voleb v USA 2008 – swing states

ch1-3.005.png

1 Data retrieved from Data.gov (https://www.data.gov/)
Statistical Thinking in Python (Part 1)

Zkreslení způsobené intervalem

  • Stejná data lze interpretovat různě podle zvolené šířky intervalů
Statistical Thinking in Python (Part 1)

Bee swarm plot

ch1-3.009.png

1 Data retrieved from Data.gov (https://www.data.gov/)
Statistical Thinking in Python (Part 1)

Struktura datového rámce

ch1-3_v2.011.png

1 Data retrieved from Data.gov (https://www.data.gov/)
Statistical Thinking in Python (Part 1)

Struktura datového rámce

ch1-3_v2.012.png

Statistical Thinking in Python (Part 1)

Struktura datového rámce

ch1-3_v2.013.png

Statistical Thinking in Python (Part 1)

Vytvoření bee swarm plotu

_ = 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 (Part 1)

Výsledky voleb v USA 2008 – swing states

ch1-3_v2.018.png

1 Data retrieved from Data.gov (https://www.data.gov/)
Statistical Thinking in Python (Part 1)

Pojďme procvičovat!

Statistical Thinking in Python (Part 1)

Preparing Video For Download...