# Setup
%matplotlib inline
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import plotly.plotly as py
py.sign_in('abierwagen', 'sxtaejrn9b')
Luxembourg officialy "The Grand Duchy of Luxembourg" was founded in 963 AD and gained independance in 1839. It was one of the six founding countries of the EEC (or the EU) and a member of the NATO pact. The country is located in western Europe between Frace and Germany. It is landlocked and spaning a total distance of 2,586 sq km. The terrain is mostly rolling uplands with broad shallow valleys and acces to the Moselle flood plains. The population of Luxembourg consits of 63.1% Luxembourger, 13.3% Portuguese, 4.5% French, 4.3% Italian, 2.3% German,and 7.3% other EU.
years = np.arange(1950, 2020, 5)
pop = [296000, 305000, 314000, 330000, 339000, 353000, 364000, 366000, 381000, 408000, 436000, 457000, 507000, 543000]
diff = np.diff(pop)
percent_change = np.diff(pop) / pop[:-1] * 100.
data = {'population': pd.Series(pop, index=years),
'absolute change': pd.Series(diff, index=np.arange(1955, 2020, 5)),
'percent change': pd.Series(percent_change, index=np.arange(1955, 2020, 5))}
df = pd.DataFrame(data)
df[['population', 'absolute change', 'percent change']]
x = np.arange(-10, 105, 5)
yrs = np.arange(1940, 2055, 5)
fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(years, pop, 'o-', label='Population')
ax.plot(yrs, (np.average(np.diff(pop[:-1])) / 5) * x + pop[0], label='Linear Equation')
ax.plot(yrs, pop[0] * (1 + (np.average(percent_change[:-1]) / 5) / 100) ** x, label='Exponential Equation')
ax.set_title('Population of Luxembourg')
ax.set_ylabel('Population')
ax.set_xlabel('Year')
ax.set_xticks([1940, 1950, 1960, 1970, 1980, 1990, 2000, 2010, 2020, 2030, 2040, 2050])
ax.legend(loc=2)
ax.axis('tight')
ax.grid()
plt.show()
There are no big trends that affect human population. Most people living in country are above the poverty line and employed making for no absured death rates. Population growth is about 11.75 births per 1000 people and 8.53 deaths per 1000 people, 7.97 migrations per 1000 people, 1.77 children per women. Infant mortaily rate is 4.28 deaths per 1000 live births.
It is like this because
The reasons which cause it to be like this are almost identical to the reason of the linear function
In summary, Luxembourg does not have much happening in it and there have not really been any big natural events in its history plus the country is quite small and there haven't been any life expectancy improvements recently.
I think that the exponential population function fits the best because you can't really have a linear population, there will always be an exponential factor and that it nearly predicted the 2015 population so far.
According to the exponential function the prediction for the population in 2050 is expected to be 750,000 strong.
I genuinely liked this project because it allowed me to choose which country I am studying and it allowed me to actually learn about something that I don't have any direct control over. Plus it let me learn how to make graphs and data tables using python which I have been meaning to do for some time.