Overview:

This practice set is modeled off of the 2nd lab session. You can find the original dataset here.

Part 1.

Load the required packages and read in the nyc airbnb file and assign it to ‘nyc_airbnb’. You do not need to use the sep = ’’. argument at all because the default sep will suffice. Simply use the filepath to read the csv file in.

Part 2.

  1. Select the following variables using ‘pipes’: id, name, price, minimum_nights, number_of_reviews, room_type, neighborhood_group, neighborhood. Assign this df to ‘nyc_airbnb_subset’.

2.1 Create a cross-tabulation/contingency table of neighborhood_group against accommodation type using the table function.

2.2 Filter nyc_airbnb_subset by the neighborhood_group ‘Manhattan’ using pipes again. Call this df ‘manhattan’.

3.1 Provide the mean price of an airbnb in Mahattan using the summarize function.

3.2 How many airbnbs are in Manhattan?

3.3 What is the maximum value of number_of_reviews?

3.4 What is the median number of minimum_nights spent at these airbnbs?