In [1]:
# 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')

Booming Populations - Luxembourg

Introduction

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.

Population Pyramid

Table of data

In [2]:
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']]
Out[2]:
population absolute change percent change
1950 296000 NaN NaN
1955 305000 9000 3.040541
1960 314000 9000 2.950820
1965 330000 16000 5.095541
1970 339000 9000 2.727273
1975 353000 14000 4.129794
1980 364000 11000 3.116147
1985 366000 2000 0.549451
1990 381000 15000 4.098361
1995 408000 27000 7.086614
2000 436000 28000 6.862745
2005 457000 21000 4.816514
2010 507000 50000 10.940919
2015 543000 36000 7.100592

Graph Data

In [7]:
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.

Population Functions

  • My population semi aligns with the linear equation
  • My population also semi aligns with the exponential equation

It is like this because

  • Reason 1: because luxembourg does not have very much happening.
  • Reason 2: because there have not been any big events in luxembourg history
  • Reason 3: Since luxembourg is a relatively small country the population has not had any major changes
  • Reason 4: There hasn't been any life expectancy improvements recently.

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.

Which function fits?

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.

2050 Prediction

According to the exponential function the prediction for the population in 2050 is expected to be 750,000 strong.

Summary of my thoughts

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.