RUVIDEO
Поделитесь видео 🙏

Python Tutorial: Plot all of your data: Bee swarm plots

Want to learn more? Take the full course at https://learn.datacamp.com/courses/statistical-thinking-in-python-part-1 at your own pace. More than a video, you'll learn hands-on coding & quickly apply skills to your daily work.

---
The histogram of county-level election data was informative.

We learned that more counties voted for McCain than for Obama. Since our goal is to learn from data, this is great! However, a major drawback of using histograms

is that the same data set can look different depending on how the bins are chosen. And choice of bins is in many ways arbitrary. This leads to

binning bias; you might interpret your plot differently for two different choices of bin number.

An additional problem with histograms is that we are not plotting all of the data. We are sweeping the data into bins, and losing their actual values.

To remedy these problems we can make a bee swarm plot, also called a swarm plot. This is best shown by example.


Here is a beeswarm plot of the vote totals in the three swing states. Each point in the plot represents the share of the vote Obama got in a single county. The position along the y-axis is the quantitative information. The data are spread in x to make them visible, but their precise location along the x-axis is unimportant. Notably, we no longer have any binning bias and all data are displayed.

This plot may be conveniently generated using Seaborn.

A requirement is that your data are in a well-organized Pandas DataFrame

where each column is a feature and

each row an observation. In this case, an observation is a county, and the features are state and the Democratic share of the vote.

To make the plot, you need to specify which column gives the values for the y-axis, in this case the share of the vote that went to the Democrat Barack Obama, and the values for the x-axis, in this case the state. And of course, you need to tell it which DataFrame contains the data.

From this plot, too, we can clearly see that Obama got less than 50% of the vote in the majority of counties in each of the three swing states. This time it is more detailed than a histogram, but without too much added visual complexity.

Now it's your turn to make some bee swarm plots!

#PythonTutorial #DataCamp #Statistical #Thinking #Python

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Python Tutorial: Plot all of your data: Bee swarm plots», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.