Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Or is it Holiday Effect? | Visualizing Data
Analyzing and Visualizing Real-World Data
course content

Зміст курсу

Analyzing and Visualizing Real-World Data

Analyzing and Visualizing Real-World Data

1. Preprocessing Data: Part I
2. Preprocessing Data: Part II
3. Analyzing Data
4. Visualizing Data

bookOr is it Holiday Effect?

Let's find out if holidays could be the cause. To do this, we will display the dates next to the points.

Завдання

  1. Add a hue parameter to the .scatterplot() function so that the points will be colored in accordance to the values in the 'Holiday_Flag' column.
  2. Initialize a for loop to display the dates next to the points. Iterate over the indexes of data using index as the dummy variable.
  3. Within the loop, use the .text() method of plt to display text on the plot. The method should have 4 parameters:
    • the first is responsible for the x-coordinate of the text, which should be the index value of the 'Temperature' column with a 0.2 offset;
    • the second is responsible for the y-coordinate of text, which should be the index value of the 'Weekly_Sales' column;
    • the third is the text that should be displayed which should be the index value of the 'Date' column, transformed into a date;
    • the fourth is the color parameter, responsible for color of the text, which should be 'black'.

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 4. Розділ 5
toggle bottom row

bookOr is it Holiday Effect?

Let's find out if holidays could be the cause. To do this, we will display the dates next to the points.

Завдання

  1. Add a hue parameter to the .scatterplot() function so that the points will be colored in accordance to the values in the 'Holiday_Flag' column.
  2. Initialize a for loop to display the dates next to the points. Iterate over the indexes of data using index as the dummy variable.
  3. Within the loop, use the .text() method of plt to display text on the plot. The method should have 4 parameters:
    • the first is responsible for the x-coordinate of the text, which should be the index value of the 'Temperature' column with a 0.2 offset;
    • the second is responsible for the y-coordinate of text, which should be the index value of the 'Weekly_Sales' column;
    • the third is the text that should be displayed which should be the index value of the 'Date' column, transformed into a date;
    • the fourth is the color parameter, responsible for color of the text, which should be 'black'.

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 4. Розділ 5
toggle bottom row

bookOr is it Holiday Effect?

Let's find out if holidays could be the cause. To do this, we will display the dates next to the points.

Завдання

  1. Add a hue parameter to the .scatterplot() function so that the points will be colored in accordance to the values in the 'Holiday_Flag' column.
  2. Initialize a for loop to display the dates next to the points. Iterate over the indexes of data using index as the dummy variable.
  3. Within the loop, use the .text() method of plt to display text on the plot. The method should have 4 parameters:
    • the first is responsible for the x-coordinate of the text, which should be the index value of the 'Temperature' column with a 0.2 offset;
    • the second is responsible for the y-coordinate of text, which should be the index value of the 'Weekly_Sales' column;
    • the third is the text that should be displayed which should be the index value of the 'Date' column, transformed into a date;
    • the fourth is the color parameter, responsible for color of the text, which should be 'black'.

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Let's find out if holidays could be the cause. To do this, we will display the dates next to the points.

Завдання

  1. Add a hue parameter to the .scatterplot() function so that the points will be colored in accordance to the values in the 'Holiday_Flag' column.
  2. Initialize a for loop to display the dates next to the points. Iterate over the indexes of data using index as the dummy variable.
  3. Within the loop, use the .text() method of plt to display text on the plot. The method should have 4 parameters:
    • the first is responsible for the x-coordinate of the text, which should be the index value of the 'Temperature' column with a 0.2 offset;
    • the second is responsible for the y-coordinate of text, which should be the index value of the 'Weekly_Sales' column;
    • the third is the text that should be displayed which should be the index value of the 'Date' column, transformed into a date;
    • the fourth is the color parameter, responsible for color of the text, which should be 'black'.

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 4. Розділ 5
Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
some-alt