This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Construction and General Labor | |
library(readr) | |
library(dplyr) | |
library(ggplot2) | |
library(readr) | |
library(RColorBrewer) | |
library(ggmap) | |
library(maptools) | |
library(gtools) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Part A For Boxplot and Line | |
library(readr) | |
library(dplyr) | |
library(ggplot2) | |
library(RColorBrewer) | |
library(scales) | |
setwd('/users/emily/dropbox/hist90_01/fall2016/labs/10_27') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Part 1 | |
library(readr) | |
library(dplyr) | |
library(ggplot2) | |
library(RColorBrewer) | |
#Reading in the data, filtering out children and creating region | |
#excluding Hawaii and Alaska before 1960, and renaming race variable | |
first <- read_csv('Lab6_4.csv', col_types = cols(HHWT = col_double(), PERWT = col_double())) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(readr) | |
library(dplyr) | |
library(ggplot2) | |
library(readr) | |
library(RColorBrewer) | |
library(ggmap) | |
library(maptools) | |
library(gtools) | |
#Loading in the blank map of the United States and plotting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(ggplot2) | |
library(readr) | |
library(RColorBrewer) | |
#Read in the IPUMS data | |
x <- read_csv('LAB4.csv') %>% filter((BPL>=500 & BPL<=502) | (MBPL>=500 & MBPL<=502) | (FBPL>=500 & FBPL<=502)) | |
#Create a vector for age category labels |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(ggplot2) | |
library(readr) | |
library(RColorBrewer) | |
x <- read_csv('LAB3.csv') %>% filter(AGE>=15 & AGE<=65 & !(STATEFIP %in% c(2,15))) | |
#Recode race variable | |
a <- x %>% mutate(RACEC= factor(ifelse (RACE==1, 1, | |
ifelse(RACE==2, 2, |