Taco Analysis Chart

Quarto

Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see https://quarto.org.

Running Code

When you click the Render button a document will be generated that includes both content and the output of embedded code. You can embed code like this:

library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.4     ✔ readr     2.1.5
✔ forcats   1.0.0     ✔ stringr   1.5.1
✔ ggplot2   3.5.2     ✔ tibble    3.2.1
✔ lubridate 1.9.4     ✔ tidyr     1.3.1
✔ purrr     1.0.4     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
## Summarizing the Taco dataset

data <- read_csv("Taco.csv")
Rows: 1000 Columns: 13
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (6): Restaurant_Name, Location, Order_Time, Delivery_Time, Taco_Size, Ta...
dbl (6): Order_ID, Delivery_Duration, Toppings_Count, Distance, Price, Tip
lgl (1): Weekend_Order

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
glimpse(data)
Rows: 1,000
Columns: 13
$ Order_ID          <dbl> 770487, 671858, 688508, 944962, 476417, 678856, 1836…
$ Restaurant_Name   <chr> "El Taco Loco", "El Taco Loco", "Taco Haven", "Spicy…
$ Location          <chr> "New York", "San Antonio", "Austin", "Dallas", "San …
$ Order_Time        <chr> "1/8/2024 14:55", "23-11-2024 17:11", "21-11-2024 20…
$ Delivery_Time     <chr> "1/8/2024 15:36", "23-11-2024 17:25", "21-11-2024 21…
$ Delivery_Duration <dbl> 41, 14, 38, 45, 15, 83, 45, 31, 17, 73, 64, 29, 11, …
$ Taco_Size         <chr> "Regular", "Regular", "Large", "Regular", "Large", "…
$ Taco_Type         <chr> "Chicken Taco", "Beef Taco", "Pork Taco", "Chicken T…
$ Toppings_Count    <dbl> 5, 1, 2, 2, 0, 0, 1, 3, 2, 1, 1, 4, 2, 1, 1, 2, 5, 4…
$ Distance          <dbl> 3.01, 6.20, 20.33, 3.00, 24.34, 16.70, 9.57, 9.80, 1…
$ Price             <dbl> 9.25, 4.25, 7.00, 5.50, 4.50, 3.00, 5.75, 6.75, 5.50…
$ Tip               <dbl> 2.22, 3.01, 0.02, 1.90, 1.14, 2.32, 0.63, 2.97, 0.33…
$ Weekend_Order     <lgl> FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE…
ggplot(data = data)

ggplot(data)

ggplot(
  data = data,
  mapping = aes(x = Delivery_Duration, y = Tip)
)

ggplot(
  data = data,
  mapping = aes(x = Delivery_Duration, y = Tip)
)+
  geom_point()

ggplot(
  data = data,
  mapping = aes(x = Delivery_Duration, y = Tip, color = Location)
) +
  geom_point()

Explanation:

This graph presents the data analysis of the correlation between the delivery duration, in minutes, and how much people tip. The key on the right hand side presents where the taco shops are located. As you can see, people are stingy with the amount of money they tip, despite the time duration it takes to deliver the tacos.