Problem: This exercise relates to the Online Retail II data set which is a real online retail transaction data set of tw
Posted: Sat May 14, 2022 3:40 pm
Problem: This exercise relates to the Online Retail II data set which is a real online retail transaction data set of two years. This data frame contains 8 columns, namely InvoiceNo, StockCode, Description, Quantity, InvoiceDate, UnitPrice, CustomerID and Country. 1. Read the data into R. Call the loaded data Retail. 2. Preview the data. 3. Display the list of country along with their number of customers. 4. List the total number of unique customers. Hint: Use unique() function. 5. List the customers who are repeat purchasers. Hint: group by customer ID and then by distinct(Invoice date). 6. List the products that bring most revenue. Hint: revenue=Quantity*UnitPrice 7. Mutate the data frame so that it includes a new variable that contains the sales amount of every invoice (named Sales_Amount). 8. Draw a histogram (width of 0.25 and fill color “dark blue”) to explore the top 5 countries in term of sales amounts. Analyze the findings.