Question: This is an assignment need written by language R. The requirement and needed file is upload to the google drive. It contains a csv file

This is an assignment need written by language R. The requirement and needed file is upload to the google drive.

It contains a csv file and requirement file.

I put the content of requirement file here avoid you guys cannot open it.

This is the google drive address (https://drive.google.com/open?id=1Wzc6LYteK2XSPZZPaaFVIfmL-3j3lg0M)

Sorry, I do not know how to upload file on this website

The assignment Content:

For this assignment you will work with a .csv data-set. Your goal is to read it in, wrangle it, produce some plotting, in order to demonstrate that you are able to use the functions, plotting, and markdown format we have been learning.

You shall hand in your work as a jupyter-lab R notebook comprehending the code, the plots and, very important, enough comments and explanations for us to understand what you did, how you did it, and why you did it. Remember: no comments, no marks. You can either modify this notebook or write a new one from scratch.

The first thing you may want to do is to load tidyverse:

In [library(tidyverse)]:

 

Do use the tidyverse syntax I introduced in class and labs. If in doubt, refresh the lab material 1 to 4.

Task (a): import (15 marks)

Import the BikeSharing.csv dataset into R as a dataframe (we'll call it bike_df, but you can call it what you want). Then perform the routine checks about the types of the columns, the missing values, and output a quick summary of the dataset.

hint useful functions: read_csv(), glimpse() hint useful libraries: tidyverse, readr, skimr, vis_dat

In [2]:

# your answer here

Task (b): working on rows (15 marks)

Working on bike_df, show that you can operate on rows: arranging them, getting the top _n_ according to some variable, filtering them (eventually using your own functions).

hint useful functions: arrange(), top_n(), filter() hint to define a function: myfunction <- function(myargument,anotherargument) { bodyofthefunction }

In [2]:

# your answer here

Task (c): working on columns (15 marks)

Working on bike_df, show that you can operate on columns: selecting some of them, dropping other, renaming them, reordering them, ...

hint useful functions: select(), rename(), ...

In [2]:

# your answer here

Task (d): groups and not (15 marks)

Working on bike_df, show that you can produce new variables (columns) and modify existing one; show also that you can operate on the dataframe as a whole and on groups. See Readme.txt to get an understanding of the variable scaling applied.

hint useful functions: mutate(), group_by(), summarise(), tally(), ...

In [3]:

# your answer here

Task (e): wide, long, tidy (15 marks)

Show that you can go back and forth between the long and the wide format of a dataframe; produce a tidy version of bike_df (or explain why you think that the original one is tidy).

hint useful functions: spread(), gather(), na.omit(), ...

In [5]:

# your answer here

Task (f): plot (15 marks)

Produce a graphical representation of the data in bike_df or of some of the data in bike_df. You can try a box plot, line plot, or scatter plot. Make sure you label the plots with titles, and axis labels. Focusing on variable cnt, and how it varies through time, weather, temp, hum, wind-speed.

hint useful functions: ggplot(), ylab(), xlab(), geom_...(), aes(), ...

In [6]:

# your answer here

Comment, explain and present the work in a clear way (10 marks)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!