Exercise 2.2.1

Re-use the GapMinder dataset to plot, in Jupyter using Matplotlib, a scatter plot of world life expectancy against GDP per capita for 1952, 1977 and 2007. Add a title, axis labels and legend to your figure.

Find the country with the highest GDP per capita for 1952, 1977 and 2007.

Re-write the function gdp_stats_by_continent_and_year() using Pandas.

The output for the countries with highest GDP per capita should look like this, however will not be evaluated below:

    country continent  year  lifeExp     pop    gdpPercap
840  Kuwait      Asia  1952   55.565  160000  108382.3529
    country continent  year  lifeExp      pop    gdpPercap
845  Kuwait      Asia  1977   69.343  1140357  59265.47714
     country continent  year  lifeExp      pop    gdpPercap
1139  Norway    Europe  2007   80.196  4627926  49357.19017

Rewriting the function gdp_stats_by_continent_and_year() should give the following output:

Americas GDP per Capita in 1952
{'mean': 4079.0625522000005, 'median': 3048.3029, 'stdev': 3001.7275216326566}

For the sake of evaluation perform the following code:

print(gdp_stats_by_continent_and_year('Americas'))

This last command will evaluate this exercise.