In [ ]:

population.where('time', are.between(1800, 2006)).drop('geo').group('time', sum).plot(0)

Make a function stats_for_year that takes a year and returns a table of statistics. The table it returns should have four

columns: geo, population_total, children_per_woman_total_fertility,

and child_mortality_under_5_per_1000_born. Each row should contain one Alpha-3

country code and three statistics: population, fertility rate, and child mortality for that year from

the population, fertility and child_mortality tables. Only include rows for which all

three statistics are available for the country and year.

In addition, restrict the result to country codes that appears in big_50, an array of the 50 most populous countries in 2010. This restriction will speed up computations later in the project.

In [ ]:

# We first make population table that only includes the

# 50 countries with the largest 2010 populations. We focus on

# these 50 countries only so that plotting later will run faster.

big_50 = population.where('time', 2010).sort(2, descending=True).take(np.arange(50)).column('geo')

population_of_big_50 = population.where('time', are.above(1959)).where('geo', are.contained_in(big_50))

def stats_for_year(year):

"""Return a table of the stats for each country that year."""

p = population_of_big_50.where('time', year).drop('time')

f = fertility.where('time', year).drop('time')

c = child_mortality.where('time', year).drop('time')

...

Try calling your function stats_for_year on any year between 1960 and 2010 in the cell below.

Try to understand the output of stats_for_year.

In [ ]:

...

In [ ]:

### Recently Asked Questions

- Which of these is not an advantage granted by bipedalism? A)Reaching food that's up high. B)Cooling off in the wind and reducing exposure to the sun.

- A florist currently sells 45500 bouquets per year at a cost of 7 dollars each. In the previous year when they raised the price to 14 dollars, they only sold

- According to lecture, in what environment did bipedal locomotion appear? A)riverside jumbles B)savannah mosaic C)forest grids D)desert complexes E)swampy