Highlights
In this assignment, you will get to put your newly acquired skills of data wrangling and some visualization into use, by benefiting from the tidyverse ecosystem.
Prerequisites
Packages
This assignment will use the following packages:
We use the library() function to load packages. In your R Markdown document you should see an R chunk labelled loadpackages which has the necessary code for loading both packages.
Airbnb listings in Edinburgh
Airbnb is an online marketplace where people can book shortterm stays in hotels or in other people’s houses. Recent developments in Edinburgh regarding the growth of Airbnb and its impact on the housing market means a better understanding of the Airbnb listings is needed. Using data provided by Airbnb, we can explore how Airbnb availability and prices vary by neighbourhood.
A copy of the Edinburgh Airbnb data set has been available (because of dsbox package version problem in Rstudio). To read this data, ensure that you have the following code near the beginning of your R Markdown file, from your directory having the data file (ie. data/).
You can view the dataset as a spreadsheet using the View() function. Note that you should not put this function in your R Markdown document, but instead type it directly in the Console, as it pops open a new window. When you run this in the console, you will see the following data viewer window pop up.
The edibnb data set contain 13245 listings in Edinburgh, with values about 10 different variables that includes the property neighborhood location, number of rooms and review ratings.
Edinburgh council collects the second data set from their assessments of a randomly selected sample of listings. The variables in this data set are: - id, the ID number of the listing (according to edibnb) - rating, the council’s rating of the listing of the property either being good, adequate or poor. assessment_date, the date the council performed their assessment of the property.
The data is contained in the file council_assessments.csv within the data/ directory. It can be loaded into your workflow using the following code (or any other directory name that you have instead of /data).
Exercise
1.i. In the edibnb data set, what is the ID of the listing that has the highest number of reviews with a perfect review score of 100%?
ii. Which variables have the missing observations in the edibnb data set.
iii. Visualize the missing observations using some functions from visdat or naniar packages (Notes from Week 4 might be useful)
2. Calculate the minimum, maximum and average price from the Airbnb properties in Southside for a single night stay for four people (Try to use the summarise function).
3. When looking at the data you will notice that some of the listings have a value for the number of bathrooms that is not a whole number, e.g. 1.5 or 2.5.
4. Join the edibnb to the council data frames. Create a bar plot of the neighbourhood variable for the properties that have been assessed by the council (remember to iterate the data visualization to make it as informative as possible).
This Data Science has been solved by our PhD Experts at My Uni Paper.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.