# 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…

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

## Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
\$26
The price is based on these factors:
Number of pages
Urgency
Basic features
• Free title page and bibliography
• Unlimited revisions
• Plagiarism-free guarantee
• Money-back guarantee
On-demand options
• Writer’s samples
• Part-by-part delivery
• Overnight delivery
• Copies of used sources
Paper format
• 275 words per page
• 12 pt Arial/Times New Roman
• Double line spacing
• Any citation style (APA, MLA, Chicago/Turabian, Harvard)

# Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

### Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

### Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

### Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.