Over 1.4 billion, python analysis of China's population crisis!

Pig brother 66 2020-11-13 07:32:30
billion python analysis china population


2020 year 1 month 17 Japan , The National Bureau of statistics released 2019 The national economic report , The report points out that China's population breakthrough 14 Billion .

Brother pig's circle of friends is 14 Million people swipe the screen , But many people don't see the complicated population problem in our country : Aging 、 The imbalance between men and women 、 The fertility rate is falling 、 The demographic dividend is falling, etc .

Today, let's analyze the population data of our country !
 Insert picture description here
More interesting analysis tutorials , Scan the QR code below for attention vx And no. 「 Naked pigs 」 You can view it !
 Insert picture description here

One 、 background

1. Population breakthrough 14 Billion

2020 year 1 month 17 Japan , The National Bureau of statistics released 2019 The national economic report , The report points out that : The total population of mainland China at the end of the year ( Include 31 A province 、 Autonomous region 、 Municipalities directly under the central government and active servicemen of the Chinese people's Liberation Army , Excluding Hong Kong 、 Number of overseas Chinese in Macao SAR and Taiwan Province )140005 ten thousand people .

in other words 2019 At the end of the year, the population of our country broke through 14 Billion !

 Insert picture description here

Report links :http://www.stats.gov.cn/tjsj/zxfb/202001/t20200117_1723383.html

2. Census year

according to 2010 year 5 month 12 The State Council of Japan 111 Adopted at the executive meeting 《 National Census regulations 》 Chapter one Article 8 provides that : Census every 10 Once a year , It's the end of the day 0 The year of is the census year , The standard time point is 11 month 1 Zero hour of the day .

 Insert picture description here
in other words 2020 year 11 There will be a seventh census in June , After the founding of new China, the first six censuses were :1953、1964、1982、1990、2000、2010 year .

ps: Some students may have questions : Ten years census , How can the population in other years come from ? In non census years , The total population of that year = The total population of last year + The population born in that year - The people who died that year And calculated !

3. Let go of the second child

《 Amendment to the population and family planning law of the people's Republic of China ( The draft )》 Make it clear ,“ universal two-child policy ” policy 2016 New year's day can be implemented . We will fully implement the policy of one couple having two children , It is a historical adjustment of China's fertility policy , Implemented 36 The one-child policy ended in .

Two 、 Analysis objectives

The founding of new China 70, Experienced many ups and downs , policy 、 economic 、 There are also many changes in culture , And the population changes .

Population change has a huge and far-reaching impact on social and economic development , So today we analyze the population change in China from various perspectives :

  1. The total population
  2. Sex ratio
  3. Urbanization
  4. growth rate
  5. population structure

3、 ... and 、 Crawl data

Data sources about our population , It can be downloaded from “ National data ” Get . This is a website provided by the National Bureau of statistics , There's a lot of open data in it !
 Insert picture description here

1. Request single page data

On the national data website , From the founding of new China to 2018 Population related data for .
 Insert picture description here
In the demographic data , There are three items of data we need : The total population 、 growth rate 、 population structure .

We press F12 Check out the requested link , Then copy the link to use requests Request data .
 Insert picture description here
Use only one simple get request , Just get the data , And the direct return is json data !
 Insert picture description here

2. Paging data

Our purpose this time is to capture all population data from New China to the present , And the page can get at most close to 20 Years of data , So we need to analyze the paging parameters in the web page request .
 Insert picture description here
Analysis of the request parameters found that there are two main parameters :zbsj, respectively indicators and Time .

 Insert picture description here
 Insert picture description here
Parameters :sj=LAST10, Near 10 year , So brother pig guessed :sj=LAST70 Is it possible to get 70 What about the data of ?
 Insert picture description here
Then we will zb Parameter change , Get all the data !
 Insert picture description here

3. preservation Excel

After getting the data , Let's clean the data first , Extract the data we need , Then organize and save it to Excel in , We still use Master pan (pandas).
 Insert picture description here
Let's take a look at the preserved excel File data .
 Insert picture description here

4.2019 Annual data

At present, the only incomplete data is that there is no 2019 Years of data , because 2019 The year just ended, so the data hasn't been registered on the website , We can only work it out by ourselves and make up for it .
 Insert picture description here
Brother pig according to 2020 year 1 month 17 Japan , The National Bureau of statistics released 2019 The data on population in the national economic report in came to 2019 Data from .
 Insert picture description here
Take a look at the complete 70 Annual population data .
 Insert picture description here

Four 、 Data analysis

After the data is saved, we can start the data analysis step , Generally, we need to have an idea before we analyze the data : What to analyze ? From what angles ? What visual graphics to choose ? What is the conclusion ?( Of course, the actual work of the analysis report needs to be more rigorous , But the general idea is similar .)

1. The total population

First we extract Excel Medium “ Total Population ” This column of data is analyzed .
 Insert picture description here
Go straight to the code , Brother pig first uses master pan to read Excel, Then get the column data of the total population ( Please check the source code for the complete code ). Insert picture description here
The code above is a little different from the curve drawn before : Added the function of custom curve background color and area color , Next time someone wants to customize pyecharts The curve background can refer to the code here .

In the picture below, brother pig marked four points :

  1. 1949 year : The founding of new China , The total population 5.42 Billion
  2. 1980 year : Family planning officially begins , The total population 9.87 Billion
  3. 2016 year : Let go of the second child , The total population 13.83 Billion
  4. 2019 year : The total population 14 Billion

 Insert picture description here
By observing the total population curve, we know that :

  1. The population is on the whole increasing , But the growth curve is slowing down , According to the prediction of the Academy of Social Sciences : The population of China will be in 2029 Peaked in 14.42 Billion , Step down later
  2. Since the founding of new China (2020 year ) The only decrease in population is 1960 and 1961 year , These two years are the year of natural disasters in China . Insert picture description here
  3. According to the total population , Let's analyze it again Before carrying out family planning 31 Year and after 31 What's the annual population growth respectively ?
     Insert picture description here
    As we can see from the picture above : Family planning does control population growth !

But after releasing the second child, it did not usher in the peak period of fertility , Issued by relevant UN agencies 《 World population Outlook 》2017 The revised version gives a similar expectation . It tends to assume that China's population has begun to fall V Type reversal , After the population peaked ,2050 The year will last 13 Billions more , And then it will accelerate the slide ( low 、 in 、 Three high fertility rates , From the United Nations Population Fund ).( China's population trend forecast , Low points 、 in 、 Three high fertility rates , From the United Nations Population Fund )

