# HUMAN POPULATION OVER THE LAST 10000 YEARS
#
# make sure the standard libraries are active
import numpy as np
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
from IPython.display import Image
Population = (
[-48000, 0.5, 1000],
[-8000, 4, 750],
[-4000, 7, 750],
[-2000, 27, 750],
[-1000, 50, 750],
[-500, 100, 750],
[-200, 150, 750],
[0, 170, 750],
[200, 190, 750],
[400, 190, 750],
[600, 200, 750],
[800, 230, 750],
[1000, 265, 750],
[1200, 360, 750],
[1400, 350, 750],
[1500, 425, 750],
[1600, 545, 800],
[1700, 610, 875],
[1750, 720, 930],
[1800, 900, 1000],
[1870, 1300, 1400],
[1900, 1625, 2000],
[1925, 1875, 2600],
[1950, 2516, 3500],
[1975, 4000, 5000],
[2000, 6200, 7700],
[2018, 7500, 10600])
Population = np.array(Population)
Pop_df = pd.DataFrame(Population)
Pop_df.columns = ['Date', 'Population', 'GDP_per_Capita']
Pop_df['Year'] = 0.0
Pop_df['Ideas'] = 0.0
Pop_df['Gr_Pop'] = 0.0
Pop_df['Gr_GDP'] = 0.0
Pop_df["Gr_Ideas"] = 0.0
phi = 3
for i in range(27):
Pop_df.Year[i] = Pop_df.Date[i]
Pop_df.Ideas[i] = (Pop_df.GDP_per_Capita[i]**((1+phi)/phi) *
Pop_df.Population[i]**(1/phi))/22360.68/1.837117/12.1716/.01587403/1.362840
for i in range(26):
Pop_df.Gr_Pop[i+1] = (np.log(Pop_df.Population[i+1]/Pop_df.Population[i])/
(Pop_df.Year[i+1]-Pop_df.Year[i]))
Pop_df.Gr_GDP[i+1] = (np.log(Pop_df.GDP_per_Capita[i+1]/Pop_df.GDP_per_Capita[i])/
(Pop_df.Year[i+1]-Pop_df.Year[i]))
Pop_df.Gr_Ideas[i+1] = (np.log(Pop_df.Ideas[i+1]/Pop_df.Ideas[i])/
(Pop_df.Year[i+1]-Pop_df.Year[i]))
Pop_df = Pop_df.set_index('Date')
Pop_df
Population | GDP_per_Capita | Year | Ideas | Gr_Pop | Gr_GDP | Gr_Ideas | |
---|---|---|---|---|---|---|---|
Date | |||||||
-48000.0 | 0.5 | 1000.0 | -48000.0 | 0.733762 | 0.000000 | 0.000000 | 0.000000 |
-8000.0 | 4.0 | 750.0 | -8000.0 | 1.000000 | 0.000052 | -0.000007 | 0.000008 |
-4000.0 | 7.0 | 750.0 | -4000.0 | 1.205071 | 0.000140 | 0.000000 | 0.000047 |
-2000.0 | 27.0 | 750.0 | -2000.0 | 1.889882 | 0.000675 | 0.000000 | 0.000225 |
-1000.0 | 50.0 | 750.0 | -1000.0 | 2.320795 | 0.000616 | 0.000000 | 0.000205 |
-500.0 | 100.0 | 750.0 | -500.0 | 2.924019 | 0.001386 | 0.000000 | 0.000462 |
-200.0 | 150.0 | 750.0 | -200.0 | 3.347166 | 0.001352 | 0.000000 | 0.000451 |
0.0 | 170.0 | 750.0 | 0.0 | 3.489767 | 0.000626 | 0.000000 | 0.000209 |
200.0 | 190.0 | 750.0 | 200.0 | 3.621579 | 0.000556 | 0.000000 | 0.000185 |
400.0 | 190.0 | 750.0 | 400.0 | 3.621579 | 0.000000 | 0.000000 | 0.000000 |
600.0 | 200.0 | 750.0 | 600.0 | 3.684033 | 0.000256 | 0.000000 | 0.000085 |
800.0 | 230.0 | 750.0 | 800.0 | 3.859722 | 0.000699 | 0.000000 | 0.000233 |
1000.0 | 265.0 | 750.0 | 1000.0 | 4.046337 | 0.000708 | 0.000000 | 0.000236 |
1200.0 | 360.0 | 750.0 | 1200.0 | 4.481406 | 0.001532 | 0.000000 | 0.000511 |
1400.0 | 350.0 | 750.0 | 1400.0 | 4.439521 | -0.000141 | 0.000000 | -0.000047 |
1500.0 | 425.0 | 750.0 | 1500.0 | 4.736342 | 0.001942 | 0.000000 | 0.000647 |
1600.0 | 545.0 | 800.0 | 1600.0 | 5.608119 | 0.002487 | 0.000645 | 0.001690 |
1700.0 | 610.0 | 875.0 | 1700.0 | 6.561742 | 0.001127 | 0.000896 | 0.001570 |
1750.0 | 720.0 | 930.0 | 1750.0 | 7.521767 | 0.003316 | 0.001219 | 0.002731 |
1800.0 | 900.0 | 1000.0 | 1800.0 | 8.925775 | 0.004463 | 0.001451 | 0.003423 |
1870.0 | 1300.0 | 1400.0 | 1870.0 | 15.802177 | 0.005253 | 0.004807 | 0.008160 |
1900.0 | 1625.0 | 2000.0 | 1900.0 | 27.387741 | 0.007438 | 0.011889 | 0.018332 |
1925.0 | 1875.0 | 2600.0 | 1925.0 | 40.756479 | 0.005724 | 0.010495 | 0.015901 |
1950.0 | 2516.0 | 3500.0 | 1950.0 | 66.817883 | 0.011762 | 0.011890 | 0.019774 |
1975.0 | 4000.0 | 5000.0 | 1975.0 | 125.471505 | 0.018545 | 0.014267 | 0.025204 |
2000.0 | 6200.0 | 7700.0 | 2000.0 | 258.235910 | 0.017530 | 0.017271 | 0.028872 |
2018.0 | 7500.0 | 10600.0 | 2018.0 | 421.366507 | 0.010575 | 0.017757 | 0.027202 |
np.log(45.98/23.09)/70
# rate of population growth, -48000 to -8000
PopCh_m48Ktom8K = (np.log(Pop_df.Population[-8000]/Pop_df.Population[-48000]))
Yrs_m48Ktom8K = Pop_df.Year[-8000] - Pop_df.Year[-48000]
PopGr_m48Ktom8K = PopCh_m48Ktom8K/Yrs_m48Ktom8K
IdGr_m48Ktom8K = PopGr_m48Ktom8K/2
Idm8K=np.exp(IdGr_m48Ktom8K*(Yrs_m48Ktom8K))
Idm8K
# rate of population growth, -8000 to 0
PopCh_m8Kto0 = (np.log(Pop_df.Population[0]/Pop_df.Population[-8000]))
Yrs_m8Kto0 = Pop_df.Year[0] - Pop_df.Year[-8000]
PopGr_m8Kto0 = PopCh_m8Kto0/Yrs_m8Kto0
IdGr_m8Kto0 = PopGr_m8Kto0/2
Id0=np.exp(IdGr_m8Kto0*(Yrs_m8Kto0)) * Idm8K
Id0
# rate of population growth, 0 to 1500
PopCh_0to1500 = (np.log(Pop_df.Population[1500]/Pop_df.Population[0]))
Yrs_0to1500 = Pop_df.Year[1500] - Pop_df.Year[0]
PopGr_0to1500 = PopCh_0to1500/Yrs_0to1500
IdGr_0to1500 = PopGr_0to1500/2
Id1500=np.exp(IdGr_0to1500*(Yrs_0to1500)) * Id0
Id1500
# rate of population growth, 0 to 1500
PopCh_0to1500 = (np.log(Pop_df.Population[1500]/Pop_df.Population[0]))
Yrs_0to1500 = Pop_df.Year[1500] - Pop_df.Year[0]
PopGr_0to1500 = PopCh_0to1500/Yrs_0to1500
IdGr_0to1500 = PopGr_0to1500/2
Id1500=np.exp(IdGr_0to1500*(Yrs_0to1500)) * Id0
Id1500
$ Y = \omega(EL) $
$ \frac{Y}{L} = {\omega}\left(H^{\frac{\phi}{1+\phi}}L^{\frac{-1}{1+\phi}}\right) $
$ ln(Y) - ln(L) = ln(\omega) + \left(\frac{\phi}{1+\phi}\right)ln(H) - \left(\frac{1}{1+\phi}\right)ln(L) $
$ ln(H) = \frac{(1+\phi)}{\phi}(ln(Y) - ln(L) - ln(\omega)) + \frac{1}{\phi}ln(L) $
$ \frac{d(ln(H))}{dt} = \frac{(1+\phi)}{\phi}\left(\frac{d(ln(Y))}{dt} - \frac{d(ln(L))}{dt}\right) + \frac{1}{\phi}\frac{d(ln(L))}{dt} $
phi = 2
H = (Pop_df.GDP_per_Capita[-48000]**((1+phi)/phi *
Pop_df.Population[-48000]**(1/phi)))/324602.54554904939
H
np.log(11.25/1.84)/8000
np.log(18.9/11.25)/1500
np.log(46/23.1)/70
np.log(2300/46)/148
# rate of population growth, 1500 to 1800
import numpy as np
PopCh_1500to1800 = (np.log(Pop_df.Population[1800]/Pop_df.Population[1500]))
Yrs_1500to1800 = Pop_df.Year[1800] - Pop_df.Year[1500]
PopGr_1500to1800 = PopCh_1500to1800/Yrs_1500to1800
IdGr_1500to1800 = PopGr_1500to1800/2
Id1800=np.exp(IdGr_1500to1800*(Yrs_1500to1800)) * Id1500
IdGr_1500to1800
# knowledge value growth rates
import numpy as np
print(np.log(23/10.3)/300)
print(np.log(46/23)/70)
print(np.log(10.31/8.14)/500)
print(np.log(6.52/3.54)/1000)
print(np.log(6.52/1.32)/4000)
# income per capita growth rates
print(np.log(1.4)/70)
print(np.log(13/9)/70)
print(np.log(1.625/1.3)/30)
print(np.log(900/425)/300)
print(np.log(425/170)/1500)
# No Briitsh Industrial Revoluiton
#
# Population in 1800 of 900 million
# Level of H of 23.09 growing at 0.25%/year
print(900 * np.exp(0.006*(2018-1800))) # population in 2018
print(8.9 * np.exp(0.002*(2018-1800))) # knowledge in 2018
3328.89189497 13.7639282733
# No Modern Economic Growth
#
# Population in 1870 of 1300 million
# Level of H of 46 growing at 1.00%/year
print(15.8 * np.exp(0.008*(2018-1870))) # knowledge in 2018)
print(1300 * np.exp(0.024*(2018-1870))) # population in 2018
51.6252007572 45347.9179343
print(np.log(4000/2516)/25)
print(np.log(4.75/3.5)/1500)
print(np.log(4.75/4)/500)
print(np.log(425/170)/1500)
print(np.log(421/15)/148)
print(np.log(9/4.75)/300)
print(np.log(16/9)/70)
0.000203587766367 0.000343700513853 0.000610860487916 0.0225309637336 0.00213026653097 0.00821948778434
np.exp(1500*.00061)
2.496775251904888