Reprinted from narcissism/love of Python

Participate in the topic at the end of the article, get asynchronous new book

Young people who yesterday fantasised about seaside villas may now despair of rent.

In early August, a netizen posted a complaint on “Shuimu Forum” about the price increase of long-rented apartments, which caused concern. It is said that a landlord intends to rent his three-bedroom apartment in Tiantongyuan with an expected rent of 7,500 yuan per month, but the price was raised to 10,800 yuan by two intermediaries.

Over the past month, rents in hot cities across The country have gone wild. First-tier rents are up nearly 20 percent year on year. One night, the proletariat woke up, even a piece of standing ground is suspended.

Since the second half of 2018, the rental tsunami has been raging, capital carnival, official silence, landlords struggle, tenants scream.

This is not the fault of one party, but rather of a collective murder by society as a whole. Most disturbingly, the old playbook and logic of real estate is now being transferred to rents.

Soaring rents are not confined to Beijing. Rents in The top 10 cities of Beijing, Shanghai, Guangzhou, Shenzhen, Tianjin, Wuhan, Chongqing, Nanjing, Hangzhou and Chengdu all rose month-on-month in July, data showed. Beijing, Shanghai and Shenzhen saw the sharpest increases, with rent in Beijing rising 3.1 percent in July from a year earlier, and in some neighborhoods it rose more than 30 percent.

                       

