2 Import Data
We import the data into the workspace. For a higher flexibility, we convert the data into a tibble. The tibble is a structure that helps us with automatically converting the columns into a meaningful and cleaner format, which in our case, given a huge data-set, provides more benefits than a regular dataframe.
<- read_csv("/Users/andriimyronenko/Desktop/University/2 semester/Data Storytelling in Finance/Final Project/FMFM2019_seminar.csv")
data #data <- read_csv("/Users/katerynaholionko/Desktop/Uni/Data Storytelling in Finance/FMFM2019_seminar.csv")
#data <- read_csv("C:/Users/Vo Cao Tuan/Desktop/Data storytelling/Data_Seminar_2022/FMFM2019_seminar.csv")
<- as_tibble(data) data
We can check manually, whether the import was successful by taking a look at the whole data itself by following command:
::kable(
knitrhead(data[, 1:8], 10), booktabs = TRUE,
caption = "A table of the first 10 rows of the data set"
)
Enterprise Flag | Record Number | US Postal State Code | Metropolitan Statistical Area (MSA) Code | County - 2010 Census | Census Tract - 2010 Census | 2010 Census Tract - Percent Minority | 2010 Census Tract - Median Income |
---|---|---|---|---|---|---|---|
1 | 635011 | 36 | 40380 | 055 | 014203 | 21.66 | 64456 |
2 | 3140543 | 36 | 15380 | 029 | 014208 | 4.12 | 114696 |
1 | 485568 | 19 | 11180 | 169 | 010300 | 6.16 | 82969 |
1 | 1577326 | 53 | 99999 | 045 | 961200 | 11.27 | 77500 |
2 | 3333736 | 16 | 14260 | 027 | 020901 | 18.22 | 63436 |
2 | 2768127 | 45 | 17900 | 055 | 970602 | 31.51 | 43448 |
2 | 2866243 | 18 | 26900 | 059 | 410800 | 3.52 | 95699 |
2 | 3159671 | 39 | 17140 | 025 | 041406 | 4.90 | 113000 |
1 | 967893 | 04 | 38060 | 013 | 619400 | 45.16 | 48490 |
1 | 1805526 | 17 | 16980 | 111 | 871202 | 28.02 | 79701 |