library(readr)
pizza_delivery <- read.csv("pizza_delivery.csv", header = TRUE, sep = ",")
print(head(pizza_delivery))
## day date time operator branch driver temperature bill pizzas
## 1 Thursday 1-May-14 35.12837 Laura East Bruno 68.28772 58.4 4
## 2 Thursday 1-May-14 25.20307 Melissa East Salvatore 70.99779 26.4 2
## 3 Thursday 1-May-14 45.64340 Melissa West Salvatore 53.39415 58.1 3
## 4 Thursday 1-May-14 29.37430 Melissa East Salvatore 70.30660 35.2 3
## 5 Thursday 1-May-14 29.99461 Melissa West Salvatore 71.50169 38.4 2
## 6 Thursday 1-May-14 40.25432 Melissa Centre Bruno 60.75950 61.8 4
## free_wine got_wine discount_customer
## 1 0 0 1
## 2 0 0 0
## 3 1 0 0
## 4 0 0 0
## 5 0 0 0
## 6 1 1 0
#histogram with vertical line visualization
hist(pizza_delivery$temperature, ylim= c(1,400), main = "The histogram of temperature,",xlab = "Temperature in Degree Celsius",col = "red")
abline(v = 65 , col= "blue",lty=2,lwd =3 )

#frequency table
table(pizza_delivery$branch)
##
## Centre East West
## 421 410 435
#plotting the ecdf
plot.ecdf(pizza_delivery$time, main = "the ecdf", col = "orange", xlab = "Delivery Time in Minutes")

install.packages('dplyr')
## Installing package into '/home/rstudio-user/R/x86_64-pc-linux-gnu-library/4.0'
## (as 'lib' is unspecified)
library('dplyr')
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
mydata <- read.csv('https://raw.githubusercontent.com/guru99-edu/R-Programming/master/travel_times.csv')
glimpse(mydata)
## Rows: 205
## Columns: 14
## $ x <int> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, …
## $ Date <chr> "01-06-2012", "01-06-2012", "01-04-2012", "01-04-2012",…
## $ StartTime <chr> "16:37", "08:20", "16:17", "07:53", "18:57", "07:57", "…
## $ DayOfWeek <chr> "Friday", "Friday", "Wednesday", "Wednesday", "Tuesday"…
## $ GoingTo <chr> "Home", "GSK", "Home", "GSK", "Home", "GSK", "Home", "G…
## $ Distance <dbl> 51.29, 51.63, 51.27, 49.17, 51.15, 51.80, 51.37, 49.01,…
## $ MaxSpeed <dbl> 127.4, 130.3, 127.4, 132.3, 136.2, 135.8, 123.2, 128.3,…
## $ AvgSpeed <dbl> 78.3, 81.8, 82.0, 74.2, 83.4, 84.5, 82.9, 77.5, 80.9, 7…
## $ AvgMovingSpeed <dbl> 84.8, 88.9, 85.8, 82.9, 88.1, 88.8, 87.3, 85.9, 88.3, 7…
## $ FuelEconomy <chr> "", "", "", "", "", "", "-", "-", "8.89", "8.89", "8.89…
## $ TotalTime <dbl> 39.3, 37.9, 37.5, 39.8, 36.8, 36.8, 37.2, 37.9, 39.3, 4…
## $ MovingTime <dbl> 36.3, 34.9, 35.9, 35.6, 34.8, 35.0, 35.3, 34.3, 36.0, 3…
## $ Take407All <chr> "No", "No", "No", "No", "No", "No", "No", "No", "No", "…
## $ Comments <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "",…
dim(mydata)
## [1] 205 14
print("There are 205 observations and 14 variables")
## [1] "There are 205 observations and 14 variables"
#205 obeservation
#14 variables