Skip to content

An economic analysis of countries based on their government type

Notifications You must be signed in to change notification settings

SameerShankar/Economic_Analysis

Repository files navigation

Economic_Analysis

The main problem that I wanted to solve was: what government type is the most economically advanced in terms of GDP? The information for this project was collected from country_per_cap_gdp_unemployment_gov_type_pop.csv. Since I am planning to do a double major in Economics and Statistics, I chose this data set instantly. I have done an internship at a financial advising services firm, and I saw how the programming code that they used to calculate data was similar to the manner in which code is designed in CS103. Personally, I was inspired by this, and decided to base my project on calculations involving the GDP and government types.

Furthermore, I had to make another important design choice of what form of visualization I was going to use, i.e. pie chart, bar chart, scatterplot, etc. At first I was thinking of doing a bar or line chart, however I wasn't able to come up with an image in my head for it that I was pleased with. After looking at the worked examples for Module 8, I realized that a pie chart was the most efficient way to represent my results. Pie charts are generally used to show percentages, which worked perfectly as I could show the average GDP per government type as percentages to then see which government type had the greatest slice, hence allowing me to conclude which government type is the the most economically advanced in terms of GDP. Pie charts also tend to be good for displaying data for around 6 categories or fewer. which suited my project that had 5 government types.

This project was done in multiple steps, starting off by multiplying every country's GDP per capita with their population, thus giving each country's total GDP. Then, we summed the countries' GDPs based on their government type (enumeration of 5), that is sum up the GDPs of all countries that are Constitutional monarchies (and then separately do this for each government type). Finally, we divided the total GDPs accumulated by each type of government by the number of countries that make up the respective government type, for example, divide the total GDP that Republics generate by the number of countries that are Republics (do this for each government type). This gives us the average GDP for each government type, which we then showed as a pie chart.

Personally, I found it difficult to make the actual pie chart, as I did not know how exactly to produce a pie chart, and they are not as straightforward to make as the other charts. After checking the worked examples, I tried to produce my own pie chart of average GDP per each government type. At first, I didn't know if I had to take in any other parameters to design the analyze function, since they took in multiple parameters in the worked examples, but one of the TAs was telling me that this was not necessary. Furthermore, I had issues with the layout for some of the pie charts in my project as some of the labels were showing up even though they were not meant to be there. In order to solve these issues, I consulted with a TA and they guided me regarding how to tackle these issues.

As stated above, financial firms use programs like the one that I created to do major statistical computing that produces figures which can then be used to create reports. I feel as though I could use these systematic programming design skills to make projects that do other statistical computations that would be required in my Economist and Statistics degree. For example, using this very data set, I could design a similar project that finds the average unemployment rate per government type, which is another important piece of information that many economists look at when providing an outlook for a country in general.

About

An economic analysis of countries based on their government type

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published