grocery_data | R Documentation |
A dataset created by joining the 3 databases associated with this package: customer_db_funmart, order_db_funmart and basket_db_funmart. View the example section below to see how this dataset was created.
data(grocery_data)
A data frame with 12,000 rows and 13 variables:
unique basket id
order id foreign key related to order_db_funmart
total price of an order
unique customer id
order date
order time
1 of 3 methods used to pay for the order
grocery store
customer name generated via randomNames
customer age generated via wakefield, 18 to 75
household size generated via wakefield, 1 to 7
longitude of customers' delivery address in the UAE generated via charlatan
latitude of customers' delivery address in the UAE generated via charlatan
The product names and prices were collected from https://www.ocado.com and https://www.elgrocer.com.
customer_db_funmart
, order_db_funmart
,
and basket_db_funmart
.
## Not run: grocery_data <- basket_db_funmart %>% group_by(basket_id, order_id) %>% summarise(cost = sum(price)) %>% ungroup() %>% inner_join(order_db_funmart, by = "order_id") %>% inner_join(customer_db_funmart, by = "customer_id") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.