Figure from 21st Century Business Herald: How much do you pay a month? (with rent map

Next, love Python through Python big method by obtaining a network of tens of thousands of Beijing rental data, to tell you the real rent situation.

Same old, same old, same old, same old, same old, same old, same old Python trilogy: data capture, data cleansing preview, data analysis visualization, with you to explore the status of the latest rent.

Data acquisition

Love Python today to the current market share of the highest housing agency for the target to obtain Beijing, Shanghai two big cities rental information.

The overall idea is:

First, the URL and name of each area are climbed, and the main URL is splicing into a complete URL. Then, the URL list is cycled, and the rental information of each area is climbed in turn.

When climbing the rental listings in each area, find the largest page number, traverse the page number, and climb the listings for resales in turn.

Before we start the POST code, a brief description of the crawler Python packages used here:

Requests: packets that request access to the homelink network.

LXML: Parses web pages and uses xpath expressions along with regular expressions to retrieve web page information, faster than BS4.

The detailed code is as follows:

                              

                    

Data Cleaning Preview

                       

There are 14,038 items of data in 10 dimensions. As can be seen from the figure above, the average price of Beijing housing is 9,590 yuan/month, and the median price is 7,000 yuan. The price of half of the houses is below 7000, and the price range of all the houses is [1000,250000]. The price difference is very large.

Data analysis visualization

Four dimensions – Average rent price in Beijing

Next, Love Python put the distribution of housing quantity and average price in each region, each road section, each real estate in Beijing on the same map to have a more intuitive view of rent.

As can be seen from the chart, the rent in all areas of Beijing is more than 6000 yuan/month recently, among which the highest rent in Dongcheng is 12,463 yuan/month on average. However, due to excessive and miscellaneous housing information, housing location, area, floor and orientation all have a great impact on the price. Therefore, the price dimension needs further analysis.

As can be seen from the figure above, the average price of each road section is basically above 6000, among which haidian North New Area has the most houses, but the lowest average price is 3308 yuan/month. This may be related to the fact that Haidian North Ecological Science and Technology New Area is the bearing area of high-tech industry, the RESEARCH and development base of original innovation source, and the agglomeration area of science and technology park. At present, it has settled in huawei, Lenovo, Baidu, Tencent, IBM, Oracle and other nearly 2000 well-known domestic and foreign science and technology innovation enterprises.

On the other hand, haidian Zizhu Bridge housing prices have skyrocketed together, its nearby museums, stadiums and gymnasiums are featured, convenient transportation, complete supporting facilities, the average price is high is reasonable.

It can be seen that the average price of different buildings fluctuates greatly, but they are all above 6000/ month. The highest even reached 17,516 per month. As a result of the large difference in each building, geographical location is also more scattered, so the average price fluctuation is very large. Each dish specific circumstance still needs specific analysis.

Attached details code:

                

As can be seen from the figure above, the number of houses in the average price range of 8000-10000 is the largest, while the number of houses in the average price range of 1500-2000 is pitiless.

According to the Beijing Municipal Bureau of Statistics, the monthly per capita disposable income of the city’s residents was 4,769 yuan in 2017. The average monthly rent in Beijing was 2,795 yuan in 2017, according to a report by 58.com and Ganji.com.

The rent-to-income ratio for Beijing renters is surprisingly close to 60 per cent. Many people spend half of their income on rent, and their lives are locked in poverty.

Statistics also show that the overall income of people renting apartments in Beijing is low. 47 percent of renters earn less than $100,000 a year. In Beijing, those who can afford rent of around 5,000 yuan a month are considered upper-middle income. In this way, the first batch of post-90s generation overcame divorce, baldness, becoming a monk and giving birth, but finally fell in front of the rent.

Attached details code:

                 

The distribution of area and rent is stepped

As can be seen from the above figure, 80% of the housing area is concentrated between 0 and 90 square meters, which is also consistent with the situation of single and shared renting by tenants. There are few large areas of housing.

The distribution of area and rent is ladder, more consistent with common sense. Rental is the main force of office workers, generally lower requirements for house area, basically concentrated in 30 flat.

Attached details code:

                                     

                   

Most homes are more than 10 years old

As can be seen from the figure above, most houses are 10-20 years old and more than 25 years old, while less than 2% are under 5 years old. However, although these are old houses, rent has become so rampant recently? One reason is the capital enclosure.

The post immediately ignited the public’s mood: “Ah, it is these long-term rental platforms that burn money to seize the land. They only want to monopolize the housing market, raise the rent and try to make a huge profit difference!”

Afterword.

Take freely for example, on the surface with the intermediary company no different, received all kinds of loose plate, and then concentrated decoration, rental, management, because of the improvement of operating costs and housing quality, rent must have risen.

But the bigger story lies behind it. Freely packaged the project into asset securitization, with rent-usufruct as the underlying asset as the guarantee, and put it into the financial market to issue ABS of consumption instalment in the domestic first single rental market, which was subscribed by various funds and paid some dividends to everyone every year.

A lot of capital are gambling on renting this draught, and the larger the scale of the earlier, the more resources, the greater the pricing power, the more unimaginable the profit space.

This time, a total of 14,038 pieces of data were retrieved from Lianjia, and that was about a week ago. On August 17, Beijing Commission of Housing and Urban-rural Development interviewed several intermediary companies. The final result is that Freely, Xiangyu and Eggshell promised to take out 120,000 houses into the market, freely will take out 80,000 (Lianjia, Freely, Shell zhaofang, their actual controller is the same person – Lianjia boss Zuo Hui).

That is to say, normally, a total of home chain + Free online to rent is more than 10,000 houses, but they were invited to take out 80,000 houses reinforcement?? How to add? Keep collecting, keep the supply short?

I couldn’t afford to buy an apartment yesterday, and I can’t afford to rent an apartment today. If even such a life is forced and taken away due to market irregularities, it really makes people lose hope for a city.

Article reprinted from narcissistic Xi Python public account

Is it interesting to use data to analyze housing,

Many women do not know how to operate,

Here are some new asynchronous books,

Keep reading!

                                                 

“Programmers learning Python”

Zong-yan qiu zhao

This book is written by professor Qiu Zongyan, a programmer’s beginner’s guide to Python. The book gives a comprehensive introduction to all aspects of Python features and application technology, discusses the in-depth concepts and situations needed to accurately understand Python and correctly use Python to develop programs, and also introduces some advanced functions that should be known when developing larger or more complex programs with Python, such as program module organization and import system. Generators, closures, and decorators, basic and advanced object-oriented programming mechanisms and techniques, coroutines and asynchronous programming as recent extensions to Python, and more.

In addition, the book also provides complete advanced content and corresponding cases, so that readers can have a comprehensive and in-depth understanding of deep learning knowledge and skills, to achieve the purpose of learning to apply.

                                                   

Writing web crawlers in Python, 2nd Edition

By Katharine Jarmul

Book includes the definition of web crawler and how to crawl web, how to use several kinds of library to extract data from web pages, how to avoid the repeated downloads by caching the results of problem, how to accelerate data fetching through parallel downloads, how to use different ways to extract data from dynamic website, how to use the uncle and navigation and other expression to search and login, How to access captcha image protected data, how to use Scrapy crawler framework for fast parallel crawler, and use Portia’s Web interface to build Web crawlers.

                                                

Python3 by The Stupid Way

The Zed Shaw

This book is based on Python version 3.6. Millions of fan programmers with an easy introduction to Python! This 5-hour video is designed with American pronunciation and Chinese subtitles. 52 well-designed programming exercises, refuse to procrastinate, provide project cases, learn to apply.

This book is an introduction to Python, suitable for readers who do not know much about computers and have not learned programming, but are interested in programming. This book guides readers to learn programming step by step in the way of exercises, from simple printing to the realization of a complete project, so that beginners can start from the basic programming technology, and finally experience the basic process of software development.

Today’s interactive

Which book would you most like to learn Python with? Why is that? By 17 o ‘clock on September 6th, leave a message + forward this activity to the circle of friends, xiaobian will be lucky to select 2 readers to give a paper book (participate in the activity directly to the wechat end Beijing rent rise? Six dimensions, tens of thousands of pieces of data to debunk)

                                        

Long press the QR code, you can follow us yo

I share IT articles with you every day.

If you reply “follow” in the background of “Asynchronous books”, you can get 2000 online video courses for free

Click here to read the original article and buy Python for Programmers.

Read the original