Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

ETC5513

Reproducible and Collaborative Practices

Assignment 1

Assignment objectives:


• Working on a reproducible simple Rstudio project

• Produce a html report and examine different YAML themes

• Practice markdown syntax

• Practice R

• Explore R chunk options

• Create html tables and practice how to add captions

• Create simple figures


This is an INDIVIDUAL assignment.

 

Assignment description

In this assignment, you need to create a reproducible html report.  For the report, please select a data set that interest you from this webpage: Our world in data

The size of the data set is not relevant, however your data must contain at least 3 numerical variables and a character or factor variable. Your reproducible report should be created using an Rmd file in Rstudio Cloud and knitted into html. The report must knit into html without any errors and must have have all the code and code outputs displayed (unless otherwise specified).

I have created an Rstudio Cloud space for you to create a project for the assignment in this link.

The project files structure should look like this:


 

Assignment submission: Moodle

The report must be rendered into html and all the code and code outputs must be visible. Please, print the html version of the report into a pdf file using the browser and upload this

file into Moodle. In addition, download the Rstudio Cloud project into your computer as a zip folder and submit it also in Moodle.

VERYIMPORTANT:Theprintedpdfreportcannothavemorethan3pages!

Youcannotuseadatasetthathasbeenusedforotherassignmentorinanother unit.

In summary, please submit into Moodle the following:

1. You will need to submit both a zip folder of the Rstudio Cloud project containing all the files to reproduce the report and

2. Your html printed as a pdf file  (you can do that in Google Chrome or any other browsers)

 

Submission deadline

Wednesday March 30, 4:30pm  (Melbourne time).   Late  submissions will  not  be  ac- cepted.

 

Instruction for completing the assignment:

Your assignment should contain the following sections and the R code inside the R code chunks should be visible (unless otherwise specified):


Question 1: Loading libraries (3pts)

• In this section, you need to load the libraries that you are going to use. This section should be located at the top of the Rmd file.

Please do not display the R code or any messages or warnings appearing in this


Question 2: Research question (3pts)

• Describe in 2 sentences maximum a question that you would like to investigate/answer in this report using your selected data.

 

Question 3: Data set introduction (5pts)

• In this section briefly describe your data in two sentences using markdown language. You should provide a link to the location of the data inserted in the text using mark- down language.

• Also, briefly describe your variables (in no more than 3 sentences in total for all the variables).

• Create a table using the kable() function from the knitr package to report the variable names.

 

Question 4: Data set description (5pts)

Here you need to report about your data. Specifically, the size of our data set such as number of observations, variables and variable types.  Below I give you the list of things that you need to include:

• Using inline R code write a sentence describing the number of variables and observa- tions in your data set.

• In addition, create a screenshot image of your code and save it as a png file.  Upload this png file inside the “Image” folder in your Rstudio Cloud project.

Then create an R code chunk to display that figure below the sentence where you describe the number of variables in your data set. Hint: Remember that for inserting figures you can create an R code chunk and use the R command knitr::include_graphics(). Make sure you have the correct relative path to the Image folder.

• Using the function str() display the first 2 rows of the data so that you can show the type of variables that are in the data set (numeric, character/factor etc).

 

Question 5: Data summary (connected with your research question, 5pts)

For this question please remember which is the research question that you wanted to inves- tigate in Question 2!

 

• Using functions from the dplyr package select 2 of the numerical variables and one character/factor variable. Then, calculate two summary statistics ( for example mean, variance, sum etc) of the numerical variables for each of the groups in your character/- factor variable (Hint: You can use group_by() and summarise from the dplyr package). Display only the first 10 rows (or less) of the results on a table using the kable() function from the knitr package.

• Using some of the available options inside the kable() function add a caption for the table. Remember that if you need to investigate the arguments of an R function, you can write ?kable in the R console to see the function help file.

• Describe in two sentences what you observe from the data summary and write one of the words in the sentence using bold font.

 

Question 6: Visualizations (connected with your research question, 5pts)

•  Create  1 figure of your  data  and  add  a  caption  using the relevant options  inside the R code chunk.   Create the figure using the ggplot2  R package and the option geom_point().

• Using markdown language, add a list with two bullet points describing what you see in the figure using italic font.

 

Marking rubric

In addition to the points for each section as described above, you will be graded on your:

•  Report template (3pts)

•  Spelling and grammar (5pts)

•  R code style (5pts)

•  Adequate usage of R code chunk options (5pts)

• Report quality (Are the different sections in the report connected and aligned with the research question you propose to investigate?) (10pts)