Exercises for Class 2 (week 2)
The main objectives of this week's class are
- To practice downloading data from websites into Excel
- To develop basic spreadsheet management skills
- To be able to create simply bar-graphs, timeplots and scatterplots for the purposes of presenting numerical data
Ex. 2.1 Go to the Biz/ed site ( click on Data and then choose Office for National Statistics (ONS). Next click on Sample Data Available. Collect data from the section on the Balance of Payments: current account balance (series HBOP), downloading in CSV format. Then collect data from the section on Economic Output: GDP index at current prices (series YBEU). Generate a scatterplot of the current trade balance (exports – imports) against GDP. A suggested solution can be found here
Ex. 2.2 Another resource accessible through the Biz/ed site is the Penn World Data set. This is a bit out of date in some respects but can still be very instructive. Go back to the Data section of the Biz/ed site and click on Penn World Data. Read the section on Getting to Know the PWD. Then work through task 2, specifying years 1980 to 2000 and a selection of 3 countries (for example, Argentina, Belgium and Canada) to get data on two variables, namely Real GDP per capita in constant prices, chain series (RGDPCH) and Consumption share of CGDP (C). Once you have viewed the data in HTML format and are happy that you have the right info, submit a request to download the data in Comma Separated format (CSV). Then open this file in Excel. You will be prompted for details about the data format (i.e. the text import wizard will open). Make sure the Delimited format is specified and then click on Next. On the next screen you need to switch the delimiter from Tab to Comma. The preview screen should then indicate that the data are OK (i.e. the variables are separated by column breaks) and then you can proceed. Once the data has been successfully imported:
- Create a simple bar-graph of GDP per capita against country
- Plot a graph of the real consumption share of GDP against time, using a line for each of your countries.
Suggested solutions arehere
Ex. 2.3 Access the World Development Indicators Data on GDP per capita and life expectancy at birth for a sample of 50 countries for the year 1998 by clicking here. Rearrange the data so that you can construct a scatterplot (with a trend line) to show the relationship between the two variables. Your answer should look something similar to this. Note that (a) I have deleted all the countries with missing GDP from the chart and (b) I have fitted a non-linear “logarithmic” trend line to the data, as this appears to fit more accurately than a linear trend line.
Ex. 2.4 (Only if time permits) Again using the Biz/Ed site, go to Office for national Statistics, this time choosing Alcoholic drinks (monthly data) Assuming only Beer, Cider and the two types of Wine are consumed, form two Pi charts for January 1991 and January 2004 to compare consumption patterns. Suggested solutions are here