Code Monkey home page Code Monkey logo

airbnb_pricing's Introduction

Boston and Seattle Airbnb Data Analysis

Introduction

This analysis focuses on Airbnb listing price in Boston and Seattle and tries to answer questions below:

  1. Is there any trend in Airbnb listing price? How does price compare between Boston and Seattle?
  2. Should you become a superhost?
  3. What factors affect the Airbnb listing price?

Please check my blog post for more details.

The link to the detailed codes: Airbnb.ipynb

Installation

The code was developed using the Anaconda distribution of Python, versions 3.8.1. Python libraries used are numpy, pandas, datetime, matplotlib, seaborn, sklearn, random, re.

Analysis

The Seattle and Boston Airbnb datasets are from Kaggle. The Seattle dataset has 3818 records and the Boston dataset has 3585 records. The feat_info.csv file has necessary actions for each independent variable during the data preparation step.

  • Preprocessing
  • Drop features that have high correlations with other features.
  • Drop records that have ridiculously high listing price.
  • Drop rows with more than 30% missing values.
  • Impute nulls with mean for numeric features and mode for integer/fixed values.
  • OneHotEncoder categorical features.
  • Scale features with StandardScaler.
  • Split the data into train and test
  • Use LassoCV to perform feature selection and to find best model (alpha) automatically

Results

1. Trend


Within the same period (Sep 6, 2016 to Jan 2, 2017), daily average listing price is higher in Boston ($191) than in Seattle ($136).


Daily average listing price in both Seattle and Boston shows a strong seasonal pattern:

  • relatively low at the beginning of the year
  • gradually increases as the season enters summer
  • highest in summer for Seattle
  • highest in fall for Boston


Daily average listing price in both Seattle and Boston shows a strong weekday pattern:

  • slightly high on Friday and Saturday, close to $6~$7 more than the average.

2. Superhosts

Compared to regular hosts, superhosts in both cities tend to:

  • have on average 1 more review per month.
  • charge extra_people.
  • offer more services/amenities.
  • are more pet friendly.
  • Pets live on this property.
  • require guest_profile_picture.

3. Important factors

For both cities, top factors are:

  • neighbourhood or location
  • capacity, such as bedrooms, bathrooms, beds, accomodates, guest_included
  • host_is_superhost, calendar_updated
  • amenity โ€” Doorman etc.

Licensing, Authors, Acknowledgements

Please find the Licensing for the dataset at Kaggle Boston data and Seattle data. Other than that, feel free to play with the code here.

airbnb_pricing's People

Contributors

ustcdj avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.