worksheet-7.R 318 Bytes
Newer Older
Zheng Liu's avatar
Zheng Liu committed
1 2 3 4 5 6 7 8 9 10 11 12 13
library(readr)
library(dplyr)

# read in data
cty_to_cty <- readr::read_csv('data/cty-to-cty_clean.csv')

state_movers <- cty_to_cty %>% group_by(current_state) %>%
  summarise(sum_new_movers = sum(movers_state_est, na.rm = TRUE)) %>% 
  arrange(sum_new_movers)


# pretend this takes a really long time!
Sys.sleep(10)