Data: Advanced Graphs in RStudio (ggplot2)

Data: Advanced Graphs in RStudio (ggplot2)

Background: We have moved from simple graphs to advanced graphs to visualize our datasets. In our last data assignment, I told you where to place your data fields. In this assignment, you will place the data field based on keywords in a sentence.

Assignment:

Use RStudio to generate advanced graphs (using the ggplot2 package) using the dataset below.

Use the following videos to learn the commands to produce advanced graphs in RStudio:

Video 1: RStudio – Advanced Graphs – Part 1.

Video 2: RStudio – Advanced Graphs – Part 2.

Graphs to Produce:

***** Do not forget to tell RStudio what fields are factors! *****

ggplot2 – Bar Plot: (Use dataset_price_personal_computers.csv)

  • Plot the ram sold in the computers.
  • Breakout how the computer screen sizes based on the ram.
  • Position the computer screen sizes side by side.
  • Drill down the dataset further based on premium.
  • Label the x-axis.
  • Label the y-axis.
  • Give the graph a title.
  • What story is presented in this visualization?

ggplot2 – Histogram: (Use dataset_production_of_rice_in_indonesia.csv)

  • Plot the distribution of the wages of rice production. (Use a binwidth = 5)
  • Breakout the land status of ownership.
  • Drill down the dataset further based on the varieties of rice produced.
  • Label the x-axis.
  • Label the y-axis.
  • Give the graph a title.
  • What story is presented in this visualization?

ggplot2 – Box Plot: (Use dataset_tipping_data.csv)

  • Plot the Day vs Tip of the meals.
  • Breakout the time of day.
  • Drill down the dataset further based on gender.
  • Label the x-axis.
  • Label the y-axis.
  • Give the graph a title.
  • What story is presented in this visualization?

ggplot2 – Scatter Plot: (Use dataset_edgar_anderson_iris_data.csv)

  • Plot the petal length vs petal width of the flowers.
  • Breakout the species of the flowers.
  • Drill down the dataset further based on the species.
  • Label the x-axis.
  • Label the y-axis.
  • Give the graph a title.
  • What story is presented in this visualization?

Please put all screenshots in an MS Word (other word processors are fine to use but save it in MS Word format). Don’t upload the screenshots individually in the assignment folder! Submit your assignment on or before the due date.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s