<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Anniek Hegeman on Medium]]></title>
        <description><![CDATA[Stories by Anniek Hegeman on Medium]]></description>
        <link>https://medium.com/@anniekhegeman?source=rss-32d76ddd34b5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*EA2nQQ9sgRb5LoEB</url>
            <title>Stories by Anniek Hegeman on Medium</title>
            <link>https://medium.com/@anniekhegeman?source=rss-32d76ddd34b5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 08:31:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@anniekhegeman/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Exploring Seattle AirBnb Data]]></title>
            <link>https://medium.com/@anniekhegeman/exploring-seattle-airbnb-data-5bb6c8d6a64?source=rss-32d76ddd34b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/5bb6c8d6a64</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-exploration]]></category>
            <category><![CDATA[linear-regression]]></category>
            <category><![CDATA[airbnb]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Anniek Hegeman]]></dc:creator>
            <pubDate>Thu, 13 Jan 2022 16:16:56 GMT</pubDate>
            <atom:updated>2022-01-13T16:38:10.979Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*e2SIQlSqo7TjebnhNz148A.png" /><figcaption>Airbnb Logo (source: <a href="https://www.sunflake.nl/hoe-werkt-airbnb/">here</a>)</figcaption></figure><p><em>This blogpost was done as part of the Udacity Data Scientist Nanodegree program.</em></p><p>In this blogpost we are going to explore the Seattle AirBnb dataset, which you can find <a href="https://www.kaggle.com/airbnb/seattle">here</a> on Kaggle.</p><p>First, let’s look at the context of the Seattle AirBnb Dataset, which is mentioned in the data description part.</p><h3>Context</h3><p>Since 2008, guests and hosts have used Airbnb to travel in a more unique, personalized way. As part of the Airbnb Inside initiative, this dataset describes the listing activity of homestays in Seattle, WA.</p><h3>Content</h3><p>The following Airbnb activity is included in this Seattle dataset:</p><ul><li>Listings, including full descriptions and average review score.</li><li>Reviews, including unique id for each reviewer and detailed comments.</li><li>Calendar, including listing id and the price and availability for that day.</li></ul><p>To keep it simple in this post, we will only use the <em>Listings</em> data set from the Seattle data set.</p><p>When I am going to a different country, the first thing I do is looking at AirBnb for a nice place to stay. AirBnb is founded in 2008 and is the app to book an accommodation since then. I am curious what factors influence the price.</p><p>In this blogpost we will cover 4 questions:</p><ul><li>What is the most common price people ask for their place?</li><li>What common property types do people use to sell their place on Airbnb?</li><li>What factors are important to predict the price?</li><li>How well can we predict price?</li></ul><p>To get more details of how the results are achieved, you can find it in my <a href="https://github.com/AnniekHegeman/Seattle-Airbnb-Dataset">GitHub</a>.</p><p><strong>What is the most common price people ask for their place?</strong></p><p>After preparing the data, we will first look how the price is distributed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*5tsLyjYG8kLJv40gRjx6Rw.png" /><figcaption>Histogram of the price of a place</figcaption></figure><p>We can see that the graph shows a right skewed distribution.</p><p>This means that most hosts sell their room around $150 per night and there are some outliers who sell their room between $400 and $1000 per night.</p><p><strong>What common property types do people use to sell their place on Airbnb?</strong></p><p>When you say the word ‘property’, the first thing you probably think of is a house.</p><p>But people can pass the night in very different buildings or places, you only need a roof above your head. In the diagram below you can spot townhouses, campers, treehouses and even a boat.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*f4ovm6iHpyp-U6dQ5LZsqQ.png" /><figcaption>Number of listings per type of property</figcaption></figure><p>Remarkable is that most people sell their apartment or house. But can you rent out just a room or do you need to rent out the whole apartment?</p><p>In the pie chart below, we can see that most people rent out their whole apartment or house, almost one third of the hosts rent out a private room and just 3% of the hosts make their Airbnb money from a shared room.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*pFhuCTkBCXrr47keNR0SSg.png" /></figure><p><strong>What factors are important to predict the price?</strong></p><p>Now we have seen that people have a preference to rent out a whole apartment or house, it interesting to see if these factors are also important to predict the price.</p><p>With that in mind, I created a correlation matrix to see which features have the highest linear relation with the price of a place.</p><p>In this matrix we can see numbers in squares varying from -1 to 1. This indicates that a variable with -1 has a perfect negative linear relation with the variable on the other axis, and a correlation of 1 has a perfect positive linear relation with the variable corresponding to the other axis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*_Qr5atyTMSe7i6acJ9RL_w.png" /><figcaption>Correlation matrix of the different factors</figcaption></figure><p>We are interested in the top row, the price row, to indicate which variables have a high positive or negative relation with the price of a place.</p><p>In the correlation matrix we can see that the cleaning fee, accommodates and the number of bedrooms have the highest linear correlation with the price of a room.</p><p>This means that the higher the number of accommodates, bedrooms and cleaning fee, the higher the price of a place.</p><p><strong>How well can we predict price?</strong></p><p>To get a first impression, let’s use all the factors with a higher correlation than 0.1 (or -0.1) to see which factors have the biggest influence on the prediction of the price of a room.</p><p>From these 27 variables we could see that we get a R-squared of 0.58. This means that 58% of the data fit the regression model, so 59% of the data can be predicted by this model.</p><p>Furthermore, it is interesting to find out which variables play an important role in this model.</p><p>We can figure this out by looking at the coefficients of the different variables. A higher positive or negative coefficient indicates a bigger influence on the price prediction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*YPFnQYZ0p-iL4-F4kjDUeA.png" /><figcaption>The coefficients and absolute coefficients of the different factors used in the (multi)linear model</figcaption></figure><p>We can see from the coefficients that longitude, a shared or private room, the number of bathrooms and the number of bedrooms, have a lot of influence on the prediction of the price of a room.</p><p>The easier the model the better, so let’s find out if only putting these top 5 variables in a model will create a better score.</p><p>This results in a score of 55% of the data fitting the linear model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/1*op-7jH8MsTzNpCa7MbMHaw.png" /><figcaption>The coefficients and absolute coefficients of the different factors used in the (multi)linear model</figcaption></figure><p>The result got slightly lower, but since we want a simpler model, this is a good alternative.</p><p>Let’s see if only taking the longitude parameter will change anything in the R-squared score.</p><p>This results in a score of 1.4% of the data fitting the linear model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/1*ZHqAZ0VsLXEnkrYJ1XMhZg.png" /><figcaption>The coefficient and absolute coefficient of longitude in the linear model</figcaption></figure><p>As we can see, only taking the longitude parameter as a predictor changed the R-squared rapidly in a negative way.</p><h3><strong>Summary of the analysis</strong></h3><p>After analyzing the Seattle Airbnb dataset, we can come to some conclusions:</p><p>1) Most people sell their place for $150 a night.</p><p>2) Almost all places that are rented out are apartments and houses, which most of them are rented out as whole apartments and houses.</p><p>3) We can predict the price of a room with some certainty for 55% of the data. This means that we can predict the prices of a place pretty good for most of the cases.</p><p>4) The combination of the place of a room, the type of room (shared or private), the number of bedrooms and the number of bathrooms, predict the best price of a place.</p><p>5) The higher the number of accommodates, bedrooms and the cleaning fee, the more you can ask for a place.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5bb6c8d6a64" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>