前言

  • 数据集链接:https://tianchi.aliyun.com/competition/entrance/231715/information
  • 以下主要分成三个部分:
    • Part one:数据集简明介绍
    • Part two:数据预处理
    • Part three:数据可视化分析

Part one:数据集介绍

1.1 活动背景

  • 共享,通过让渡闲置资源的使用权,在有限增加边际成本的前提下,提高了资源利用效率。随着信息的透明化,越来越多的共享发生在陌生人之间。短租,共享空间的一种模式,不论是否体验过入住陌生人的家中,你都可以从短租的数据里挖掘有趣的信息。
  • 活动采用了短租房源相关的公开数据,包括了结构化的表格数据、非结构化的文本和地图数据。可在统计分析、时间序列、关系网络分析、中英文自然语言处理、数据可视化以及数据应用等多角度都可以进行探索。

1.2 数据说明

  • 数据分为汇总版和明细版两类。
  • listings 数据为短租房源基础信息,包括房源、房东、位置、类型、价格、评论数量和可租时间等等。明细版listings_detail 中包含更多房源相关细节。
  • calendar 数据为短租房源时间表信息,包括房源、时间、是否可租、租金和可租天数等等。
  • reviews 数据为短租房源的评论信息。汇总版中仅包括房源 listing_id和评论日期,用来时间序列和数据可视化分析。明细版reviews_detail 还包括评论相关的内容和作者信息。
  • neighbourhoods 数据为北京的行政区划。
  • 数据来源:本次活动数据来自 Airbnb 于 2019 年 4 月 17 日公开的北京地区数据。数据均来源于 Airbnb 网站的公开信息,不包含任何个人隐私数据。感谢相关机构做出的数据工作,更多信息可访问 http://insideairbnb.com/get-the-data.html。

1.3 分析所用数据集介绍

  • 本次分析主要使用listings_detail 数据集,其中包含106个特征,28452条数据。
  • 数据集主要包含了短租房源的基础信息,如房源、房东、地理位置、价格、评论数量等等。通过对特征进行初步筛选,丢掉部分无用信息,最终提取46个特征,主要分为一下几类:房东特征(服务、可信度、房东类型等)、房源特征(起始时间、地理位置、硬件设施、价格等等)、房客特征(住房反馈等)。

Part two:数据预处理

2.1 数据准备

# 导入必要库
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from collections import Counter
from PIL import Image
from wordcloud import WordCloud, ImageColorGenerator
import seaborn as sns
import pandas_profiling
import missingno as msno
import datetime
import re
import osdetail = pd.read_csv('listings_detail.csv')
data_save = detail.iloc[:,[0,19,22,25,26,28,32,34,35,36,39,48,49,50,51,52,53,54,55,56,57,58,60,63,64,65,66,67,68,75,80,82,83,84,85,86,87,88,89,90,91,92,96,98,105]]# 根据Calendar_details,计算未来一段时间内各房源的预订率
calendar = pd.read_csv('calendar_detail.csv')
calendar_f =  pd.DataFrame(calendar.loc[(calendar['available'] == 'f')].groupby(by=['listing_id'])['date'].count())
calendar_t = pd.DataFrame(calendar.loc[(calendar['available'] == 't')].groupby(by=['listing_id'])['date'].count())
calendar_count = pd.DataFrame(calendar.groupby(by = ['listing_id'])['date'].count())
rating = calendar_f / calendar_count
data1 = pd.merge(data_save, rating, how = 'left', left_on = 'id', right_index = True)
data1.rename(columns = {'date':'rating'}, inplace = True)
data1.to_csv('data1.csv',index = False)
print("variables:", data1.columns.values)

2.2 数据预处理

2.2.1 缺失情况展示

  • 白色部分代表缺失值
  • 数据缺失情况较为严重的是与住客反馈相关的“review”类特征,以及“security_deposit”和“cleaning_fee”两个特征。

2.2.2 数据处理