2. The ratio of men to women

We often hear people say :“ The imbalance between men and women in China , There will be 3000 Ten thousand Chinese men can't marry ”.

In fact, this is the result of the imbalance between men and women in our country .
 Insert picture description here

Next brother pig from the following 4 To analyze the relationship between male and female ratio in China :

  1. 2019 The annual sex ratio
  2. The proportion of men in the total population
  3. The population curve of men and women
  4. The difference between the population of men and women

 Insert picture description here
According to the above 4 We can draw some conclusions :

  1. Since the founding of new China, there have been more males than females , Maybe it has something to do with the idea that men are more important than women .
  2. The highest proportion of men was at the beginning of the founding of new China 51.96%, The lowest is in 1996 Years for 50.82%. The figure below is provided by Kuaiyi data China 、 India 、 Japan 、 The British 、 The United States The proportion of men in five countries , It is clear from the picture that the ratio of men to women between China and India has been in a state of imbalance . Insert picture description here
  3. 2000 The biggest difference between the male and female population in our country was 4131 ten thousand people , The minimum difference is 1965 Years for 1718 ten thousand people .
  4. 2006 Since, the imbalance between men and women has been alleviated year by year

How many male compatriots in our country will fight single ? Due to limited space , We will do a special analysis of this problem in the next issue !

3. Population urbanization

