This is a data visualisation project which requires you to write a program to extract information from a given set of data and plot charts, so that you can visualise the data clearly and quickly.

computer science

Description

Introduction

This is a data visualisation project which requires you to write a program to extract information from a given set of data and plot charts, so that you can visualise the data clearly and quickly.

 

There are different types of charts. You can see a selection here: https://visme.co/blog/types-of-graphs/.

 

You are required to write the program using Python and the graphics library that comes with IDLE, called Turtle, to create the charts from scratch. Turtle capabilities and functions are described fully in Section 24.1 of the Python documentation, which you can access via the IDLE interactive shell by clicking Help > Python Docs and then search for “Turtle”. Turtle provides the fundamental functions required for drawing, such as plotting points, lines and shapes, and controlling their attributes such as location, colour, line thickness, and more.

 

You should study the different elements that are required in a chart, and add them to yours where appropriate. For example, a bar chart always has a pair of axes which are labelled with the type of data they represent. Each axis may have tick marks for different values, with the values written alongside. And of course, there are the actual bars, which may have different colours.

 

You should learn to use the functions in Turtle that you require for displaying the elements. There are many Turtle functions, you only need to learn the ones you require. That’s why it is necessary that you work out what you need beforehand.

 

What you and your program must do

This project is designed for you to demonstrate your computational thinking ability and your skill with Python. It requires you to produce plots from a given set of data.

 

The data for the exercise is contained in the file: “WorldPopulationData2019.txt”. This is a text file that your program needs to read. Do not edit this data file. Each line in the file contains the population data for a country, given in eight fields separated by “;”. The country name is given in the second field in the line. For a better view of what the fields represent, look at the accompanying equivalent Word file, “WorldPopulationData2019.docx” or the source website of the data http://statisticstimes.com/demographics/countries-by-population.php.

 

There is a lot more useful information you can obtain from the table than just the numbers you see, if you process them appropriately. This project requires you to do some data processing and display the outcomes, by producing a program that extracts information from the data and, where appropriate, generates plots. You are required to provide at least four operations in your program, two of which must be:

(1)    (i) List the total populations of the different continents, and

(ii)   plot a pie chart showing the percentages of these populations.

(2)    (i) List the percentage population change in 2019 compared to 2018 for the different countries, in descending order. Your output should contain the country name, the 2019 population and the percentage change.

(ii)   Plot a bar chart or a line chart showing the changes of the top n countries with a negative change in percentage terms. n is a value the user can choose, that allows the plotting of a neat chart that is not overly congested.

 

You can choose the other two operations, except for printing data in the way they are given. You can freely decide what results to produce, which may or may not be accompanied by a chart. There are many possibilities; here are a few more examples:

-          The user chooses a letter and your program lists the countries whose names start with that letter, together with their populations in 2019.

-          Which are the top n countries with the largest increase in population in 2019?



Related Questions in computer science category