This is a report showing the distribution of the sq. footage of enclosed vs. unenclosed sidewalk cafes. The report was generated on Sat Aug 31 16:25:30 2024.
library(readr)
sidewalk <- read_csv("Sidewalk_Cafes.csv")
## Rows: 1008 Columns: 12
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (8): Entity.Type, Sidewalk.Cafe.Type, Entity.Name, Camis.Trade.Name, Add...
## dbl (4): License.Number, Lic.Area.Sq.Ft, Address.Zip.Code, Camis.Phone.Number
##
## ℹ 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.
The data was split into two data frames using the following code:
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
enclosed <- filter(sidewalk,sidewalk$Sidewalk.Cafe.Type=='Enclosed')
unenclosed <- filter(sidewalk,sidewalk$Sidewalk.Cafe.Type=='Unenclosed')
Note the filter function from dplyr package. It works on tibbles and is the same as the subset function
The data was plotted using this code:
boxplot(enclosed$Lic.Area.Sq.Ft,unenclosed$Lic.Area.Sq.Ft,names=c("Enclosed","Unenclosed"),main="NYC Sidewalk Cafe Size")