Assignment 1

ECON 327

Lecture Notes Reference: Chapters 1 & 2

ECON 327代写 Clean the Excel fifile so that it is structured like a normal wide-format data frame with four variables, the date, and ···

First  ECON 327代写

Go to Statistics Canada Table 18-10-0004-01 (formerly CANSIM 326-0020) https://www150.statcan.gc.ca/t1/tbl1/en/tv.action?pid=1810000401. Download the all-items monthly Consumer Price Index for Quebec, Ontario, Alberta, and BC, January 2010 to June 2020. Calculate the 12 month inflflation rates (you will lose January 2010 to December 2010 in the process). Clean the Excel fifile so that it is structured like a normal wide-format data frame with four variables, the date, and the inflflation rate for each of the four provinces. Save it as a .csv fifile.

ECON 327代写

1.Readthe file and print the first six and last six observations.

 

2.Writea function to calculate the coefficient of variation as per equation 8 in the lec- ture notes.

 

3.Reshape the data into long format using the melt function, and rename value to be “inflation”and variable to be “province”. Print the first six observations.

 

4.Usethe aggregate function to create a table of mean, median, and coefficient of varia- tion, for the four provinces.

 

5.From the four-province inflflation data use ggplot2 to produce a time series chart with the four provincial inflflation rates plotted against Date, by modifying the code on page 42 of the notes.

 

6.Repeat#5, but this time change the geom from line to point with size 5 for all provinces but BC, and change the theme from theme_economist() to theme().

Next  ECON 327代写

Go to Statistics Canada 14-10-0023-01 (formerly CANSIM 282-0008) https://www150.statcan.gc.ca/t1/tbl1/en/cv.action?pid=1410002301. Download the annual total, all industries, both sexes, 15 yrs and over unemployment rate for Newfoundland and Labrador, Quebec, Ontario, Alberta, and BC, 2000 to 2019. Clean the Excel fifile so that it is structured like a normal wide-format data frame with six variables, the year, and the unemployment rate for each of the fifive provinces. Save it as a .CSV fifile.

7.Readthe file and print the first six and last six observations.

 

8.Createa scatterplot matrix for the unemployment rates in the five provinces.

 

9.Createside-by-side boxplots of unemployment rates in the five provinces.

 

10.Createside-by-side beanplots of unemployment rates in the five provinces.

 

ECON 327代写

 

联系客服提交作业获取报价与时间?

最快2~12小时即可完成,用技术和耐心帮助客户高效高质量完成作业.