/data-analysis-NSW-rentals

A quick analysis of the rental market in NSW australia

Primary LanguageJupyter Notebook

data analysis of NSW rentals

A quick analysis of the rental market in NSW

This shows how to:

  • Scrape data with httpx+beautifulsoup
  • Check the data
  • Prepare the data for analysis with pandas
  • Do some basic analysis with pandas
    • How is distributed the number of bedrooms (e.g., more towards 1 or 2 bedrooms ?)
    • The bedrooms' rentals per year
    • How the price is evolving over time
    • How the price is evolving over time for each number of bedrooms
    • The percent of change per year and month

You can explore the dataset at this url: NSW rentals datasette

Setup

Virtual environment (Optional)

python3 -m venv venv
source venv/bin/activate

Install dependencies

pip install -r requirements.txt

Content

  • rent_analysis.ipynb - Jupyter notebook with the analysis
  • duckdb_analysis.ipynb - An exemple of how to use duckdb to query the dataset and do some analysis (with bonus GEO queries)
  • script/ - Contains the scripts to scrape the data and prepare the dataset
  • Makefile: Allow running the scripts to scrape the data and prepare the dataset

how tu run?

jupyter notebook

Then click on the file rental_analysis.ipynb

Data references