# 1. 变量:'security_deposit'&'cleaning_fee'填补缺失值,货币符号转换
data1 = pd.read_csv("data1.csv")
data1.loc[:5, ['security_deposit', 'cleaning_fee']]
## 缺失值补零
data1['security_deposit'] = data1['security_deposit'].fillna(0)
data1['cleaning_fee'] = data1['cleaning_fee'].fillna(0)
##货币符号转换
for index, row in data1.iterrows():a = getattr(row, 'security_deposit')b = getattr(row, 'cleaning_fee')if type(a) == str:a = float(re.sub('[$,]', '', a))data1.loc[index, 'security_deposit'] = aif type(b) == str:b = float(re.sub('[$,]', '', b))data1.loc[index, 'cleaning_fee'] = b# 2. 变量'neighbourhood_cleansed'的字符转换
data2 = data1.copy()
data2.loc[:5, 'neighbourhood_cleansed']
rep = {'朝阳区 / Chaoyang':'Chaoyang', '东城区':'Dongcheng', '海淀区':'Haidian',   '丰台区 / Fengtai':'Fengtai', '西城区':'Xicheng', '通州区 / Tongzhou':'Tongzhou','昌平区':'Changping', '密云县 / Miyun':'Miyun', '顺义区 / Shunyi':'Shunyi','怀柔区 / Huairou':'Huairou', '大兴区 / Daxing':'Daxing', '延庆县 / Yanqing':'Yanqing','房山区':'Fangshan', '石景山区':'Shijing', '门头沟区 / Mentougou':'Mentougou', '平谷区 / Pinggu':'Pinggu'}rep = dict((re.escape(k), v) for k, v in rep.items())
pattern = re.compile("|".join(rep.keys()))
for index, row in data2.iterrows():a = getattr(row, 'neighbourhood_cleansed')my_str = pattern.sub(lambda m: rep[re.escape(m.group(0))], a)data2.loc[index, 'neighbourhood_cleansed'] = my_str
data2.loc[:5, 'neighbourhood_cleansed']# 3. 变量'host_since'转化成到数据收集日(2019 年 4 月 17 日)的天数
data3 = data2.copy()
now = '2019-04-17'
data3.iloc[:, 2] = data3.iloc[:, 2].apply(lambda x: int((datetime.datetime.strptime(now, '%Y-%m-%d')                                                        - datetime.datetime.strptime(x, '%Y-%m-%d')).days))# 4. 变量'host_response_time'&'host_response_rate'的缺失处理
# 'host_response_time'缺失则划分为新类“no body cares”
# 'host_response_rate'字符百分数转换成浮点数
# 'host_response_rate'缺失则取平均data4 = data3.copy()
data4.loc[:5, ['host_response_time', 'host_response_rate']]
#'host_response_time'处理
data4.iloc[:, 3] = data4['host_response_time'].replace(np.nan, 'no body cares')
# 'host_response_rate'处理
data4.iloc[:, 4] = data4.iloc[:, 4].apply(lambda x: float(x.strip('%')) if type(x) == str else x)
data4.iloc[:, 4] = data4.iloc[:, 4].fillna(data4['host_response_rate'].mean())
data4.iloc[:, 4] = data4.iloc[:, 4].apply(lambda x: "%.3f"% (x / 100))# 5. 变量'bathrooms'&'bedrooms'&'beds'的缺失均补0
data5 = data4.copy()
data5['bathrooms'] = data5['bathrooms'].fillna(0)
data5['bedrooms'] = data5['bedrooms'].fillna(0)
data5['beds'] = data5['bedrooms'].fillna(0)# 6. 变量'amenities'统计元素个数并绘制词云图
data6 = data5.copy()
data6['amenities'] = data6['amenities'].apply(lambda x: x.count(',') + 1)
data6.to_csv('data6.csv', index = False)## 绘制词云图
a = data5['amenities'].apply(lambda x: pd.DataFrame(x.split(',')))
count = {}
for i in a:d = pd.DataFrame(i)word = d[0].apply(lambda x: re.sub('[{"}"]', '', x))for j in word:if j in count.keys():count[j] = count[j] + 1else:count[j] = 1count.pop('')  #删除空关键字
count['toilet'] = count.pop(' toilet')def wc_from_word_count(word_count, fp):bg = np.array(Image.open("./pictures/tree.jpg"))wc = WordCloud(max_words = 100,  # 最多显示词数background_color = "white",  # 设置背景为白色,默认为黑色width = 3000,  # 设置图片的宽度height = 2000,  # 设置图片的高度margin = 10,  # 设置图片的边缘mask = bg,contour_width = 3,contour_color='green')image_colors = ImageColorGenerator(bg)wc.generate_from_frequencies(word_count) # 从字典生成词云ax = fig.add_subplot(1,1,1)ax.imshow(wc, interpolation='bilinear')  # 显示词云ax.axis('off')  # 关闭坐标轴wc.to_file(fp)  # 保存图片
#调用词云函数
fig = plt.figure(figsize = (10, 10))
wc_from_word_count(count, './pictures/1.jpg')

# 7. 变量'price'&'extra people'货币符号转换
data7 = data6.copy()
data7['price'] = data7['price'].apply(lambda x: re.sub('[$,]', '', x))
data7['extra_people'] = data7['extra_people'].apply(lambda x: re.sub('[$,]', '', x))# 8. 用calendar_detail计算入住率,并将入住率合并到数据集中
calendar = pd.read_csv('calendar_detail.csv')
occup = calendar.available.loc[(calendar['available'] == 'f')].count()   #available字段为非可用,表示这天得房子已经出租出去。
alldays = calendar.available.count() #总数
occuprate = round(occup / alldays * 100, 2)  #使用数比总数,求出总得使用率
print('总使用率为:{0}%,总数为:{1},使用总天数为:{2}'.format(occuprate, alldays, occup))
calendar_f =  pd.DataFrame(calendar.loc[(calendar['available'] == 'f')].groupby(by = ['listing_id'])['date'].count())
calendar_t = pd.DataFrame(calendar.loc[(calendar['available'] == 't')].groupby(by = ['listing_id'])['date'].count())
calendar_count = pd.DataFrame(calendar.groupby(by = ['listing_id'])['date'].count())
rating = round(calendar_f / calendar_count, 3)
rating['date'] = rating['date'].fillna(0)
data8 = pd.merge(data7, rating, how = 'left', left_on = 'id', right_index = True)
data8.rename(columns = {'date':'rating'}, inplace = True)# 9. 对最后几个变量进行缺失值处理
# 删除变量'first_review'和'last_review'
# 评分按级别划分:若未缺失,则满分为1,非满分为-1,缺失为0data9 = data8.copy()
data9.drop(['first_review','last_review'], 1 , inplace = True)
# review_scores_rating
data9['review_scores_rating'] = data9['review_scores_rating'].apply(lambda x:-1 if x <100 else x)
data9['review_scores_rating'] = data9['review_scores_rating'].apply(lambda x:1 if x == 100 else x)
data9['review_scores_rating'] = data9['review_scores_rating'].fillna(0)
score = ['review_scores_accuracy', 'review_scores_cleanliness', 'review_scores_checkin','review_scores_communication', 'review_scores_location', 'review_scores_value']
for i in score:data9[i] = data9[i].apply(lambda x:-1 if x < 10 else x)data9[i] = data9[i].apply(lambda x:1 if x == 10 else x)data9[i] = data9[i].fillna(0)
data9['reviews_per_month'] = data9['reviews_per_month'].fillna(0)

Part three:数据可视化

3.1 重要特征分布

# host_since(房东注册时长)
sns.set(context = 'paper', style = "whitegrid")
data9 = pd.read_csv('data9.csv')
sns.distplot(data9.host_since)

  • 目前北京的短租房源多数是近三年注册的,符合17年Airbnb大举进入中国的发展背景。近几年来,中国的短租市场蒸蒸日上,在消费升级的背景下,共享民宿,短租住宿成为新的消费增长点。
# property_type(房源类型)
fig = plt.figure(figsize = (12,6))
ax = fig.add_subplot(1,1,1)
ax = sns.countplot(y='property_type', palette = "Set3", data = data9)
ax.tick_params(labelsize = 9)

  • 北京短租房源市场中,Apartment(公寓型房源)“一枝独秀”,而House(家庭式住宅)和Condominium(分契式公寓)类型的房源在整个市场中也占据较大比重。
# room_type(房间类型)
fig = plt.figure(figsize = (12,6))
ax1 = fig.add_subplot(1,2,1)
ax1 = sns.countplot(x = 'room_type', data = data9, facecolor=(0, 0, 0, 0),linewidth = 5, edgecolor = sns.color_palette("dark", 3))
# minimum_nights(最少入住天数)
data9['minimum_nights'].unique()
bins = [0,1,7,2000]
df = pd.cut(data9['minimum_nights'], bins)
ax2 = fig.add_subplot(1,2,2)
ax2 = sns.countplot(x = df, facecolor=(0, 0, 0, 0), linewidth = 5,edgecolor = sns.color_palette("dark", 3))

  • 目前,北京短租房市场中,主要存在以下三种房间出租类型:整套出租,整间出租以及共享房间。其中,整套出租占比最高,整间出租次之,共享房间的形式也占据一定比重。
  • 在Airbnb平台上,房主可对房客设置最低入住时长。从上图来看,绝大多数房源入住时间为1天起步,只有少数房东较为“苛刻”,或者是由于房源类型的特殊性,要求房客最低入住七天以上。
# 房东回复时长在superhost与commonhost内的频率
tab1 = pd.crosstab(data9['host_is_superhost'], data9['host_response_time'])
tab1_std = tab1.div(tab1.sum(1), axis = 0)plt.figure(figsize = (15,7))
tab1_std.plot.bar()
plt.tight_layout()
plt.xticks(rotation = 0)
plt.legend(loc = 'upper left')
plt.show()

  • Airbnb平台于2009年启动了Superhost(明星房东)计划,旨在表彰早期为Airbnb社区的出租行为树立了高标准的优秀房东。而成为明星房东需要满足以下条件:对房客的回复率至少达到90%;没有取消预订的订单;至少80%评价为满分评价;至少完成10次订单。

  • 除了上述硬性条件之外,上图显示了房东回复时间在明星房东和普通房东群体中的分布情况。值得一提的是,无论房东是什么类型,能够在1小时内回复消息的房东群体均占比最高。其次,明星房东中1小时内回复的比例高于普通房东。另外,普通房东中“无人问津”的比例明显高于明星房东,这表明被冠以“Superhost”的房东,凭借良好的工作态度,的确能够获取房客更多的关注度和青睐。

3.2 地区发展概况分析

3.2.1 房东注册时长与北京各区的关系

data9 = pd.read_csv('data9.csv')
my_order = data9.groupby(by = ["neighbourhood_cleansed"])["host_since"].median().sort_values().index #按照中位数排序
counts = data9['neighbourhood_cleansed'].value_counts()
sns.set(context = 'paper', style = "whitegrid")
fig = plt.figure(figsize = (14, 7))
ax1 = fig.add_subplot(1,2,1)
ax1 = sns.boxenplot(x = 'host_since', y = 'neighbourhood_cleansed', data = data9, palette = "vlag", orient = 'h',linewidth = 0.3, width = 0.7, order = my_order)
ax1.grid(True)
ax2 = fig.add_subplot(1,2,2)
ax2 = sns.barplot(x = counts.values, y = counts.index,palette = "vlag", orient = 'h', order = my_order)
ax2.set_xlabel('the number of listings')
ax2.grid(True)
sns.despine(trim = False, right = True)

  • 海淀区、东城区和朝阳区内的短租房源起步时间较早,并且数量明显高于其他区域。而在较为偏僻的门头沟区、房山区和密云区内,多数房源均为近一两年注册,并且数量较少。造成明显差异的主要原因是,东城区是全市历史文化遗存和胡同四合院最为密集的地区,游客密集并且位于市中心地带,需求拉动了市场发展。而海淀区内旅游景点也较为密集,“集天下胜景于一地,汇古建绝艺于京华”。位于北京中心城区的朝阳区,则是商务中心、科技文化体育交流中心,各地往来人员数量多。

  • 短租房源市场发展较晚且数量较少的昌平、通州、顺义、大兴属于北京的近郊,以经济开发区为主,市场需求不高。

# 讨论为什么朝阳区短租房源数量这么高
data_1 = data9.copy()
data_1.property_type = data_1.property_type.apply(lambda x:'Apartment' if x == 'Apartment' else 'other')
plt.style.use('ggplot')area_type = pd.crosstab(data_1['neighbourhood_cleansed'], data_1['property_type'])
area_type_std = area_type.div(area_type.sum(1), axis = 0)plt.figure(figsize = (15,7))
area_type_std.plot.bar()
plt.tight_layout()
plt.xticks(rotation = 45)
plt.legend(loc = 'best')
plt.show()

  • 朝阳区的房源数量明显比同为中心城区的其它区域,如西城区、东城区等高出不少。结合房源类型的数量分布,我们已知Apartment(公寓型房源)在北京短租房源市场“一枝独秀”。上图刻画了Apartment类型的房源在各区的占比情况,由此可以发现,朝阳区的公寓型房源占比最高,说明该区域充分利用了居民区的闲置资源,这是它房源数量显著高于其他区域的主要原因。

3.2.2 探索房间类型与地理位置的关系

plt.style.use('ggplot')area_room = pd.crosstab(data_1['neighbourhood_cleansed'], data_1['room_type'])
area_room_std = area_room.div(area_room.sum(1), axis = 0)
fig = plt.figure(figsize = (10, 7))
area_room_std.plot.bar()
plt.xticks(rotation = 45)
plt.ylim(ymin = 0, ymax = 0.9)
plt.legend(loc = 'best', fontsize = 8)
plt.show()

  • 房间类型的分布在不同地区间也有明显差异,如上图所示,大兴、东城、房山、丰台、门头沟、石景山、顺义、通州的整套出租房源比较显著较高,而海淀、怀柔、密云、延庆等区整套出租与整间出租的比邻基本“旗鼓相当”。

3.2.3 Superhost型房东、价格以及评论数的区域分布情况

sns.set(context = 'paper', style = "whitegrid")tab2 = pd.crosstab(data_1['neighbourhood_cleansed'], data_1['host_is_superhost'])
tab2_std = tab2.div(tab2.sum(1), axis = 0)
orders = tab2_std.iloc[:,-1].sort_values().indexfig = plt.figure(figsize = (18, 8))
ax1 = fig.add_subplot(1,3,1)
ax1 = sns.barplot(x = tab2_std.iloc[:,-1], y = tab2_std.index, palette = "vlag", order = orders)order2 = data_1.groupby(by = ["neighbourhood_cleansed"])["price"].median().sort_values().index #按照中位数排序
ax2 = fig.add_subplot(1,3,2)
ax2 = sns.boxenplot(x = 'price', y = 'neighbourhood_cleansed', data = data_1, palette = "vlag", orient = 'h',linewidth = 0.3, width = 0.7, order = order2)
ax2.axis([0, 8000, -0.5, 15.5])ax3 = fig.add_subplot(1,3,3)
ax3 = sns.barplot(x = data_1.number_of_reviews_ltm, y = data_1.neighbourhood_cleansed, palette = "vlag")

  • 东城区、西城区、石景山区、朝阳区和海淀区的明星房东占比较高,一定程度上体现出这几个区的整体房东素质高于其余各区。
  • 从价格分布来看,由于别墅、精品酒店等高价房源数量占比较高,因此怀柔、延庆、平谷等区的价格水平更高。
  • 从过去12个月的评论数来看,发展更为成熟的中心城区,如朝阳区、西城区、东城区、海淀区等评论数量更多一些。地理位置相对偏僻,房源数量较少的地区,如怀柔区、延庆区、门头沟区等,住客评论量较少。

3.3 房东与房源大体情况分析

3.3.1 房东等级与房东注册时长的关系

superhost = data_1.query("host_is_superhost == 't'")
commonhost = data_1.query("host_is_superhost == 'f'")fig = plt.figure(figsize = (12,6))
ax1 = fig.add_subplot(1,2,1)
sns.boxplot(y = data_1.host_since, x = data_1.host_is_superhost, palette = "vlag", orient = 'v',linewidth = 0.4, width = 0.3, notch = True)ax2 = fig.add_subplot(1,2,2)
ax2 = sns.distplot(superhost.host_since, rug = True, hist = True, label = 'superhost')
ax2 = sns.distplot(commonhost.host_since, rug = True, hist = True, label = 'commonhost')
ax2.legend(loc = 'best')

  • 发现无论是从箱线图中还是从密度图中看,superhost的注册时间都更长,相比commonhost有更多的经营经验

3.3.2 房型的发展概况

entire = data_1.query("room_type == 'Entire home/apt'")
private = data_1.query("room_type == 'Private room'")
shared = data_1.query("room_type == 'Shared room'")fig = plt.figure(figsize = (12,8))ax = fig.add_subplot(1,1,1)
ax = sns.distplot(entire.host_since, rug = True, hist = True, label = 'entire')
ax = sns.distplot(private.host_since, rug = True, hist = True, label = 'private')
ax = sns.distplot(shared.host_since, rug = True, hist = True, label = 'shared')
ax.legend(loc = 'best', fontsize = 12)

  • 从整体上来看,entire房间类型注册时间较短,日期较新

3.3.3 “明星房东”与房型、注册市场的关系

sns.set(context = 'paper', style = "whitegrid")
fig = plt.figure(figsize = (8,6))
ax1 = fig.add_subplot(1,1,1)
ax1 = sns.violinplot(x = "room_type", y = "host_since", hue = 'host_is_superhost',data = data_1, palette = "Set2", split = True, scale = "count", inner = "quartile")
ax1.legend(loc = 'best', fontsize = 12)

  • 首先,在三种房型中,“明星房东”的注册时长均更久一些
  • 其次,Private room的注册时长相较于其他两种房型,较长一些

3.4 探究热度高的房源特征

  • 以过去12个月的评论数作为评价热度的指标

3.4.1 高热度房源地区分布情况

# 取热度前1%的房源
data9 = pd.read_csv('data9.csv')
a = data9.sort_index(by = 'number_of_reviews_ltm', ascending = False)
max10 = a.iloc[:data9.shape[0] // 100,:]# 查看房源分布
count1 = pd.DataFrame(max10['neighbourhood_cleansed'].value_counts())
count1.index.name = 'area'
count2 = pd.DataFrame(data9.neighbourhood_cleansed.value_counts())
count2.index.name = 'area'bili = pd.merge(count1, count2, on = 'area')
bili['rate'] = bili.neighbourhood_cleansed_x / bili.neighbourhood_cleansed_y# 饼图:展示前1%热度房源在各区比例;柱状图:展示各地区中热度前1%房源比例
fig, ax = plt.subplots(1, 2, figsize = (24,10))plt.style.use('ggplot')
ax[0] = bili.neighbourhood_cleansed_x.plot.pie(ax = ax[0], shadow = True, labeldistance = 1.2,autopct = "%2.1f%%")
ax[0].legend()sns.set(context = 'paper', style = "whitegrid")
ax[1] = bili.rate.plot.bar(ax = ax[1],facecolor=(0, 0, 0, 0), linewidth = 5, edgecolor = sns.color_palette("dark", 3))

  • 左图为高热度房源的区域分布情况,与各区房源总数基本一致,朝阳区、东城区中高热度房源数量较多,昌平、石景山等区则只有少量的高热度房源。

  • 右图为,各区高热度房源所占比例,从图中可以看出,尽管朝阳区高热度房源数量最多,但占比并不具有明显优势,反而是东城区和西城区,尽管数量少,但占比均高于朝阳区。这表明,整体来看,东城区与西城区的房源热度水平更高一些。

3.4.2 高热度房源价格跨度

sns.set(context = 'paper', style = "whitegrid")
fig = plt.figure(figsize = (6,6))
ax1 = fig.add_subplot(1,1,1)
ax1 = sns.distplot(max10.price, rug = True, hist = True, color = 'g')
plt.axvline(x = 329 ,ls = "--", c = "black")
plt.axvline(x = 201 ,ls = "--", c = "black")
plt.axvline(x = 470 ,ls = "--", c = "black")
plt.text(50,0.0015,'201',color = 'r')
plt.text(250,0.0015,'329',color = 'r')
plt.text(500,0.0015,'470',color = 'r')max10.price.describe()

  • 整体来看,尽管高热度房源价格跨度比较大,最低价格为74,最高为2221,但在价格分布上低于平均水平。侧面说明了,高热度的房源价格更加“亲民”,并且对房东来说,适当降低价格不失为一个提高房源热度的有效措施。

3.4.3 高热度房源的房东性质与房间类型分布

  • 不止一套的认为是专业的运营团队
  • 79.6%都是专业的运营团队
print(max10.room_type.value_counts())
print(data9.room_type.value_counts())fig, ax = plt.subplots(1,2,figsize=(12,5))
plt.style.use('ggplot')
explode =[0,0,0.2]
colors = ['pink','skyblue','orange']
ax[0] = max10.room_type.value_counts().plot.pie(ax = ax[0], shadow = True, labeldistance = 1.2,autopct = "%2.1f%%", explode = explode, colors = colors)
ax[0].legend(loc = 'best')
ax[0].set_title('max 1%')ax[1] = data9.room_type.value_counts().plot.pie(ax = ax[1], shadow = True, labeldistance = 1.2,autopct = "%2.1f%%", explode = explode, colors = colors)
ax[1].legend(loc = 'best')
ax[1].set_title('All')

  • 在高热度房源中,本文认为拥有超过1套房源的房东均为专业的运营团队。根据计算结果,在284个高热度房源中,约79.6%是由专业的运营团队来打理。这表明,可能由于推广和运营相关的环节较弱,个人运营的房源,相对来说入住率会比专业团队差一些。

  • 在高热度房源中,单人房间、多人房间比例略高一些,说明这两类房型更受欢迎一些,这也在房源类型方面给房东提供了一定的参考。不过总体而言,类型的分布基本与所有房源的分布相近。

Airbnb短租房源数据可视化相关推荐

  1. 阿里天池:Airbnb短租房数据集分析

    阿里天池:Airbnb短租数据集分析 1.项目介绍 2.字段介绍 3.分析目的和思路 4.模块导入与数据读取 5.探索性分析 (一)整体分析 (二)按区域划分 (三)按房型划分 1.项目介绍 数据来源 ...

  2. Airbnb短租数据分析报告

    一. 数据集背景 数据来源:https://pic1.zhimg.com/v2f1972ca63e72ba85398ec32fd712fb72_1440w.jpg?source=172ae18b 共享 ...

  3. Python爬虫实战 [成都短租房项目]

    Python爬虫实战[成都短租房项目] 一.项目需求 二.需求分析 三.爬虫部分 3.1 获取原始报文 3.2 数据清洗(re+string方法) 3.3 数据清洗(BeautifulSoup方法) ...

  4. FocusBI:租房分析可视化(PowerBI网址体验)

    微信公众号:FocusBI 关注可了解更多的商业智能.数据仓库.数据库开发.爬虫知识及沪深股市数据推送.问题或建议,请关注公众号发送消息留言; 如果你觉得FocusBI对你有帮助,欢迎转发朋友圈或在文 ...

  5. 深圳租房数据可视化分析【Plotly库绘图】

    深圳租房数据可视化分析[plotly库绘图] 一.技术介绍 1.可视化技术支持来源: 2.选择plotly理由: 二.代码实现及分析: 1.导入库及解读数据集: 2.数据清洗与转换 3.统计数据 4. ...

  6. 网络爬虫:爬取某地区短租房信息

    1.爬虫思路分析 (1)原来的北京短租房的地址规则如下: http://bj.xiaozhu.com/ http://bj.xiaozhu.com/search-duanzufang-p2-0/ ht ...

  7. Python爬取北京地区短租房信息

    本文利用Requests和BeautifulSoup第三方库,爬取小猪短租网北京地区短租房的信息.代码参考<从零开始学Python网络爬虫>. 完整代码如下: from bs4 impor ...

  8. 爬取小猪网的短租房信息

    爬取小猪网的短租房信息的实现 #小猪网爬虫2.0 #功能:实现爬取多页面,并将图片和CSV文件存入桌面文件夹 from PIL import Image import requests from bs ...

  9. 大数据毕设选题 - 大数据招聘租房数据分析可视化系统(python)

    文章目录 0 前言 1 课题项目介绍 2 相关技术介绍 2.1 爬虫 2.2 Ajax技术 3 Echarts 4 数据获取 4.1 总体流程如下 4.2 获取招聘数据 4.3 获取租房房源信息 5 ...

  10. Python疫起学习·万丈高楼平地起Day09(精简版|浓缩就是精华)爬虫知识附上案例爬取北京地区短租房信息、爬取酷狗TOP500的数据以及爬取网易云音乐热歌榜单

    爬虫知识 Requests库 部分运行结果如下: 有时爬虫需要加入请求头来伪装成浏览器,以便更好地抓取数据.在Chrome浏览器中按F12键打开Chrome开发者工具,刷新网页后找到User-Agen ...

最新文章

  1. 阿里云实时计算的前世“功”今生“能”
  2. opencv查找表值直方图均衡化
  3. php oracle 源码_PHP3中使用ORACLE函数的使用说明
  4. 优贝共享数据交易所网_2020.10.4号币圈简报:优贝兼职视界卖单积压,耀健康上涨...
  5. 此上下文中不允许函数定义。_DAX函数---ALL家族
  6. mysql通用mapper_SpringBoot集成tk.mapper通用mapper,针对特殊业务也可写xml文件sql
  7. oracle导出dmp的时候使用owner
  8. android google snake
  9. SpringMVC工作原理的介绍
  10. html5证书,免费获得微软MCSD证书赶快行动吧!_html5教程技巧
  11. mysql安装_win版
  12. 操作系统OS lab4 (xv6) 实验报告
  13. 【竞赛篇-国创(大创)申报立项】国家级大学生创新创业训练计划申报经验
  14. 安卓硬件模拟大师_安卓虚拟大师 可以手机运行免root带xp框架模拟器
  15. 第二人生的源码分析(二十)显示人物名称
  16. 代理模式(委托模式)— 结构型
  17. 【生活小捣鼓】登录PC端某网站,需要他人(不在身边)手机扫二维码,这时候该怎么办?
  18. h5py基本使用教程
  19. 红米AX6S路由器刷OpenWrt固件,实现软路由功能,科学-上网-网速度起飞
  20. 「云计算」全球最大的5家云计算公司

热门文章

  1. 征集国内操作系统项目列表 zz
  2. iOS系统安全学习小结(一)
  3. 姚舜:成年人的崩溃,“我只是想哭一下”
  4. Chaos Mesh® 的 Chaos Engineering as a Service 探索之路
  5. H3C ipsec psk aggressive mode配置
  6. base64编码和解码算法
  7. 微信服务号认证收费 :一场激进的自卫战
  8. live streaming领域基础知识与论文总结
  9. PS——字体斜阴影效果
  10. git用户名和密码保存文件_GitHub 本地保存用户名和密码方法