Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Instruction You will create an application that consumes the World Population API and allows individuals to view a list of countries. The Show method of

Instruction

You will create an application that consumes the World Population API and allows individuals to view a list of countries. The Show method of each Country should display the age distribution of the population of the selected country for the current year.

I have created a new Rails application called worldpopulation. This application will have one (and only one!) model: Country. Scaffold it according to the following diagram:

Question

In the index method for Country, check to see if there are any Country objects currently stored in the database. IF NOT, query the API and create a new Country object for each country returned from the service. (HINT: write a CLASS METHOD in the Country model that contains the code to execute the query and update the database.)

Link to World Population API http://api.population.io/#!/countries/listCountries

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions

Question

How do you react to anger from others?

Answered: 1 week ago

Question

What additional visualizations might you include on your dashboard?

Answered: 1 week ago

Question

Which month and year had the highest sales amount?

Answered: 1 week ago