ITS836 Assignment 1: Abstracts Analysis in R
1) Read the assets dataset, “zipIncomeAssignment.csv”, into R. (You can acquisition the csv book in iLearn beneath the Content -> Week 2 folder.)
2) Change the cavalcade names of your abstracts anatomy so that zcta becomes zipCode and meanhouseholdincome becomes income.
3) Analyze the arbitrary of your data. What are the beggarly and boilerplate boilerplate incomes?
4) Artifice a besprinkle artifice of the data. Although this blueprint is not too informative, do you see any outlier values? If so, what are they?
5) In adjustment to omit outliers, actualize a subset of the abstracts so that:
$7,000 < assets < $200,000 (or in R syntax , assets > 7000 & assets < 200000)
6) What’s your new mean?
7) Actualize a simple box artifice of your data. Be abiding to add a appellation and characterization the axes.
HINT: Take a attending at: https://www.tutorialspoint.com/r/r_boxplots.htm (specifically, Creating the Boxplot.) Instead of “mpg ~ cyl”, you appetite to use “income ~ zipCode”.
In the box artifice you created, apprehension that all of the assets abstracts is pushed appear the basal of the blueprint because best boilerplate incomes tend to be low. Actualize a new box artifice area the y-axis uses a log scale. Be abiding to add a appellation and characterization the axes. For the abutting 2 questions, use the ggplot library in R, which enables you to actualize graphs with several altered types of plots layered over anniversary other.
8) Make a ggplot that consists of aloof a besprinkle artifice application the action geom_point() with position = “jitter” so that the abstracts credibility are aggregate by zip code. Be abiding to use ggplot’s action for demography the log10 of the y-axis data. (Hint: for geom_point, accept alpha=0.2).
9) Actualize a new ggplot by abacus a box artifice band to your antecedent graph. To do this, add the ggplot action geom_boxplot(). Also, add blush to the besprinkle artifice so that abstracts credibility amid altered zip codes are altered colors. Be abiding to characterization the axes and add a appellation to the graph. (Hint: for geom_boxplot, accept alpha=0.1 and outlier.size=0).
10) What can you achieve from this abstracts analysis/visualization?
Order a unique copy of this paper