Skip to content

Instantly share code, notes, and snippets.

@lfortin-117
lfortin-117 / Final Project Code
Created November 15, 2016 01:55
Final Project Code - LF
#Construction and General Labor
library(readr)
library(dplyr)
library(ggplot2)
library(readr)
library(RColorBrewer)
library(ggmap)
library(maptools)
library(gtools)
@lfortin-117
lfortin-117 / Lab 7 - LF
Created October 31, 2016 20:56
Lab 7 LF
#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')
@lfortin-117
lfortin-117 / Lab 6 - LF
Created October 24, 2016 22:56
Lab 6 LF
#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()))
@lfortin-117
lfortin-117 / Lab 5 - LF
Created October 17, 2016 19:50
Lab 5 - LF
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
@lfortin-117
lfortin-117 / Lab 3
Created October 10, 2016 00:05
Lab 4 - LF
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
@lfortin-117
lfortin-117 / Lab 3 - LF
Created September 30, 2016 15:45
Lab 3
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,