Skip to content

Instantly share code, notes, and snippets.

@morganmelon
morganmelon / Southeast Asia Immigrants and Their Kids
Created October 7, 2016 16:40
Population pyramids of immigrants from Southeast Asia and their kids 1880, 1900, 1920, 1940, 1960
#Morgan Waterman
#Lab 4
#Population Pyramids
#Load packages
library(readr)
library(dplyr)
library(ggplot2)
library(RColorBrewer)
#Morgan Waterman
#Lab 4
#Population Pyramids
#Load packages
library(readr)
library(dplyr)
library(ggplot2)
library(RColorBrewer)
@morganmelon
morganmelon / Lab 4: Population Pyramids
Created October 6, 2016 23:22
Population Pyramid for Southeast Asian Immigrants 1880-1960
#Morgan Waterman
#Lab 4
#Population Pyramids
#Load packages
library(readr)
library(dplyr)
library(ggplot2)
library(RColorBrewer)
@morganmelon
morganmelon / Lab 3 Resubmission
Created September 30, 2016 13:23
Making column graphs
#Lab3
#Morgan Waterman
#Column graphs
library(dplyr)
library(readr)
library(ggplot2)
library(RColorBrewer)
data <- read_csv('./data/Lab3Newest.csv') %>%
@morganmelon
morganmelon / Lab 3
Created September 30, 2016 13:19
Making column graphs
#Lab3
#Morgan Waterman
#Column graphs
library(dplyr)
library(readr)
library(ggplot2)
library(RColorBrewer)
data <- read_csv('./data/Lab3Newest.csv') %>%
#Lab3
#Morgan Waterman
#Column graphs
library(dplyr)
library(readr)
library(ggplot2)
library(RColorBrewer)
data <- read_csv('./data/Lab3Newest.csv') %>%
@morganmelon
morganmelon / Lab2
Created September 24, 2016 23:31
Table of population by race 1870-1940
rm(list = ls())
library(dplyr)
library(readr)
library(tidyr)
#Read in IPUMS
a <- read_csv('./data/Lab2data.csv')
aa<- a %>% filter(!(YEAR<1960 & STATEFIP %in% c(2,15)))
@morganmelon
morganmelon / Lab1.r
Created September 16, 2016 13:40
bookstore lab
#creating columns
title <- c("Morgan Waterman: A Memoir", "Unicorns: The Mystery of the Horn", "Dartmouth Guidebook", "Book Four", "Bakerberry Tales", "Mapmaking", "The Psychoanalysis of Triplets", "Running", "Trump vs. Hillary: The Migration to Canada", "Last But Not Least")
author <- c("Morgan Waterman", "Harry Potter", "Fourth Year Student", "Plane Jane", "Dr. Seuss", "Bartholomeu", "Maria Waterman", "Andie von Eschen", "Stephen Brooks", "Optimist")
ypub <- c(1996, 2020, 2018, 2000, 1964, 1490, 1995, 2002, 2016, 1999)
num <- c(7, 300, 1100, 4, 666, 1, 3, 100, 0, 10)
price <- c(0.01, 10, 99.99, 5, 25, 1000, 17, 15, 24, 1)
#creating data set
bookstore <- data.frame(title, author, ypub, num, price)