Exercise 3: Graphs

By Kristen Sosulski

Solve The Tasks In Order To Get Hands On The Concepts
What is the exercise about?

The exercise presents few tasks based on Graphs. Solve these 5 tasks and brush up your concepts with practical exposure to R. All the best!

Task 1: Getting to know the data

a. Import the data named “movies2014.csv”
b. View the data
c. Look at columns name
d. Look at dimensions of data (rows and columns)

Task 2: Scatter plots

a. Create scatter plot of Tickets Sold and Gross (Is the end expected?)
b. Recreate scatter plot, adjusting scales, divide by 1000
c. Recreate scatter plot, adjusting scales, divide by 100,000
d. Recreate scatter plot, adjusting scales, divide by 1,000,000

Task 3:

What is the correlation between tickets sold and sales? Is this expected?

Task 4: Scatter plots with lines

a. Create scatter plot with millions scale, add a regression line
b. Add label to x and y axis, add plot title label

Task 5: Other plots

a. Create boxplot
b. Create boxplot – horizontal
c. Create histogram for type of films
d. Create histogram of gross sales. How bins are shown by default?
e. Create histograms of gross sales with 10 bins
f. Create histogram of ticket sales. Try different bi numbers
g. Create histogram of different ticket sales (use million unit). Add frequency count to top of bars, add titles
h. Create barplot of genre