Weekly Coding Checkup 6

A Semester Project made by Custom Designed Activities

We continue working on the Dr. B & Class project. In this first part of the semester, you will apply what we learned in class in a set of tasks and scenarios. Please remember that it is important that the code that you submit is your own code and not somebody else work. It is fine to make mistakes but only by practicing in R you can get a better grasp of the software.

I also want you to try building your document as an official report for a potential company (Dreaming Diamonds LLC) for which you are getting to know and explore the diamonds dataset (e.g., spend time on storytelling, commenting results and providing insights and conclusions when possible).

Summary of this week tasks:

This week we will work on enhancing our visualizations skills. We will go beyond the basic to practice static mapping, faceting, multiple geoms and global vs local mappings. Creating beautiful visualizations is a critical data analytics skill and can lead to interesting insights. So, let’s practice what we covered this week:

• Beyond basic charts

Tip

Use the diamonds dataset to solve all the below tasks. I have subset it to 500 observations to make faster visuals

Q1a:

Write the code necessary to reproduce the chart below. (2 points)

Q1 Chart

Q1b:

Spend time to interpret your chart: What do you notice? Why is it important? Force yourself to write at least 2 insightful sentences about the above chart. (0 point)

Q2a:

Use the diamonds dataset and complete the following (3 points): a. Create a scatterplot that show the relation between the depth and table variables. b. Place depth on the x axis and table on y axis. c. Assign a different color for each diamonds cut. d. Assign a static mapping and enforce: - Shape to be equal to 18 and - Size to be equal to 4.

Tip

Use the diamonds dataset to solve all the below tasks. I have subset it to 500 observations to make faster visuals

Warning

Make sure to respect the order given in the above instructions.

Q2b:

Spend time to interpret your chart: What do you notice? Why is it important? Force yourself to write at least 2 insightful sentences about the above chart. (0 point)

Q3a:

Write the code necessary to reproduce the chart below. (3 points).

Q3 Chart

Q3b:

What do you think about this chart?(1 points)

Q4a:

Use the diamonds dataset and complete the following: a. Plot the relationship between depth (x) and carat (y) with both points and smoothing lines. b. Do not replicate the mapping. c. Make sure to assign a different color to the lines based on the clarity variable and remove the confidence intervals for the lines. (3 points).

Tip

Use the diamonds dataset to solve all the below tasks. I have subset it to 500 observations to make faster visuals

Warning

Make sure to respect the order given in the above instructions.

Q4b:

Spend time to interpret your chart: What do you notice? Why is it important? Force yourself to write at least 2 insightful sentences about the above chart. (0 point)

Q5a:

Write the code necessary to reproduce the chart below (4 points).

Q3 Chart

Q5b:

Spend time to interpret your chart: What do you notice? Why is it important? Force yourself to write at least 2 insightful sentences about the above chart.(0 point)

Q6a:

Use the diamonds dataset and complete the following: a. Create a scatterplot between the x (x) and carat (y) variables. b. Assign a blue color to all points. c. Make sure to display only the diamonds with clarity equal to VS1 or VS2. d. Facet the chart using the cut and the color variables.

Tip

Use the diamonds dataset to solve all the below tasks. I have subset it to 500 observations to make faster visuals

Warning

Make sure to respect the order given in the above instructions.

Q6b:

Spend time to interpret your chart: What do you notice? Why is it important? Force yourself to write at least 2 insightful sentences about the above chart.(0 point)

Bonus Q:

Write the code necessary to reproduce the chart below (3 points).

Tip

Please keep in mind the following when replicating the chart:

  • The points have a transparency of 0.5;

  • The purple line uses all the diamonds but those with Fair or Premium cut;

  • The chart is colorblind friendly and use a specific theme.

Bonus Q Chart

BonusQb:

Spend time to interpret your chart: What do you notice? Why is it important? Force yourself to write at least 2 insightful sentences about the above chart.(3 points)

🛑 Don’t Click Submit Just Yet 🚧

Please read carefully the below information:

  • Once you have completed all the coding questions, and you are confident in your work (take advantage of the immediate feedback feature), copy and paste your responses from the chunk into the form fields below each question.

  • You are responsible for correctly coping and pasting only the required code to solve each question. We will grade only what you have submitted!

  • We will only grade 1 submission per student so do not click Submit until you are confident in your responses.

  • By submitting this form you are certifying that you have followed the academic integrity guidelines available in the syllabus. The code and answers submitted are the results of your work and your work only!

  • Make sure you have completed all the questions and included all the required personal information (e.g., full name, email, zid) in the respective form’s fields.

  • Now you are ready to click the above “Submit” button. Congrats you have completed your weekly coding check up!!!