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
program |
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
#Enter variables | |
titles<-c("The Waste Land", "Lord of the Flies", "Grapes of Wrath", "Pride and Prejudice", "Frankenstein", "Little Women", "Jane Eyre", "The Things they Carried", "Huckleberry Finn", "The Old Man and the Sea") | |
author<-c("Thomas Eliot", "William Golding", "John Steinbeck", "Jane Austen", "Mary Shelley", "Louisa May Alcott", "Charlotte Bronte", "Tim O'Brien", "Mark Twain", "Ernest Hemmingway") | |
pyear<-c(1922, 1954, 1939, 1813, 1818, 1868, 1847, 1990, 1884, 1952) | |
stock<-c(12, 4, 7, 1, 8, 9, 3, 2, 17, 5) | |
price<-c(5.50, 10, 12, 20, 18.50, 22, 16, 25, 8, 15) | |
#create dataframe | |
books<-data.frame(titles, author, pyear, stock, price) |
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(readr) | |
library(tidyr) | |
#enter data | |
a <- read_csv('./data/usa_00001.csv') | |
#we should remove all data from alask and hawaii | |
aa <- a %>% filter(!(YEAR < 1960 & STATEFIP %in% c(2,15))) | |
#code number for race into words using factor |
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(readr) | |
library(ggplot2) | |
library(RColorBrewer) | |
#read in data | |
a<- read_csv('./data/usa_00005.csv') | |
#remove Hawaii and Alaska and pick out those of working age | |
b<- a %>% filter(AGE>=15 & AGE<=65 & !(STATEFIP %in% c(2,15))) |
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(readr) | |
library(ggplot2) | |
library(RColorBrewer) | |
#read in data | |
a<- read_csv('./data/usa_00005.csv') | |
#remove Hawaii and Alaska and pick out those of working age | |
b<- a %>% filter(AGE>=15 & AGE<=65 & !(STATEFIP %in% c(2,15))) |
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
#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) |
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
#load library | |
library(readr) | |
library(dplyr) | |
library(ggplot) | |
library(RColorBrewer) | |
library(ggmap) | |
library(maptools) | |
library(gtools) | |
#Clear Enviornment | |
rm(list=ls()) |
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
#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())) |
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
#line graph for race for single women | |
#load libraries | |
library(readr) | |
library(dplyr) | |
library(ggplot2) | |
library(RColorBrewer) | |
library(scales) | |
#load data |
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
#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 |
OlderNewer