Question: Question 2 ( 3 0 points ) : Please read the data set below and then answer each questions. you have to use pipelines for

Question 2(30 points):
Please read the data set below and then answer each questions. you have to use pipelines for this question.
Here is the data set about chocolates.
i. Read the data set provided in the above URL and assign the name as chocolate. Print the first 6 rows. Examine the structure of the data and comment shortly.
ii. Using the some specific command with pipe-operator, convert all the characters in your data set into factors.
iii. Obtain some statistics such as mean, standard deviation, median and range of rating values with respect to different company locations. Print only the first 10 observations. Comment some specific statistics shortly from the output.
iv. Find the chocolates that its review date is equal to 2020 and country of bean origin is equal to Colombia.
v. Take the mean of chocolate rating and cocoa percent according to the company location.
vi. Select company manufacturer, company location and country of bean origin shortly. Print the first 10 rows of the data frame. (Hint: Please check the column names)
vii. Filter that company location in Switzerland whose rating between 3.25 and 3.5. Take the five observations.
viii. What is the mean of the rating column for each company locations find and order by descending.
ix. Count that how many observations are assigned Bonnat for each country of bean origin?
v. Using mutate() function create a new column called Rating Percantage, which is percentage version of the rating column. For instance if the rating is 4, then percentage of it is 100. If the rating is 3.5, their percentage is 87,5. After that create another new column called Class, if Rating Percantage is less than 25 then called Class as Low, if its between 25 and 50 called as Medium, if its between 50 and 87,5 called as Tasty and if its bigger than 87,5 called as Excellent.

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 Programming Questions!