HW2 - Reading in data and dplyr practice
knitr::opts_chunk$set(echo = TRUE)
library(tidyverse)
library(readr)
library(dplyr)
library(ggplot2)
railroad_2012_clean_county_tidy <- read_csv(".//./railroad_2012_clean_county_tidy.csv")
dim(railroad_2012_clean_county_tidy)
[1] 2930 3
#Filter out counties with less than 100 employees and list from highest to lowest
railroad_2012_clean_county_tidy %>%
filter(total_employees > 100) %>%
arrange(desc(total_employees))
# A tibble: 530 x 3
state county total_employees
<chr> <chr> <dbl>
1 IL COOK 8207
2 TX TARRANT 4235
3 NE DOUGLAS 3797
4 NY SUFFOLK 3685
5 VA INDEPENDENT CITY 3249
6 FL DUVAL 3073
7 CA SAN BERNARDINO 2888
8 CA LOS ANGELES 2545
9 TX HARRIS 2535
10 NE LINCOLN 2289
# … with 520 more rows
```{.r .distill-force-highlighting-css}
Text and figures are licensed under Creative Commons Attribution CC BY-NC 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".
For attribution, please cite this work as
Wilson (2022, Feb. 9). Data Analytics and Computational Social Science: Homework2_Wilson. Retrieved from https://github.com/DACSS/dacss_course_website/posts/httpsrpubscomtcwilso3hw2dacss601/
BibTeX citation
@misc{wilson2022homework2_wilson, author = {Wilson, Thomas}, title = {Data Analytics and Computational Social Science: Homework2_Wilson}, url = {https://github.com/DACSS/dacss_course_website/posts/httpsrpubscomtcwilso3hw2dacss601/}, year = {2022} }