single
Challenge: Data Wrangling Workflow
Pyyhkäise näyttääksesi valikon
Imagine you are working with a dataset that contains information about sales transactions from a small retail shop. The data arrives in a messy form: some values are missing, column names are inconsistent, and there are duplicate rows. Your goal is to apply a complete data wrangling workflow using Tidyverse tools in R. You will need to import (simulate) the data, clean it by renaming columns and removing duplicates, transform it by creating new variables and handling missing values, and finally summarize the sales by product category to provide insights for the shop owner.
Pyyhkäise aloittaaksesi koodauksen
You are given a simulated messy dataset representing sales transactions. Your task is to apply a complete data wrangling workflow using Tidyverse functions to clean, transform, and summarize the data.
- Rename the columns to consistent, tidy names.
- Remove duplicate rows from the dataset.
- Replace missing values in the
sales_amountcolumn with 0 and remove rows with missingdate_sold. - Create a new variable
sales_amount_usdby multiplyingsales_amountby 2. - Summarize the total sales in USD by product category.
Ratkaisu
Kiitos palautteestasi!
single
Kysy tekoälyä
Kysy tekoälyä
Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme