Airbnb Data Analysis
Where do you go when you want to book a room in a hotel? You go to travel agency websites and hotel pages, or you might be an old-fashioned guy who prefers to call hotels! Have you ever considered having a new experience in your travel by renting people property and saving a lot of money? Yes, it is Airbnb; that’s where my following words will go. For those of you who haven’t yet had a great stay experience while traveling, here’s a quick introduction.
Airbnb started in 2007 when two hosts welcomed three guests to their San Francisco home. Since then, Airbnb has grown to over 4 million hosts and he has 1.4 billion guests from nearly every country in the world. Each day, hosts offer unique stays and experiences that allow guests to connect with their community in a more authentic way.
You might have already started your business in tourism or you are an entrepreneur and want to see potential in this market. In this blog post, I will try to answer some questions for you by comparing Airbnb data from Seattle and Boston with skills I have learned in the Udacity data scientist nanodegree program.
Business Requirements
- Are there rental price differences between Seattle and Boston?
- Is there a seasonal peak in the bookings?
- Which city has higher rental demand?
- What are the top property types by average price?
- What are the most important predictors for the price of a rental?
- What is the customer opinion about the service?
Data wrangling and EDA
It is a prerequisite for successful data analysis. The data is gathered, collected, and transformed into a new format for better understanding, access, and analysis. Then, EDA comes to do initial investigations on data to discover patterns and main characteristics of data. I collect two files for both cities: listings and calendar files.
They are merged into one file for better analysis.
In the Boston data, there are 73 columns and 3973 rows in the listings datasets and 7 columns and 1450145 rows in the calendar file. Whereas in Seattle, there are 75 columns and 6636 rows in the listings file and 7 columns and 2421778 rows in the calendar datasets.
Q1. Are there rental price differences between Seattle and Boston?
From the plot and table above, we conclude that there is no significant difference in the average price. The spread out of the cost for Boston is slightly larger than for Seattle. However, some rental prices in Seattle are higher than in Boston but those are outliers.
Get Calbluwi’s stories in your inbox
Join Medium for free to get updates from this writer.
To clarify the plot, we can infer from the table that most prices are less than $1000. I filter the data according to it and plot two figures: violin and boxplot
The violin plot shows that the price distribution around the mean is much larger for Seattle and reflects the small deviation number shown in the table above, 210, compared to Boston’s standard deviation.
From the above graph, we can infer that the visitor hit Boston most days in April, day 100. The plot shows that Boston’s average price is generally higher in the first half of the year than in the second one. The average price in Seattle is lower except around day 220, where it beats Boston’s price. In general, the average price in Seattle is lower.
Q2. Is there a seasonal peak in the bookings?
From the plot above, the seasonal peak for both cities is in July then the number of bookings goes sharply in the following month. It keeps going down until December. Also, the total number of bookings in Seattle is double that in Boston!
All weekdays look like they have the same number of reservations. The difference is slightly slight.
Q3. Which city has higher rental demand?
The Average Booking Days for a rental property in Boston during a year is more than in Seattle, showing more booking businesses in Boston.
The average acceptance rate in Seattle is a little bit higher, showing that it is not the factor for losing against Boston over rental demand.
Q4. What are the top property types by average price?
The figure shows the top 10 property types by average price. Boston’s top 2 property types are Room in a hotel and Room in a boutique. Whereas in Seattle, the top 2 are Entire villas and Entire vacation homes. You might wonder what the percentage of the city’s top property types in whole reservations is. The answers are in the following two figures.
If you prefer a table instead of the pic charts, the top 10 property_type by booked:
Are they still in the same order when we go to the peak month, July? I chose only the top 3 and compared them between July and the whole dataset. Look at the table below:
In Boston, the third row in the two lists is different. Entire condo comes as the third one in July, but in the whole dataset, a private room at home comes as the third in the top list. In Seattle, the difference is in the second row. Entire home comes as the second in July, and Entire retinal unit takes the second in the dataset.
Q5. What are the most important predictors for the price of a rental?
Among several sets of methods to answer this question, I chose the SelectKBest method to select the features according to the k highest score.
From the above two graphs, we can infer that accommodates, bedrooms, and beds are the most important features for listing in both cities. Though the rest of the features are not in the same order for Boston and Seattle, the top 3 are the prominent ones with high scores.
Q6. What is the customer opinion about the service?
There are 174512 and 425070 rows for Boston and Seattle. As we need a quick view of customer feedback, we found it is better to pick 3000 reviews randomly from datasets before we apply a sentimental analysis tool. The RNN models with unsupervised learning to detect sentiments for all reviews is time-consuming. 3000 for getting an initial big picture is enough. The average sentiment result for Boston and Seattle is in the below figure.
Looks like most of the customers are satisfied with service in both cities.
Conclusion
In this post, we explored Airbnb’s datasets of Boston, and Seattle to help those that are interested in the travel industry.
The average price in Seattle is lower than in Boston, although the demand is doubled! That is likely because of the cost of living but the higher bookings, I guess, as a result of the warm weather that Seattle is known for.
The seasonal peak is in July for both cities, and the private room showing in the second and the third row of Boston’s top 10, indicating that it is popular there and reflecting the cost of living and the type of visitors, which I guess are most students.
There is room left for much analysis, and I linked the relevant GitHub repository link to allow the reader to analyze further and explore. Have fun exploring.
The initial big picture of customer feedback is positive for both cities.
Interested or seeking to analyze and explore further? Here is Github.
Thanks for your reading.





