Challenge: Group and Summarise Regional Sales
In business analytics, you often need to summarize sales data by categories such as region to create concise, actionable reports. After learning how to use group_by() to segment your data, you are ready to apply grouping and summarization skills to a practical scenario: analyzing sales by region. This type of analysis helps businesses identify high-performing areas and target strategies more effectively.
Swipe to start coding
Apply your grouping and summarization skills to analyze sales data by region. Your goal is to produce a summary that shows, for each region, the total and average sales.
- Group the data by the
regioncolumn. - For each region, calculate the sum of the
salescolumn and store it astotal_sales. - For each region, calculate the mean of the
salescolumn and store it asaverage_sales. - Return a data frame with one row per region and columns for
region,total_sales, andaverage_sales.
Рішення
Дякуємо за ваш відгук!
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Чудово!
Completion показник покращився до 4.17
Challenge: Group and Summarise Regional Sales
Свайпніть щоб показати меню
In business analytics, you often need to summarize sales data by categories such as region to create concise, actionable reports. After learning how to use group_by() to segment your data, you are ready to apply grouping and summarization skills to a practical scenario: analyzing sales by region. This type of analysis helps businesses identify high-performing areas and target strategies more effectively.
Swipe to start coding
Apply your grouping and summarization skills to analyze sales data by region. Your goal is to produce a summary that shows, for each region, the total and average sales.
- Group the data by the
regioncolumn. - For each region, calculate the sum of the
salescolumn and store it astotal_sales. - For each region, calculate the mean of the
salescolumn and store it asaverage_sales. - Return a data frame with one row per region and columns for
region,total_sales, andaverage_sales.
Рішення
Дякуємо за ваш відгук!
single