There are many students who don't understand “ Population urbanization ”, Here is the introduction of Baidu Encyclopedia :

Population urbanization refers to the transformation of rural population into urban population 、 The process of transforming agricultural population into non-agricultural population , It is the product of the development of social productivity to a certain stage .

Urbanization is a comprehensive indicator , It can be used to measure the local economic development 、 Infrastructure and people's living standards .

meanwhile , The process of urbanization is also an important supporting force of the real estate market at the demand level , The figure below shows the relationship between population urbanization and social development .
 Insert picture description here
According to Northam, an American geographer, the study of urbanization around the world , The world's urbanization is divided into three stages :

  1. initial stage ( Population urbanization is in 30% following ): The rural population has an advantage , The level of industrial and agricultural productivity is low , Industry offers few jobs , The agricultural surplus labor force cannot be released .
  2. Mid - ( Population urbanization 30%~70%): The industrial base is relatively strong , Economic strength has increased significantly , The productivity of rural labor has increased , The surplus labor turned to industry , The proportion of urban population is breaking through rapidly 50%, And then it goes up to 70%.
  3. later stage ( Population urbanization 70%~90%): The transformation from rural population to urban population tends to stop , The proportion of the rural population is stable at 10% about , The urban population can reach 90% about , Tend to saturate , Urbanization in this process is no longer the flow of population from rural to urban , But the structural transfer of urban population between industries , Mainly from the second industry to the third industry .

Let's take a look at the data analysis of China's population urbanization :
 Insert picture description here
According to the analysis above :

  1. 2019 The population urbanization of our country reached 60.6%, In the middle of Population Urbanization .
  2. 1995 China's rural population peaked in :8.59 Billion .
  3. 1996 In, China's urbanization accelerated , In the same year, urbanization exceeded 30%, In the middle of Urbanization .
  4. stay 2010 In, China's urban population and rural population were about the same 6.7 Billion , Urbanization into 50%.

The United Nations forecasts the process of population urbanization in China : The initial stage of urbanization in China is 1949 year ~1995 year , In the middle is 1996 year ~2032 year , Later is 2033 Years later .
 Insert picture description here

4. Population growth rate

Data visualization code pig brother will not put out , Want to see the students directly take a look at the source , Let's look directly at the pictures .
 Insert picture description here
From the picture above :

  1. In three years of natural disaster (1959、1960、1961) The death rate of our country's population has increased sharply , The birth rate has also declined , The first negative growth in population since the founding of new China !
  2. Two years after the natural disaster (1962、1963) Ushering in the largest wave of fertility in China , We go through 2010 Data from the fifth census of population in may also verify this conclusion . Insert picture description here
  3. After three years of natural disasters, China's mortality rate has been stable , Keep at 6-7‰ about .
  4. China's birth rate as a whole has been declining , Before family planning, the birth rate was falling .
  5. stay 2016 Three years after China's full liberalization of the second child (2017-2019), The birth rate has not improved , It keeps going down .

At present, most women of childbearing age are 85-90 after , By family planning (1980 year ) influence , The number of women of childbearing age is less than before , The number of children is naturally less than before , This situation will continue .

The birth rate is down , Increased mortality , Population growth will slow down , The Academy of Social Sciences predicts that 2029 Our population peaked around (14.42 Billion ) Then slowly reduce !

Digression : After crawling through the data , Find out National data website The data provided is also wrong :1961 Annual population ratio 1960 The annual population is down , And the growth rate is an integer !
 Insert picture description here

5. Age structure

The age structure of the population is a measure of Aging And Demographic dividend Indicators of .

Aging : A relative increase in the number of elderly people , The rising proportion of the total population , The common international view is , When a country or region 60 The number of people over the age of 10%, or 65 The number of people over the age of 7%, It means that the population of this country or region is in an aging society . —— Baidu Encyclopedia

Aging is a stage that every country and every society will go through , At present, the problem of aging in developed countries is more serious than that in developing countries , According to a copy provided by Kuaiyi data In terms of the ranking of aging in the world , China is only in line for 65 name , The first place is Japan , The first few are European countries .
 Insert picture description here

