This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk 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 = data,
mapping = aes(x = Distance, y = Tip)
)+
geom_point()
ggplot(
data = data,
mapping = aes(x = Distance, y = Tip)
)+
geom_point()
ggplot(
data = data,
mapping = aes(x = Distance, y = Tip, color = Delivery_Duration)
)+
geom_point()