Code
library(tidyverse)
::opts_chunk$set(echo = TRUE) knitr
Karla Barrett-Dexter
December 4, 2022
#Changed column names for ease of understanding
MillenialMigration <- MillenialMigration %>%
rename(Origin_Zone = o_cz,
Origin_City = o_cz_name,
Origin_State = o_state_name,
Dest_Zone = d_cz,
Dest_City = d_cz_name,
Dest_State = d_state_name,
N_from_Origin_LivingIn_Destination = n,
N_from_Origin = n_tot_o,
N_from_Dest = n_tot_d,
Race_ParentalIncome = pool)
Error in rename(., Origin_Zone = o_cz, Origin_City = o_cz_name, Origin_State = o_state_name, : object 'MillenialMigration' not found
Error in eval(expr, envir, enclos): object 'MillenialMigration' not found
This dataset show migrations patterns for people born between the years 1984 and 1992. I found the dataset through data-is-plural.com, which led me to migrationpatterns.org, where I downloaded the data from. The data was orginally taken from the US Census, tax, and HUD information. The origin zone, city, and state is the location of an individual at age 16 and the destination commute zone, city, and state is the location of an individual at age 26. The dataset also includes information on race/ethnicity and parental income.
Questions:
It is still unclear to me how the commuting zones were established and what the parameters are, I will continue to try to figure that out.
I would like to separate the race/ethnicity information from the parental income information, they are currently linked in the same column and I will try to figure out how to separate them. Once separated, I think it will be interested to see if any patterns related to race or ethnicity arise (e.g. do higher income people migrate more?).
Another question I am interested in related to race is if people of color are migrating into or out of states that are predominately white (e.g. Maine, where I live)
I will also look into which states had the most people leave and/or the most people enter
---
title: "HW2"
author: "Karla Barrett-Dexter"
desription: "Millenial Migration Patterns"
date: "12/04/2022"
format:
html:
toc: true
code-fold: true
code-copy: true
code-tools: true
df-print: paged
categories:
- hw2
- Karla Barrett-Dexter
- Millenial Migration Data
---
```{r}
#| label: setup
#| warning: false
library(tidyverse)
knitr::opts_chunk$set(echo = TRUE)
```
## Read in the data
```{r}
<<<<<<< HEAD
MillenialMigration <- read_csv("_data/od.csv")
=======
MillenialMigration <- read_csv(posts/"od.csv")
>>>>>>> ef59858e94e14326835a9b920407f883ee3affb6
MillenialMigration
```
## Tidy Data
```{r}
#Changed column names for ease of understanding
MillenialMigration <- MillenialMigration %>%
rename(Origin_Zone = o_cz,
Origin_City = o_cz_name,
Origin_State = o_state_name,
Dest_Zone = d_cz,
Dest_City = d_cz_name,
Dest_State = d_state_name,
N_from_Origin_LivingIn_Destination = n,
N_from_Origin = n_tot_o,
N_from_Dest = n_tot_d,
Race_ParentalIncome = pool)
MillenialMigration
```
## Narrative
This dataset show migrations patterns for people born between the years 1984 and 1992. I found the dataset through data-is-plural.com, which led me to migrationpatterns.org, where I downloaded the data from. The data was orginally taken from the US Census, tax, and HUD information. The origin zone, city, and state is the location of an individual at age 16 and the destination commute zone, city, and state is the location of an individual at age 26. The dataset also includes information on race/ethnicity and parental income.
## Potential Research Questions
Questions:
- It is still unclear to me how the commuting zones were established and what the parameters are, I will continue to try to figure that out.
- I would like to separate the race/ethnicity information from the parental income information, they are currently linked in the same column and I will try to figure out how to separate them. Once separated, I think it will be interested to see if any patterns related to race or ethnicity arise (e.g. do higher income people migrate more?).
- Another question I am interested in related to race is if people of color are migrating into or out of states that are predominately white (e.g. Maine, where I live)
- I will also look into which states had the most people leave and/or the most people enter