我用Python爬了北京的房租和工资数据,北京的房租到底有多高?

此前已经很久没有写Python爬虫和分析的文章了,我觉得很惭愧。一直都说自己很忙,确实很忙。不过最近周末算是能空下来了。所以可以开始写这种分析的文章了。

在这个数据时代,大家越来越看中数据,能用数据说的尽量别逼逼,能客观的看的问题尽量不要主观去解答。奔着这个原因那个喜欢用数据讲故事的路人甲又回来了。

写这篇文章的起因是这段时间北京的房租涨了,涨幅是20-30%,我前几天就这件事情发过一篇文章:被房租拖垮的年轻人。有不少人提出一些疑问:北京的房租真的那么贵吗?感觉都是被一些媒体炒作的。

今天我想解答的其实就是这个问题:北京工作的青年每个月的房租占到月薪的多大比例?北京的房租贵是否夸大?

数据采集来源:拉勾网以及自如网站的北京所有的数据。拉勾网包括公司、工资、岗位、地区等数据;自如网主要包括地区、房租、地铁、面积等数据。

招聘数据预览如下:

<tt-image data-tteditor-tag=”tteditorTag” contenteditable=”false” class=”syl1556261756250 ql-align-center” data-render-status=”finished” data-syl-blot=”image” style=”box-sizing: border-box; cursor: text; text-align: left; color: rgb(34, 34, 34); font-family: “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “WenQuanYi Micro Hei”, “Helvetica Neue”, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;”>
《我用Python爬了北京的房租和工资数据,北京的房租到底有多高?》 image

<input class=”pgc-img-caption-ipt” placeholder=”图片描述(最多50字)” value=”” style=”box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;”></tt-image>

可以添加QQ源码群1004391443,有飞机大战、颜值打分器、打砖块小游戏、红包提醒神器、小姐姐表白神器等具体的实训项目,有清晰源码,有相应的文件

租房信息预览如下:

<tt-image data-tteditor-tag=”tteditorTag” contenteditable=”false” class=”syl1556261756259 ql-align-center” data-render-status=”finished” data-syl-blot=”image” style=”box-sizing: border-box; cursor: text; text-align: left; color: rgb(34, 34, 34); font-family: “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “WenQuanYi Micro Hei”, “Helvetica Neue”, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;”>
《我用Python爬了北京的房租和工资数据,北京的房租到底有多高?》 image

<input class=”pgc-img-caption-ipt” placeholder=”图片描述(最多50字)” value=”” style=”box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;”></tt-image>

第一步我们先来预览一下北京房租的一个大概状况:在北京找一个不怎么靠地铁站的12平方米左右的合租房需要一个月大概2000元,找一个位置稍好的靠近地铁站的合租房需要每个月3000元左右。

<tt-image data-tteditor-tag=”tteditorTag” contenteditable=”false” class=”syl1556261756265 ql-align-center” data-render-status=”finished” data-syl-blot=”image” style=”box-sizing: border-box; cursor: text; text-align: left; color: rgb(34, 34, 34); font-family: “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “WenQuanYi Micro Hei”, “Helvetica Neue”, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;”>
《我用Python爬了北京的房租和工资数据,北京的房租到底有多高?》 image

<input class=”pgc-img-caption-ipt” placeholder=”图片描述(最多50字)” value=”” style=”box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;”></tt-image>

具体到每个区我们可以看上面这张图。其中朝阳区和海淀两个区是主要北京金融和IT公司分布的地方,在这两个地方靠近地铁的合租房价格都要到3500左右,这个合租房你可以使用的面积在12平米左右,假设你想整租的话最少要准备每个月7000+

那么北京的薪资水平怎么样呢?我们还是以工作机会比较多的朝阳和海淀来说:应届毕业生和1-3年工作经验的人是租房的主力军我们能看到,应届毕业生在朝阳区和海淀能拿到6000-7000的工资,1-3年工作经验的人能拿到9000-15000左右的薪资。

<tt-image data-tteditor-tag=”tteditorTag” contenteditable=”false” class=”syl1556261756269 ql-align-center” data-render-status=”finished” data-syl-blot=”image” style=”box-sizing: border-box; cursor: text; text-align: left; color: rgb(34, 34, 34); font-family: “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “WenQuanYi Micro Hei”, “Helvetica Neue”, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;”>
《我用Python爬了北京的房租和工资数据,北京的房租到底有多高?》 image

<input class=”pgc-img-caption-ipt” placeholder=”图片描述(最多50字)” value=”” style=”box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;”></tt-image>

从分布来看工作三年以内的人主要薪资水平集中在5000-12000之间,其中15000+的人也占到30%以上。

<tt-image data-tteditor-tag=”tteditorTag” contenteditable=”false” class=”syl1556261756273 ql-align-center” data-render-status=”finished” data-syl-blot=”image” style=”box-sizing: border-box; cursor: text; text-align: left; color: rgb(34, 34, 34); font-family: “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “WenQuanYi Micro Hei”, “Helvetica Neue”, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;”>
《我用Python爬了北京的房租和工资数据,北京的房租到底有多高?》 image

<input class=”pgc-img-caption-ipt” placeholder=”图片描述(最多50字)” value=”” style=”box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;”></tt-image>

所以如果这些在带着梦想在北京漂泊的年轻人想要在公司附近住一个房子的话需要花点他们多少的薪资呢?如果你选择生活不便利一些即没有地铁的话需要花点薪资的20%-30%,如果你选择生活便利一些的话需要花掉薪资的30%-40%.

如果你是一个浪一点刚工作就想整租的人,你要花掉60%-100%的工资用来租房。如果你在朝阳的话那么就花掉所有薪资吧。

<tt-image data-tteditor-tag=”tteditorTag” contenteditable=”false” class=”syl1556261756278 ql-align-center” data-render-status=”finished” data-syl-blot=”image” style=”box-sizing: border-box; cursor: text; text-align: left; color: rgb(34, 34, 34); font-family: “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “WenQuanYi Micro Hei”, “Helvetica Neue”, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;”>
《我用Python爬了北京的房租和工资数据,北京的房租到底有多高?》 image

<input class=”pgc-img-caption-ipt” placeholder=”图片描述(最多50字)” value=”” style=”box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;”></tt-image>

说实话这比例比我想象中低一些。当然如果你不介意每天在上下班的路途中耽误比较久的时间或许你可以选择在朝阳或者海淀工作,然后住在房山、大兴、顺义。那里廉价的房子应有尽有。

说了这么多给程序员的启示就是:有事没事的一定要在海淀找工作,朝阳群众不好当。

    原文作者:不谈风月_0eb8
    原文地址: https://www.jianshu.com/p/fe93f788d89f
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