# 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
phi = 2
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
Pop_df = Pop_df.set_index('Date')
Pop_df
Population | GDP_per_Capita | Year | Ideas | |
---|---|---|---|---|
Date | ||||
-48000.0 | 0.5 | 1000.0 | -48000.0 | 0.544331 |
-8000.0 | 4.0 | 750.0 | -8000.0 | 1.000000 |
-4000.0 | 7.0 | 750.0 | -4000.0 | 1.322876 |
-2000.0 | 27.0 | 750.0 | -2000.0 | 2.598077 |
-1000.0 | 50.0 | 750.0 | -1000.0 | 3.535534 |
-500.0 | 100.0 | 750.0 | -500.0 | 5.000001 |
-200.0 | 150.0 | 750.0 | -200.0 | 6.123725 |
0.0 | 170.0 | 750.0 | 0.0 | 6.519203 |
200.0 | 190.0 | 750.0 | 200.0 | 6.892025 |
400.0 | 190.0 | 750.0 | 400.0 | 6.892025 |
600.0 | 200.0 | 750.0 | 600.0 | 7.071069 |
800.0 | 230.0 | 750.0 | 800.0 | 7.582877 |
1000.0 | 265.0 | 750.0 | 1000.0 | 8.139412 |
1200.0 | 360.0 | 750.0 | 1200.0 | 9.486834 |
1400.0 | 350.0 | 750.0 | 1400.0 | 9.354145 |
1500.0 | 425.0 | 750.0 | 1500.0 | 10.307766 |
1600.0 | 545.0 | 800.0 | 1600.0 | 12.859125 |
1700.0 | 610.0 | 875.0 | 1700.0 | 15.561633 |
1750.0 | 720.0 | 930.0 | 1750.0 | 18.525454 |
1800.0 | 900.0 | 1000.0 | 1800.0 | 23.094014 |
1870.0 | 1300.0 | 1400.0 | 1870.0 | 45.977135 |
1900.0 | 1625.0 | 2000.0 | 1900.0 | 87.770759 |
1925.0 | 1875.0 | 2600.0 | 1925.0 | 139.745823 |
1950.0 | 2516.0 | 3500.0 | 1950.0 | 252.834051 |
1975.0 | 4000.0 | 5000.0 | 1975.0 | 544.331139 |
2000.0 | 6200.0 | 7700.0 | 2000.0 | 1295.120298 |
2018.0 | 7500.0 | 10600.0 | 2018.0 | 2300.740339 |
# 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
1.6329931618554521
# 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
10.645812948447542
# 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
16.832508230603466
# 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)(ln(Y) - ln(L) - ln(\omega)) + ln(L)}{\phi} $
phi = 2
H = (Pop_df.GDP_per_Capita[-48000]**((1+phi)/phi *
Pop_df.Population[-48000]**(1/phi)))/324602.54554904939
H
1.0
np.log(11.25/1.84)/8000
0.00022632531962869185
np.log(18.9/11.25)/1500
0.00034586252894344504
np.log(46/23.1)/70
0.00984012541373353
np.log(2300/46)/148
0.026432587874514499