grocery_data: Grocery data ready for analysis (12,000 orders)

grocery_dataR Documentation

Grocery data ready for analysis (12,000 orders)

Description

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.

Usage

data(grocery_data)

Format

A data frame with 12,000 rows and 13 variables:

basket_id

unique basket id

order_id

order id foreign key related to order_db_funmart

cost

total price of an order

customer_id

unique customer id

order_date

order date

order_time

order time

payment_method

1 of 3 methods used to pay for the order

store

grocery store

customer_name

customer name generated via randomNames

customer_age

customer age generated via wakefield, 18 to 75

household_size

household size generated via wakefield, 1 to 7

long

longitude of customers' delivery address in the UAE generated via charlatan

lat

latitude of customers' delivery address in the UAE generated via charlatan

Details

The product names and prices were collected from https://www.ocado.com and https://www.elgrocer.com.

See Also

customer_db_funmart, order_db_funmart, and basket_db_funmart.

Examples

## 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)

moamiristat/grocerycart documentation built on June 15, 2022, 10 a.m.