Demographic dividend : Economic terminology , It means that the working age population of a country accounts for a large proportion of the total population , The dependency rate is relatively low , It creates favorable population conditions for economic development , The economy as a whole is high in savings 、 High investment and high growth .

The demographic dividend is simply The number of labor force Greater than Not The labor force , A high proportion of the working population , Guarantee the labor demand in economic growth , Abundant labor resources and cost advantages have made China the engine of world factory and world economic growth .
 Insert picture description here
From the above three figures, we can get :

  1. 1982 In our country 0-14 The proportion of children aged 33.59%, and 2019 Years down to 17.9%, The proportion is reduced to nearly half .
  2. 2019 In our country 65 The proportion of people over the age of 12.57%, Has entered an aging society . The world has 92 Countries are aging , China ranks in 65.
  3. 2010 In, China's total dependency ratio reached a minimum of :34.2%, Mean every 3 A laborer needs to support an old man or a child .
  4. The demographic dividend is 2010 Peaked in , And then it's slowly lowering .

2019 In, the old population of our country was 1.76 Billion , China's aging is about to enter the stage of rapid aging , At present, pension in many provinces of our country is in urgent need , China's pension system reform is imminent .

5、 ... and 、 summary

Because the length is too long , Many analysis codes are not released , If you want to learn, you can check the source code (https://github.com/pig6/china_population).

Let's summarize the results of our analysis today :

  1. The total population : The total population of our country is growing steadily , According to the prediction of the Academy of Social Sciences : The population of China will be in 2029 Peaked in 14.42 Billion , Step down later ( China's population trend forecast , Low points 、 in 、 Three high fertility rates , From the United Nations Population Fund )
  2. The male to female ratio : Since the founding of new China , Always in a state of more men than women ,2019 The difference between men and women is 3000 ten thousand . Because there are more women than men in the elderly , So the difference between young men and women should be greater , We can analyze it in the next issue : How many singles will there be in China ? Insert picture description here
  3. Population urbanization :2019 In, China's urbanization exceeded 60%, In the middle stage of urbanization . The United Nations forecasts the process of population urbanization in China : The initial stage of urbanization in China is 1949 year ~1995 year , In the middle is 1996 year ~2032 year , Later is 2033 Years later . Insert picture description here
  4. Population growth rate : China's birth rate continues to fall , There is no birth tide after the full opening of the second child , Population growth is slowing down , According to the prediction of the Academy of social sciences 2029 The annual population growth rate is 0, Then there's negative growth , Low fertility has accelerated my aging process . Insert picture description here
  5. The age structure of the population : The age structure of the population affects two important indicators : Demographic dividend 、 Aging . Our demographic dividend is in 2010 Peaked in , Then slowly reduce . Aging is a common problem in the world , Especially in developed countries . According to the quick data :2018 In, there were 92 Countries are aging , Japan's aging ranks first :27.58%, China's aging ranks No 65 position . But as time goes on, our country is about to enter a rapid aging period , The problem of providing for the aged is increasingly prominent ! Insert picture description here

In conclusion, there are two serious problems in China's population structure :

  1. Pension issues : The fertility rate is low 、 The labor force is shrinking 、 Aging is accelerating 、 The population is about to peak 、 The demographic dividend is gone 、 Multi province pension crisis , Need central subsidy !
  2. There's a male problem : After the implementation of family planning, the population gap between men and women has widened , The imbalance between men and women , The problem of remaining men is serious , There are many news about buying a wife in Vietnam !

Faced with two severe tests , I hope that some professionals can give advice to our country , I hope that our country will achieve great rejuvenation as soon as possible !

Data sources :
1、http://data.stats.gov.cn/easyquery.htm?cn=C01
2、http://www.stats.gov.cn/tjsj/zxfb/202001/t20200117_1723383.html
3、https://www.kylc.com/stats

Reference resources :
1、https://yq.aliyun.com/articles/668824
2、https://mp.weixin.qq.com/s/SmNxflkaYgBewwmjoqOfJw
3、https://www.ssap.com.cn/c/2019-01-03/1074956.shtml

Get the source code of this tutorial , Scan the QR code below for attention vx And no. 「 Naked pigs 」 reply : Demographic analysis You can view it !
 Insert picture description here

版权声明
本文为[Pig brother 66]所创,转载请带上原文链接,感谢

  1. 利用Python爬虫获取招聘网站职位信息
  2. Using Python crawler to obtain job information of recruitment website
  3. Several highly rated Python libraries arrow, jsonpath, psutil and tenacity are recommended
  4. Python装饰器
  5. Python实现LDAP认证
  6. Python decorator
  7. Implementing LDAP authentication with Python
  8. Vscode configures Python development environment!
  9. In Python, how dare you say you can't log module? ️
  10. 我收藏的有关Python的电子书和资料
  11. python 中 lambda的一些tips
  12. python中字典的一些tips
  13. python 用生成器生成斐波那契数列
  14. python脚本转pyc踩了个坑。。。
  15. My collection of e-books and materials about Python
  16. Some tips of lambda in Python
  17. Some tips of dictionary in Python
  18. Using Python generator to generate Fibonacci sequence
  19. The conversion of Python script to PyC stepped on a pit...
  20. Python游戏开发,pygame模块,Python实现扫雷小游戏
  21. Python game development, pyGame module, python implementation of minesweeping games
  22. Python实用工具,email模块,Python实现邮件远程控制自己电脑
  23. Python utility, email module, python realizes mail remote control of its own computer
  24. 毫无头绪的自学Python,你可能连门槛都摸不到!【最佳学习路线】
  25. Python读取二进制文件代码方法解析
  26. Python字典的实现原理
  27. Without a clue, you may not even touch the threshold【 Best learning route]
  28. Parsing method of Python reading binary file code
  29. Implementation principle of Python dictionary
  30. You must know the function of pandas to parse JSON data - JSON_ normalize()
  31. Python实用案例,私人定制,Python自动化生成爱豆专属2021日历
  32. Python practical case, private customization, python automatic generation of Adu exclusive 2021 calendar
  33. 《Python实例》震惊了,用Python这么简单实现了聊天系统的脏话,广告检测
  34. "Python instance" was shocked and realized the dirty words and advertisement detection of the chat system in Python
  35. Convolutional neural network processing sequence for Python deep learning
  36. Python data structure and algorithm (1) -- enum type enum
  37. 超全大厂算法岗百问百答(推荐系统/机器学习/深度学习/C++/Spark/python)
  38. 【Python进阶】你真的明白NumPy中的ndarray吗?
  39. All questions and answers for algorithm posts of super large factories (recommended system / machine learning / deep learning / C + + / spark / Python)
  40. [advanced Python] do you really understand ndarray in numpy?
  41. 【Python进阶】Python进阶专栏栏主自述:不忘初心,砥砺前行
  42. [advanced Python] Python advanced column main readme: never forget the original intention and forge ahead
  43. python垃圾回收和缓存管理
  44. java调用Python程序
  45. java调用Python程序
  46. Python常用函数有哪些?Python基础入门课程
  47. Python garbage collection and cache management
  48. Java calling Python program
  49. Java calling Python program
  50. What functions are commonly used in Python? Introduction to Python Basics
  51. Python basic knowledge
  52. Anaconda5.2 安装 Python 库(MySQLdb)的方法
  53. Python实现对脑电数据情绪分析
  54. Anaconda 5.2 method of installing Python Library (mysqldb)
  55. Python implements emotion analysis of EEG data
  56. Master some advanced usage of Python in 30 seconds, which makes others envy it
  57. python爬取百度图片并对图片做一系列处理
  58. Python crawls Baidu pictures and does a series of processing on them
  59. python链接mysql数据库
  60. Python link MySQL database