GDP VS EDUCATION VS ADULT MORTALITY VS PERCENTAGE EXPENDITURE; WHAT’S THE CATALYST?
Having lived in Nigeria for over a decade, it will be safe to say i have tasted both bitter and sweet times(that’s if there was any) of Nigeria economy. Wikipedia will gladly describe our economy as ‘middle-income,mixed economy and emerging market’. Based on ranking we are said to be the 27th in the world in terms of nominal GDP and 22nd largest in terms of purchasing power parity.
Well, let’s do a little time-travel to 2005 and compare our economy then to now, a lot has changed obviously with we enjoying some great moments in our economy and some horrible ones too. My project is basically about the analysis of Gross Domestic Product variations that happened in the span of 10 years, i.e 2005 -2015. GDP can be best described as the monetary value of all goods and services produced within a nation’s geographical borders over a period of time.
From my research, a lot of factors can increase/decrease a country’s GDP which i refer to as ‘catalyst of the economy’. I have narrowed this factors to three,to get an accurate model for this analysis.
- SCHOOLING/EDUCATION
If GDP could be referred as the strength of any nation’s economy, then education should be a major catalyst. The analysis of education with respect to a country’s GDP was the perfect proof of education being the major driving force. As seen in the visualization below,we could see that for every year education improved,there was a simultaneous increase in the country’s GDP. In recent times, our economy has been nothing to write home about and this all boils down to the neglect of the educational system in Nigeria. Poor education is tantamount to poor technical skills,increase in crime rate and low productivity among citizens. A deliberate effort in improving this sector will have positive impacts on our economy.
2.ADULTS MORTALITY
‘Health is wealth’ is a popular saying that won’t be fading off anytime soon. No vibrant economy can survive with half of its citizen unhealthy or having high rate of adult mortality, who then runs the economy if the major backbone of the society have very low chances of surviving?. In places where survival rate is high,there would be significant increase in the country’s GDP. Though civilization and technological innovation which are great pedestals to move an economy forward could also cause an increase in adult mortality, citing examples of poisonous emissions,non-biodegradable waste,environmental pollution etc. This can explain the brief irregularities in the visualization which are negligible. The point remains,intentional efforts made to increase citizens survival rate will go-down well with the economy.
3. PERCENTAGE EXPENDITURE.
There are two types of government spending,this includes the spending on final consumption and on gross capital formation,together they constitute one of the major components of Gross Domestic Product. So we can say the higher the spending,there will be simultaneous increase in the GDP. Major reasons for this absolute linearity can be explained with the basic knowledge of economics,which explains how proper spending will lead to circular flow of income ,hence the increase in GDP. The government is advised to inject cash and spend more within its country to improve the economy.
EXPLORATORY DATA ANALYSIS (EDA).
- The first stage of this analysis was the selection of data sets to use,which was made available by kaggle.
- Data wrangling; data sorting,data filtration,data reduction,data access and data processing was done using pandas. The jupyter notebook in the anaconda environment was used,as the data was read by pandas and aggregations such cleaning and dropping of irrelevant columns was performed.
- Data visualization was performed with the matplotlib library to check for linearity or the existence of any relationship between the variables/columns. Seaborn was also imported for better visualization of the matplotlib codes,it made the visualization appealing. An example of such visualization is the scattered plot used above.
- Model: This was done using multiple regression,looking at the data frame used,i concluded multiple regression was best fit for it, due to the existence of many independent variables. The sklearn library and statsmodels.api was imported to perform the multiple regressions,which in turn returned a summary table with its predictions. One of the measures of accuracy of predictions in multiple regression is the R-SQUARED,it ranges from 0–1 which explains numbers closer to 1 have more accuracy. The R-SQUARED of this model is 0.812,which is fair enough in any data analysis. Predicted values of each independent variable is given as ‘coef’ which in turn will be inserted in the multiple regression formula(Y = b 0 + b 1 X 1 + b 2 X 2 + … + b p X p + e). The predicted value (Y) which can also be called GDP,can be derived manually through equation or visualization.
X=df3[[‘Schooling’,’percentage expenditure’,’Adult Mortality’]]
y=df3[‘GDP’]
X=sm.add_constant(X)
result= sm.OLS(y,X).fit()
result.summary() #THESE LINES OF CODE RETURNS THE SUMMARY TABLE#. - One of the most tricky graphs to plot is that of multiple regression,this is because of the existence of more than one independent variable. Using two-dimensional graphs could make it difficult to read,hence the reason i chose 3-dimensional plot. Axes3D was imported from mpl_toolkits.mplot3d to enable the success of the plot,two independent variables was plotted against the dependent variable (yhat),the plotted values where the predicted values of the model from the summary table.
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure()
yhat =-6511.5916 - 1.1428*a + 7.6178*b + 833.8695*c
ax = fig.add_subplot(111, projection='3d')
ax.scatter(yhat,a,b)
plt.show()
SUMMARY OF THE MODEL
For proper analysis of the model and proper insights of how this analysis was extracted, here is the complete exploratory and explanatory analysis. In conclusion,insights derived from all analysis was the primary source of information used in article.
ACKNOWLEDGEMENT
This is my final project as a Data Science mentee of She Code Africa,many thanks to Ifeoma Okoh my amazing mentor for all her encouragements and the outstanding She Code Africa team for this life changing opportunity.