Draw a flowchart that presents the steps of the algorithm

Assignment Help Python Programming
Reference no: EM132310155

Task

In this assignment, you will perform some basic data analysis on a dataset obtained from Gapminder project. Gapminder collects authentic facts and statistics of all countries worldwide and then plots the data in easy to understand visualization tools.

You have been provided a dataset file Emissions.csv which contains CO2 emissions data extracted from a Gapminder dataset. Download Emissions.txt file from the unit Interact site. The file contains comma-separated data of annual CO2 emissions (per capita) from 195 countries for a period of 1997 to 2010. CO2 emissions are measured in metric tones. It is a plain text file as shown in screenshot below. First line contains data headers, and then each line contains data for one country. To clearly understand data structure, you can also open the csv file in a spreadsheet software.

Your program will read this data file and perform the following jobs:

(1) Read all the data from file and save it into a Python dictionary. Each key in the dictionary should be a country name as read from the file, and value of that key will be a Python list containing emission data for that specific country. Once all the file is read, dictionary will contain 195 keys Each key will correspond to a Python list containing 14 numbers (emission data from 1996 to 2010). You should use this dictionary for the next three jobs.

(2) Calculate worldwide statistics (min, max, average) for a user-selected year.

(3) Extract data for up to three user-selected country and save it to a new file Emissions_subset.csv. New file should have exactly same format as the source file, i.e. first line of headers and then up to 3 lines for selected countries. See the sample-run below for an example.

(4) Plot the emissions data from a user-selected country. You should use Python plotting library matplotlib for drawing the plots. The links below contain examples on how to draw simple plots using this library.

Important: Other than matplotlib, you CAN NOT use any other Python library (pandas, numpy etc.) for this assignment. Only use Python built in functions.

Your program should be able handle invalid inputs and errors such as

• File Emissions.csv does not exist or can't be read
• Output file can't be saved
• Incorrect Year provided by user
• Incorrect country name provided by user

A sample run of the program is given below to clearly demonstrate all the requirements. Take a note of two things (1) Emission statistics are displayed in 6 decimal places. (2) User-input country names should be case insensitive.

Task 1

Draw a flowchart that presents the steps of the algorithm required to perform the task specified. You can draw the flowcharts with a pen/pencil on a piece of paper and scan it for submission. Please ensure that the scanned file and your handwriting are clear and legible. However, it is preferable to draw flowcharts using a drawing software. Here are links to some free drawing tools

Task 2

Select three sets of test data that will demonstrate the 'normal' operation of your program; that is, test data that will demonstrate what happens when a VALID input is entered. Select two sets of test data that will demonstrate the 'abnormal' operation of your program.

Set it out in a tabular form as follows. It is important that the output listings (i.e., screenshots) are not edited in any way.

Attachment:- Assignment.zip

Reference no: EM132310155

Questions Cloud

How the security principles help to prevent botnet attacks : Discuss how the security principles that we learned this week Diversity and Commonality can help to prevent Botnet attacks against EnergyA.
What can the manager do to reduce costs : a. What can the manager do to reduce these costs in the upcoming months?
What you learned about that section : Review one of the 50 subject areas that interest you and drill down to one of the sub-sections and give a synopsis of what you learned about that section.
Major categories of grievances : Define and explain the differences between the 3 major categories of grievances?
Draw a flowchart that presents the steps of the algorithm : Perform some basic data analysis on a dataset obtained from Gapminder project. Gapminder collects authentic facts and statistics of all countries worldwide
Accounting crucial for effective management decision making : Describe five fundamental principle of Accounting crucial for effective management decision making.
Language in business presentations : Discuss ways to improve your use of language in business presentations.
Differentiate between leadership and management roles : Differentiate between leadership and management roles and provide examples.
Identify possible network infrastructure vulnerabilities : Identify possible network infrastructure vulnerabilities. Address network vulnerabilities with the appropriate security measures. Ensure that consideration.

Reviews

Write a Review

Python Programming Questions & Answers

  Write python program isosceles tri equilateral tri rectangle

Write python program Isosceles Tri Equilateral Tri Rectangle, Write another "driver" script called project1.py which imports the polygon.py module, reads an input file of polygonal data and writes another file of areas and perimeters.

  Write a python program that starts from the starting state

Task consists of programming a Python implementation of a solver for the Desert Crossing Task - write a Python program that starts from the starting state.

  Assume an n × n matrix a is given

Assume an n × n matrix A is given, containing only 1's and 0's, such that, in each row, all 1's come before all 0's. Give an O(n log n) algorithm to count all 1's in A.

  Create program that allows user to interactively check out

ITECH1400 – Foundations of Programming - Create a computer program that allows a user to interactively check out a number of products, then provides

  Compare programming with python and programming with scratch

Compare programming with python and programming with scratch. Describe the same program you might create in both programming languages.

  How education records are protected

Discuss the similarities and the differences in how education records are protected compared to how health information records are protected.

  The block of statements below the line of stars

The block of statements below the line of stars is where I need help correcting. The true line that needs to be corrected is p = add((getX(k),getY(r))), it needs to give points of the path using the block of information. I have somthing which I kn..

  Develop a script containing three new methods

"Object-Oriented Programming," of Introduction to Computing and Programming in Python, a Turtle is an object from the class Turtle with the following features.

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Modify the caesar cipher program you completed

In this project, you will be modifying the Caesar Cipher program you completed earlier in the semester.

  What is the difference between a for loop and a while loop

Explain how to use built-in functions, functions from module, and user-defined functions. What is the difference between a for loop and a while loop? What is the difference between elif and if-else?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd