What Beijing’s Housing Market Revealed: A Data‑Driven Dive into 2014‑2015 Prices
Using a self‑built C# scraper, ETL tools, and Python's pandas, matplotlib, and seaborn, this analysis visualizes Beijing’s residential real‑estate data from 1992 to 2015, highlights price spikes, maps hot‑spot districts with Baidu maps, and quantifies the 5 % average rise between 2014 and 2015.
From the widespread pessimism about the housing market in 2014 to the price rebound in 2015, this article uses big‑data techniques and rich charts to reveal the data behind the numbers.
Data was collected with a custom C# web‑scraper.
ETL cleaning was performed with a proprietary tool.
Analysis was done in an IPython notebook using pandas .
Visualization employed matplotlib and seaborn .
Heat‑maps were generated via the Baidu Maps API, using 0.01° grid cells to compute average price and transaction volume.
Data Loading
# -*- coding:utf-8 -*-
import mongo;
import pandas as pd;
import csv;
from pandas import DataFrame, SeriesTwo datasets were scraped from Lianjia.com in October 2014 (≈64 000 records) and October 2015 (≈70 000 records). After loading the files, column names were cleaned and the year extracted.
table2014 = pd.read_table("LJ2014.txt", encoding='utf-8', engine='python', quoting=csv.QUOTE_NONE)
table2015 = pd.read_table("LJ2015.txt", encoding='utf-8', engine='python', quoting=csv.QUOTE_NONE)
# ... column cleaning and year extraction ...Crazy House Prices
From 1992 to 2002 Beijing’s housing price remained relatively stable; after 2008 it surged like a rocket.
When plotted by construction year, peaks appear around 2000 and 2004, with 7 700 units built in 2000 (11.21 % of the 60 000‑unit sample).
xcqu2014 = table2014.groupby(by='位置')
p = year.value_counts()
p = p.sort_index()[50:-1]
p.plot(title='北京各年建造房屋数量变化')Spatial Distribution
Average second‑hand prices by district (2014) show West and East districts around 55 000 ¥/m², lower than the 90 000 ¥/m² reported elsewhere because only second‑hand units are considered.
Heat‑maps on Baidu maps make price differences visually intuitive: darker colors indicate higher prices, with hotspots in Xicheng, Dongcheng, Zhongguancun, and Guomao.
What Type of House Is Most Common?
Six‑storey buildings dominate the second‑hand market because buildings under seven floors are not required to have elevators (a regulation introduced after 2000).
lc = table2014.groupby(by='楼层').size()
lc.order(ascending=False)[:20].plot(kind='barh', title='楼高比例')Analyzing floor area (40‑140 m²) shows 60 m² one‑ or two‑bedroom units are most common, followed by 90 m² three‑bedroom units.
size = table2014.groupby(by='面积').size()
# filter numeric indexes, convert to int, sort, and plot
size.order(ascending=False)[:100].sort_index().plot(kind='line', title='房型面积和对应比例')2014‑2015 Price Change
After filtering out units priced above 100 000 ¥/m² and smaller than 40 m², the average price rose from 40 125 ¥/m² in 2014 to 42 535 ¥/m² in 2015 – a 5.64 % increase (≈160 000 ¥ for a 3 million‑¥ house).
# filter data
table2014 = table2014[(table2014['价格']<100000) & (table2014['面积']>40)]
table2015 = table2015[(table2015['单价']<100000) & (table2015['面积']>40)]
# compute average prices per community and percentage change
# ... (code omitted for brevity) ...The distribution of percentage changes is roughly normal, centered around +5 %.
change[(change.percent>-30) & (change.percent<50)].groupby('percent').size().plot(title='不同涨跌幅度房子所占的数量')Top Gainers and Losers
Communities with the highest price increase (e.g., Wenhua Hutong at 33 000 ¥/m²) are concentrated near Xidan, Nanluoguxiang, and Guomao, driven largely by school‑district effects.
Conversely, price drops are mainly observed in peripheral districts such as Shunyi’s Yinghua Garden.
Conclusion
A 5 % overall increase confirms a noticeable price recovery in 2015 compared with 2014, though the surge is modest compared with the earlier “rocket” growth. While most central districts continued to rise, some suburban areas experienced declines, and price volatility remains tied to factors such as school districts and building age.
Author: Anonymous Source: http://www.cnblogs.com/buptzym/p/49929243.html
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
