challenge_1
Matt Eckstein
railroad_2012_clean_county.csv
Author

Matt Eckstein

Published

March 1, 2023

Configuration

Code
library(tidyverse)

knitr::opts_chunk$set(echo = TRUE)

Loading the file and viewing the information in it:

Code
railroad_data <- read.csv("_data/railroad_2012_clean_county.csv")

head(railroad_data)
  state               county total_employees
1    AE                  APO               2
2    AK            ANCHORAGE               7
3    AK FAIRBANKS NORTH STAR               2
4    AK               JUNEAU               3
5    AK    MATANUSKA-SUSITNA               2
6    AK                SITKA               1
Code
summarize(railroad_data)
data frame with 0 columns and 1 row

Looking at the data

These data were likely gathered from a survey of occupations across geographies conducted by a federal agency such as the Bureau of Labor Statistics.

Each case is a county in the United States with at least one railroad worker. (The state and county columns are both essential for defining a case, since some county names occur in more than one state, and the state column is necessary for disambiguation.) The total_employees column indicates the number of railroad employees in the relevant county.