Skip to content

Instantly share code, notes, and snippets.

@r-conway
r-conway / fig1FP.r
Last active November 15, 2016 17:02
#load libraries
library(readr)
library(dplyr)
library(ggplot2)
library(RColorBrewer)
library(scales)
#load data
a <- read_csv('data/usa_00013(1).csv',col_types=cols(PERWT=col_double()))
#load libraries
library(readr)
library(dplyr)
library(ggplot2)
library(RColorBrewer)
library(scales)
#load data
ipums <- read_csv('data/usa_00014.csv', col_types=cols(PERWT=col_double()))
#load libraries
library(readr)
library(dplyr)
library(ggplot2)
library(RColorBrewer)
library(scales)
#load data
ipums <- read_csv('data/usa_00010.csv', col_types=cols(HHWT=col_double(),PERWT=col_double()))
#load libraries
library(readr)
library(dplyr)
library(ggplot2)
library(RColorBrewer)
library(scales)
#load data
ipums <- read_csv('data/usa_00011.csv', col_types=cols(HHWT=col_double(),PERWT=col_double()))
#We want to make 2 line graphs, this one for married and one for single with lines for number of children
#load libraries
library(readr)
library(dplyr)
library(ggplot2)
library(RColorBrewer)
library(scales)
#load data
@r-conway
r-conway / fig3FP.r
Last active October 24, 2016 17:17
#We want to make 2 line graphs, one for married and this one for single with lines for number of children
#load libraries
library(readr)
library(dplyr)
library(ggplot2)
library(RColorBrewer)
library(scales)
#load data
#line graph for race for married women
#load libraries
library(readr)
library(dplyr)
library(ggplot2)
library(RColorBrewer)
library(scales)
#load data
@r-conway
r-conway / fig2A.r
Last active October 24, 2016 16:54
#line graph for race for single women
#load libraries
library(readr)
library(dplyr)
library(ggplot2)
library(RColorBrewer)
library(scales)
#load data
@r-conway
r-conway / 10.13.r
Last active October 17, 2016 17:53
#load library
library(readr)
library(dplyr)
library(ggplot)
library(RColorBrewer)
library(ggmap)
library(maptools)
library(gtools)
#Clear Enviornment
rm(list=ls())
#load packages
library(readr)
library(dplyr)
library(ggplot2)
library(RColorBrewer)
#REad in data
a <- read_csv('./data/usa_00006.csv')
#filter so we're only taking from german, austira, and hungary, both first and second generation
a2<-a%>%filter(BPL==453 | BPL==454 | BPL==450 | MBPL==453 | MBPL==454 | MBPL== 450 | FBPL==453 | FBPL==454 | FBPL==450)