Question
How can I generate a population growth tables for US and Russia for the years 1980 onward from the data in population.json? The program must
How can I generate a population growth tables for US and Russia for the years 1980 onward from the data in population.json?
The program must produce tabular output and the program should list one table followed by the other. The columns are year, and population (in thousands), I'm going to add a third one later.
Where in this case, the first element is 1980 and the last element is 2015. I cannot hard code the dates. I need to retrieve the first and last elements in the list irrespective of the dates. There are three parts to this program:
1. The first part (cell) reads and converts population.json into a list of dictionary entries called pop (or whatever name you chose). To confirm that you converted the json correctly, print the first element of the list.
2. The second part (cell) builds two new lists from pop, usa_pop and russia_pop. In this case, I need to select only dictionary elements for "United States of America' or 'Russian Federation'. I also need to select only dictionary entries where the year is greater than 1979.
Link below to population.json:
https://s3.us-east-1.amazonaws.com/blackboard.learn.xythos.prod/5a333e152baa2/3640839?response-content-disposition=inline%3B%20filename%2A%3DUTF-8%27%27population.json&response-content-type=application%2Fjson&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20200421T222155Z&X-Amz-SignedHeaders=host&X-Amz-Expires=21600&X-Amz-Credential=AKIAIL7WQYDOOHAZJGWQ%2F20200421%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=037b42c3f1694f5537ab1257408ab93eb971d42939db3d13c226081ce9e0d880
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started