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

R tutorial: Exploring raw data смотреть онлайн

📁 Обучение 👁️ 15 📅 03.12.2023

Learn more about cleaning data with R: https://www.datacamp.com/courses/cleaning-data-in-r

The first step in the data cleaning process is exploring your raw data. We can think of data exploration itself as a three step process consisting of understanding the structure of your data, looking at your data, and visualizing your data.

To understand the structure of your data, you have several tools at your disposal in R. Here, we read in a simple dataset called lunch, which contains information on the number of free, reduced price, and full price school lunches served in the US from 1969 through 2014. First, we check the class of the lunch object to verify that it's a data frame, or a two-dimensional table consisting of rows and columns, of which each column is a single data type such as numeric, character, etc.

We then view the dimensions of the dataset with the dim() function. This particular dataset has 46 rows and 7 columns. dim() always displays the number of rows first, followed by the number of columns.

Next, we take a look at the column names of lunch with the names() function. Each of the 7 columns has a name: year, avg_free, avg_reduced, and so on.

Okay, so we're starting to get a feel for things, but let's dig deeper. The str() (for "structure") function is one of the most versatile and useful functions in the R language because it can be called on any object and will normally provide a useful and compact summary of its internal structure. When passed a data frame, as in this case, str() tells us how many rows and columns we have. Actually, the function refers to rows as observations and columns as variables, which, strictly speaking, is true in a tidy dataset, but not always the case as you'll see in the next chapter. In addition, you see the name of each column, followed by its data type and a preview of the data contained in it. The lunch dataset happens to be entirely integers and numerics. We'll have a closer look at these datatypes in chapter 3.

The dplyr package offers a slightly different flavor of str() called glimpse(), which offers the same information, but attempts to preview as much of each column as will fit neatly on your screen. So here, we first load dplyr with the library() command, then call glimpse() with a single argument, lunch.

Another extremely helpful function is summary(), which, when applied to a data frame, provides a useful summary of each column. Since the lunch data are entirely integers and numerics, we see a summary of the distribution of each column including the minimum and maximum, the mean, and the 25th, 50th, and 75th percent quartiles (also referred to as the first quartile, median, and third quartile, respectively.) As you'll soon see, when faced with character or factor variables, summary() will produce different summaries.

To review, you've seen how we can use the class() function to see the class of a dataset, the dim() function to view its dimensions, names() to see the column names, str() to view its structure, glimpse() to do the same in a slightly enhanced format, and summary() to see a helpful summary of each column.

Time to practice!

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «R tutorial: Exploring raw data» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

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

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

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