Variable descriptions:

Congressional_District: Two digit state or U.S. territory and district number

NAICS_Decription: County Business Patterns two digit NAICS industry code description

Employment: Estimated number of employees

Use the R scripts in the file folder of the course website as a reference for this homework.

Your final document should be a pdf, doc, or docx file knitted using RMarkdown. The file should be uploaded to this assignment on the course website. Your document should also include a link to an html version of your document that is published to RPubs.com.

In answering each of the following questions please include a) the question as a header in your Rmarkdown report, b) then include the raw code that you used to generate any tables, and c) the top ten rows of the resulting tibble dataframe (do not include more than ten rows for any table in your report).

Use tidyverse functions to answer the following questions:

1) Which district has the most jobs in construction?

library(tidyverse)
## ── Attaching packages ──────────────────────────────────────────────── tidyverse 1.2.1 ──
## ✔ ggplot2 2.2.1.9000     ✔ purrr   0.2.4     
## ✔ tibble  1.4.2          ✔ dplyr   0.7.4     
## ✔ tidyr   0.7.2          ✔ stringr 1.2.0     
## ✔ readr   1.1.1          ✔ forcats 0.2.0
## Warning: package 'tibble' was built under R version 3.4.3
## ── Conflicts ─────────────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
ECD<-read.csv("Data/Employment_by_Congressional_District.csv")
ECD_Construction<-filter(ECD,NAICS_Decription=="Construction")
ECD_Construction_max<-arrange(ECD_Construction,desc(Employment))
ECD_Construction_max[1, ]
##   Congressional_District NAICS_Decription Employment
## 1                   LA 6     Construction      58288

2) Find the congressional district that you currently live in using the following website: https://www.govtrack.us/congress/members/map. What industry categories have the highest and lowest employment in your district?

ECD_home<-filter(ECD,Congressional_District=="NY 13")
head(ECD_home,10)
##    Congressional_District                           NAICS_Decription
## 1                   NY 13 Agriculture, forestry, fishing and hunting
## 2                   NY 13                                  Utilities
## 3                   NY 13                               Construction
## 4                   NY 13                              Manufacturing
## 5                   NY 13                            Wholesale trade
## 6                   NY 13                               Retail trade
## 7                   NY 13             Transportation and warehousing
## 8                   NY 13                                Information
## 9                   NY 13                      Finance and insurance
## 10                  NY 13         Real estate and rental and leasing
##    Employment
## 1           0
## 2           0
## 3        1928
## 4         456
## 5         703
## 6       14894
## 7        1000
## 8        1984
## 9        1650
## 10       5201
ECD_home_max<-arrange(ECD_home,desc(Employment))
head(ECD_home_max,10)
##    Congressional_District                              NAICS_Decription
## 1                   NY 13             Health care and social assistance
## 2                   NY 13                          Educational services
## 3                   NY 13                                  Retail trade
## 4                   NY 13               Accommodation and food services
## 5                   NY 13 Other services (except public administration)
## 6                   NY 13            Real estate and rental and leasing
## 7                   NY 13          Administrative and support and waste
## 8                   NY 13       Professional, scientific, and technical
## 9                   NY 13           Arts, entertainment, and recreation
## 10                  NY 13                                   Information
##    Employment
## 1       71275
## 2       16408
## 3       14894
## 4       10860
## 5        6769
## 6        5201
## 7        3149
## 8        2785
## 9        2118
## 10       1984
ECD_home_max[1,2]
## [1] Health care and social assistance
## 20 Levels: Accommodation and food services ...
ECD_home_max[18,2]
## [1] Agriculture, forestry, fishing and hunting
## 20 Levels: Accommodation and food services ...

3) Rename the variable “Congressional_District” to “CD”

ECD_CD<-rename(ECD, CD=Congressional_District)
head(ECD_CD,10)
##      CD                              NAICS_Decription Employment
## 1  AK 1    Agriculture, forestry, fishing and hunting        819
## 2  AK 1 Mining, quarrying, and oil and gas extraction      13566
## 3  AK 1                                     Utilities       2081
## 4  AK 1                                  Construction      18581
## 5  AK 1                                 Manufacturing      12294
## 6  AK 1                               Wholesale trade       9125
## 7  AK 1                                  Retail trade      35221
## 8  AK 1                Transportation and warehousing      18736
## 9  AK 1                                   Information       6711
## 10 AK 1                         Finance and insurance       7340

4) Use this variable to create two variables that are called “state” and “congressional district”. (hint:separate by splitting the CD variable into two variables, one for two digit state codes and one with district numbers)

library(stringr)
ECD_separate<-separate(ECD_CD,CD,into=c("state","congressional district"),sep=" ")
head(ECD_separate,10)
##    state congressional district
## 1     AK                      1
## 2     AK                      1
## 3     AK                      1
## 4     AK                      1
## 5     AK                      1
## 6     AK                      1
## 7     AK                      1
## 8     AK                      1
## 9     AK                      1
## 10    AK                      1
##                                 NAICS_Decription Employment
## 1     Agriculture, forestry, fishing and hunting        819
## 2  Mining, quarrying, and oil and gas extraction      13566
## 3                                      Utilities       2081
## 4                                   Construction      18581
## 5                                  Manufacturing      12294
## 6                                Wholesale trade       9125
## 7                                   Retail trade      35221
## 8                 Transportation and warehousing      18736
## 9                                    Information       6711
## 10                         Finance and insurance       7340

5) Unite these two variables back into a single variable called “CD_united”

ECD_unite<-ECD_separate %>% unite("CD_united","state","congressional district",sep = " ")
head(ECD_unite,10)
##    CD_united                              NAICS_Decription Employment
## 1       AK 1    Agriculture, forestry, fishing and hunting        819
## 2       AK 1 Mining, quarrying, and oil and gas extraction      13566
## 3       AK 1                                     Utilities       2081
## 4       AK 1                                  Construction      18581
## 5       AK 1                                 Manufacturing      12294
## 6       AK 1                               Wholesale trade       9125
## 7       AK 1                                  Retail trade      35221
## 8       AK 1                Transportation and warehousing      18736
## 9       AK 1                                   Information       6711
## 10      AK 1                         Finance and insurance       7340

6) Create two new datasets. 1) a new dataset from the original dataset that includes all data except the Employment variable (be sure to give this dataset a new name). 2) a new dataset from the original dataset that only includes Congressional districts and Employment. 3) add a new column to both datasets called “mergeid” that includes a sequence of numbers beginning with a 1 in the first row of the data and ending with 8722 in the last row of the data (hint:“df1$mergeid<-seq(1,8722,1)”)

ECD_CD_NAICS<- ECD %>% select(Congressional_District,NAICS_Decription)
head(ECD_CD_NAICS,10)
##    Congressional_District                              NAICS_Decription
## 1                    AK 1    Agriculture, forestry, fishing and hunting
## 2                    AK 1 Mining, quarrying, and oil and gas extraction
## 3                    AK 1                                     Utilities
## 4                    AK 1                                  Construction
## 5                    AK 1                                 Manufacturing
## 6                    AK 1                               Wholesale trade
## 7                    AK 1                                  Retail trade
## 8                    AK 1                Transportation and warehousing
## 9                    AK 1                                   Information
## 10                   AK 1                         Finance and insurance
ECD_Construction_Employment<-ECD %>% select(Congressional_District,Employment)
head(ECD_Construction_Employment,10)
##    Congressional_District Employment
## 1                    AK 1        819
## 2                    AK 1      13566
## 3                    AK 1       2081
## 4                    AK 1      18581
## 5                    AK 1      12294
## 6                    AK 1       9125
## 7                    AK 1      35221
## 8                    AK 1      18736
## 9                    AK 1       6711
## 10                   AK 1       7340
ECD_CD_NAICS$mergeid<-seq(1,8722,1)
head(ECD_CD_NAICS,10)
##    Congressional_District                              NAICS_Decription
## 1                    AK 1    Agriculture, forestry, fishing and hunting
## 2                    AK 1 Mining, quarrying, and oil and gas extraction
## 3                    AK 1                                     Utilities
## 4                    AK 1                                  Construction
## 5                    AK 1                                 Manufacturing
## 6                    AK 1                               Wholesale trade
## 7                    AK 1                                  Retail trade
## 8                    AK 1                Transportation and warehousing
## 9                    AK 1                                   Information
## 10                   AK 1                         Finance and insurance
##    mergeid
## 1        1
## 2        2
## 3        3
## 4        4
## 5        5
## 6        6
## 7        7
## 8        8
## 9        9
## 10      10
ECD_Construction_Employment$mergeid<-seq(1,8722,1)
head(ECD_Construction_Employment,10)
##    Congressional_District Employment mergeid
## 1                    AK 1        819       1
## 2                    AK 1      13566       2
## 3                    AK 1       2081       3
## 4                    AK 1      18581       4
## 5                    AK 1      12294       5
## 6                    AK 1       9125       6
## 7                    AK 1      35221       7
## 8                    AK 1      18736       8
## 9                    AK 1       6711       9
## 10                   AK 1       7340      10

7) Join the two datasets from question six together to recreate the original dataset plus the new merge id.

ECD_joint<-ECD_CD_NAICS%>%left_join(ECD_Construction_Employment,by="mergeid")
head(ECD_joint,10)
##    Congressional_District.x                              NAICS_Decription
## 1                      AK 1    Agriculture, forestry, fishing and hunting
## 2                      AK 1 Mining, quarrying, and oil and gas extraction
## 3                      AK 1                                     Utilities
## 4                      AK 1                                  Construction
## 5                      AK 1                                 Manufacturing
## 6                      AK 1                               Wholesale trade
## 7                      AK 1                                  Retail trade
## 8                      AK 1                Transportation and warehousing
## 9                      AK 1                                   Information
## 10                     AK 1                         Finance and insurance
##    mergeid Congressional_District.y Employment
## 1        1                     AK 1        819
## 2        2                     AK 1      13566
## 3        3                     AK 1       2081
## 4        4                     AK 1      18581
## 5        5                     AK 1      12294
## 6        6                     AK 1       9125
## 7        7                     AK 1      35221
## 8        8                     AK 1      18736
## 9        9                     AK 1       6711
## 10      10                     AK 1       7340

8) Group the data by industry categories and then summarise the average number of employment per industry. (arrange from most to least employees)

ECD_industry<- arrange(ECD,NAICS_Decription)
head(ECD_industry,10)
##    Congressional_District                NAICS_Decription Employment
## 1                    AK 1 Accommodation and food services      28112
## 2                    DE 1 Accommodation and food services      39289
## 3                    MT 1 Accommodation and food services      49771
## 4                    ND 1 Accommodation and food services      39787
## 5                    SD 1 Accommodation and food services      40971
## 6                    VT 1 Accommodation and food services      32985
## 7                    WY 1 Accommodation and food services      29305
## 8                    AL 1 Accommodation and food services      29067
## 9                    AZ 1 Accommodation and food services      31407
## 10                   AR 1 Accommodation and food services      18634
ECD_ave<-ECD_industry %>% 
  group_by(NAICS_Decription) %>% 
          summarise(average=mean(Employment))
head(ECD_ave,10)
## # A tibble: 10 x 2
##    NAICS_Decription                           average
##    <fct>                                        <dbl>
##  1 Accommodation and food services            30366  
##  2 Administrative and support and waste       18205  
##  3 Agriculture, forestry, fishing and hunting   366  
##  4 Arts, entertainment, and recreation         5112  
##  5 Construction                               13691  
##  6 Educational services                        8362  
##  7 Finance and insurance                      13783  
##  8 Health care and social assistance          44059  
##  9 Industries not classified                     57.1
## 10 Information                                 7738

9) Let’s reshape the original dataset into a wide format using tidy. Create a wide dataset that keeps industry categories in a single column, but spreads Congressional districts to multiple individual columns with each column delineating a single district. (hint: you should only have one row per industry in the resulting data and employment should be shown as values under each district column)

ECD_spread<-ECD %>% 
  spread(
    key=Congressional_District, value=Employment
  )
head(ECD_spread,10)
##                              NAICS_Decription  AK 1  AL 1  AL 2  AL 3
## 1             Accommodation and food services 28112 29067 24892 21075
## 2        Administrative and support and waste 17628 15559 13053 10887
## 3  Agriculture, forestry, fishing and hunting   819  1196  1762   688
## 4         Arts, entertainment, and recreation  4639  2996  3753  1117
## 5                                Construction 18581 15516  8957  6979
## 6                        Educational services  3025  4882  3821  3288
## 7                       Finance and insurance  7340  7760  6992  4581
## 8           Health care and social assistance 49240 30929 36033 26115
## 9                   Industries not classified    76    28    89    26
## 10                                Information  6711  3997  3416  1968
##     AL 4  AL 5  AL 6  AL 7  AR 1  AR 2  AR 3  AR 4  AZ 1  AZ 2  AZ 3  AZ 4
## 1  17891 27023 26588 24853 18634 31110 32896 18264 31407 29492 23522 21833
## 2   9185 12414 19994 18710  6227 16762 13395  7865  6686 19906 12661  8554
## 3    879   189   574  1309  1028   166   760  2804   321   329   354   331
## 4    966  2472  4495  1650  1517  3033  2527  2308  4198  4154  2528  3333
## 5   6824 10506 15028 14321  6833 14789 12925  8741  6813  9997 10659  8981
## 6    701  3622  5399  3991  2143  7733  3365  2365  3237  4454  2842  3799
## 7   5792  6630 21357 15218  5742 15534  8616  6006  2699 10577  3684  2973
## 8  29705 38179 29929 50611 37509 57105 41945 31792 27088 42706 29576 26474
## 9     60    30    33    40    56    48    31    62    48    66    14    45
## 10  1960  5520 10993  4867  6355 11830  4744  1671  2306  3405  3762  1747
##     AZ 5  AZ 6  AZ 7  AZ 8  AZ 9  CA 1 CA 10 CA 11 CA 12 CA 13 CA 14 CA 15
## 1  23901 53876 27287 25006 45796 21669 20587 22764 84128 32639 36502 23753
## 2  12349 33307 32668  8248 48620  8581  9580 14700 43131 14987 27778 21311
## 3     49   130    28    21    47  1254  1545    32     7    12    26    26
## 4   4514 10533  5071  4324  7286  4421  2505  5875 13922  6808  5579  3906
## 5  14496 24576 25384  8669 23231  9538 10057 14936 18459 16216 14879 19033
## 6   4675  7883 16051  2815 10885  3189  2490  6859 23490 14464  5284  4415
## 7   8005 41017 22744  4259 41430  5991  4098 17836 50251  9152 13973 10321
## 8  27965 45520 47472 32015 59527 36842 28244 39263 60946 50122 31305 31693
## 9     39    84    18    29    30    78    41    87   182   110   123    82
## 10  2826 14191  5041  1169 14105  2314  1717  4747 64112 11826 45143 16050
##    CA 16 CA 17 CA 18 CA 19  CA 2 CA 20 CA 21 CA 22 CA 23 CA 24 CA 25 CA 26
## 1  13178 34959 35481 25459 30885 34374 12266 24505 21730 41499 20763 28492
## 2   6776 35025 17124 21696 10260  9240  2743 20108 16527 12784 10239 16648
## 3   4253     0    59    49  1420  1353  5799  1323   761   835    26   484
## 4   2290  7399  5784  4408  6874  5174  1197  3316  3201  4762  5734  3994
## 5   7362 22700 11949 16517 13130  9682  4885 11334 13378 14775  9266 12265
## 6   3420 10442 38450  4064  7360  4429  1015  4480  1965  7352  5728  5525
## 7   2629 10556 12308  9733  8943  4826  1304  9734  6380  6726  5211 12774
## 8  27729 32994 65923 21820 35466 31120 12028 36189 35540 37935 20117 33225
## 9     39    45   196    36   159   120    20    55    29   126    43    61
## 10  2801 39678 58700 10042  6403  2724   611  2211  2934  8987  3289  5935
##    CA 27 CA 28 CA 29  CA 3 CA 30 CA 31 CA 32 CA 33 CA 34 CA 35 CA 36 CA 37
## 1  34154 45606 12220 22713 36827 23518 21823 73513 36380 19835 37414 25831
## 2  17069 78713 10604  8265 23580 24204 19624 27232 24159 21888  9112 22932
## 3    105   124     6   969    36   129    15    68     0    28   572     9
## 4   6516 10190  1359  2622 17448  2421  2249 16792 10650  1950 11190  7647
## 5   5616  7814 11619 10437 12138 11891 11167  8325  4856 16858 10744  5043
## 6  21519 10810  4037  2543 13570  8931  8648 15570  9617  4046  1958 31166
## 7  18033  8643  2640  5116 26091  7868  7820 22145 26622  4602  3037 10265
## 8  47281 56103 32113 28186 49533 49180 33349 56634 49628 28644 26372 30231
## 9     78    99    39    63   139    33    32   345    39    68    59   132
## 10  4518 50602  2928  2361 74634  4391  3013 48849  6779  3139  2362 77155
##    CA 38 CA 39  CA 4 CA 40 CA 41 CA 42 CA 43 CA 44 CA 45 CA 46 CA 47 CA 48
## 1  22547 31073 36077 17218 18352 17949 31191 12612 35780 40592 31589 49219
## 2  14299 15572  9868 16628 14318 11493 21519 13649 33336 42075 21506 21623
## 3      8    25   664    78    71    86    28     7    71    10    24    24
## 4   3185  7584 11185  2123  1923  2832  4205   826  4689 36560  3563  5243
## 5  12820 19646 16270  4818 14165 22523  7902  9405 20228 26112 13171 13756
## 6   6609  5083  3680  1356  5062  1605 10903  1468  7638  9219  3578  6370
## 7   5980 14947 13181  2515  4162  2885  6378  1690 32415 18433 10662 20892
## 8  32879 21094 31003 24101 27935 17089 36016 13899 36497 50453 37381 38152
## 9     21    76    77    21    24    23    43    18    69    66    84    97
## 10  3325  3321  4617  1681  2395  1649  5675  1546 18790  5007  4479  4415
##    CA 49  CA 5 CA 50 CA 51 CA 52 CA 53  CA 6  CA 7  CA 8  CA 9  CO 1  CO 2
## 1  37878 31753 36805 16643 70103 27465 29992 21355 21606 16039 57602 53034
## 2  14108 14403 17215  6634 50100 22998 25451 12434  3965  9696 47946 16230
## 3    208  1128   343   673   162    14    28   102    34  1194   130   115
## 4   8538  6865  6301  1868 12784  6431  4321  3828  7063  2643 11475 20582
## 5  14391 15943 22744  5556 22853 10892 15465 12860  6467 10668 23698 18151
## 6   6057  4371  3700  2745 15959  6565  5834  4180  2067  4876 18651  5916
## 7   6268  7127  3784  3494 32838  9447  9019 17884  2213  6187 26870 11347
## 8  35456 41146 21992 19761 36733 63965 48022 33039 19561 28529 62933 40679
## 9    100   118    77    26   116    44    85    32    44    31    64    61
## 10  6377  2796  2002  2150 21495  2065  6618  6105  1452  1638 14528 13083
##     CO 3  CO 4  CO 5  CO 6  CO 7  CT 1  CT 2  CT 3  CT 4  CT 5 DC 98  DE 1
## 1  43378 24903 31720 30610 29313 29159 38418 25432 26786 21430 68875 39289
## 2  12327 16889 19961 27971 20126 19941 10419 13657 23224 14199 32087 28429
## 3    603   532    32    61    71    14    89    15   113    50     0   131
## 4   8479  2398  4531  4627  2969  5627  3383  3645 10182  4930  7801  8650
## 5  21826 22419 13542 17847 27498 15150  7513 11867  8188 11855  9314 19468
## 6   2927  2633  7793  6633  5317 11694  4472 37375 13611  7355 53247  6925
## 7   7057 10341 11041 25515 10368 40943  6984 10643 44269 15047 17156 42783
## 8  42140 29535 39112 44922 33273 66203 37599 63732 50295 59721 66439 66496
## 9     44    88    50    38    23    73    39    27    67    42    77    64
## 10  4219  9765  9808 23205  5433 11555  3723  6414 12736  5721 24055  6684
##     FL 1 FL 10 FL 11 FL 12 FL 13 FL 14 FL 15 FL 16 FL 17 FL 18 FL 19  FL 2
## 1  33652 95831 16399 24778 33109 41842 23774 29397 17425 27981 48119 26875
## 2  11948 37116  8244  8363 27021 48736 24003 13958  7682 17640 17228  6082
## 3    201     0    99    59    30    10    69  1702   483   653   148  1412
## 4   2965 46995  2201  3233  5787 12542  3290  5439  3317  7243 11450  2687
## 5  13130 18492  9956 10769 12205 17017 17849 14553 10429 12176 26592  8565
## 6   5315  5365  2210  3669  5597  9503  5757  3650  1073  4079  3947  1823
## 7  10502  8767  3268  7560 18695 38815 16496  7782  3921  6974  8554  5970
## 8  35717 33226 32970 34578 56168 57921 33350 40998 27862 35376 46168 30419
## 9     26    24    12    27    28    24    33    54    19    46    22    32
## 10  2608  9281  2556  2191  9530 14357  7952  3314  1254  3763  5917  7443
##    FL 20 FL 21 FL 22 FL 23 FL 24 FL 25 FL 26 FL 27  FL 3  FL 4  FL 5  FL 6
## 1  16457 32918 49431 42891 17150 26185 24901 65597 26865 46634 22933 27208
## 2  29726 14359 29459 23303 14809 30531  6256 21383 11702 26051 21270  9142
## 3    130   178    60    60     8   160   291    17   575   447   226    88
## 4   4686  9317  8339  6243  5132  4621  2768  6962  3101  5870  4670  4982
## 5  15865 10247 16942  9959  6928 17561  7433  7948 10434 16601 15859 11300
## 6   8517  4525  8859 10069 14864  4597  2597 12734  3994  6463  5202  7012
## 7   9277  6520 18415 12859  5987 12364  5373 25864  7146 37860 12148  5792
## 8  38249 37433 39881 37444 47201 28167 17994 54066 51608 47985 34059 33901
## 9     68    69    56    39    72    20    24    67    24    38    27    19
## 10 12863  3031  8032  7304  3857 11223  1648  6183  4073  5996  6939  3431
##     FL 7  FL 8  FL 9  GA 1 GA 10 GA 11 GA 12 GA 13 GA 14  GA 2  GA 3  GA 4
## 1  33786 26487 29509 37730 22014 37718 24107 25888 17888 19924 25745 18909
## 2  34159 15203  9043 13241 10581 37012 14684 11771  5866 12158 15596  9305
## 3     60   695   662   848   720    60  1368     0   310  2331   227     7
## 4   5577  5709  7509  2685  2612  4205  2206  3189  1176  1526  2518  1996
## 5  19668 11829  9906  9583  8037 22622  9045 10234  6200  7257 10783 11964
## 6  12115  6027  3248  4863  2237  6495  2769  2684  4432  2992  3190  2124
## 7  25120  6156  7089  5399  4213 21848  5700  4033  3385 19135  7931  3075
## 8  51292 38237 25503 33565 24265 33827 43916 27120 21967 37156 32829 21841
## 9     32    29    10    29    51    35    30    11    18    72    59    14
## 10 13084  3331  3071  2617  1783 10938  3299  2182  2133  2758  3581  3004
##     GA 5  GA 6  GA 7  GA 8  GA 9  HI 1  HI 2  IA 1  IA 2  IA 3  IA 4  ID 1
## 1  61060 37605 30359 24844 20066 53892 50851 28524 30045 33709 26455 27658
## 2  36999 43948 31054 11260  9611 23968 12331 18277 15204 18505  8626 10739
## 3      3    29    93  1266   258    20   145   487   536   209  1339  2530
## 4   9285  7023  4261  2204  1827  5297  5992  5636  3910  6849  3397  4144
## 5  14575 12261 24925  6980  9519 20332  9127 15381 15358 17551 15587 19922
## 6  29112  9554  5600  2347  4413 10786  5873 13879  8902  8256  5972  4305
## 7  21661 43728 16364  6793  5277 15618  3129 21483 10093 50312 10617  9762
## 8  61221 49282 30775 33204 26250 44445 25416 56481 56343 53925 52281 36073
## 9     80    67    33    39    38    38    23    18    22    39    57    46
## 10 23550 40957 16618  1974  2085  6167  1842  8057  6189 10243  5796  5504
##     ID 2  IL 1 IL 10 IL 11 IL 12 IL 13 IL 14 IL 15 IL 16 IL 17 IL 18  IL 2
## 1  31833 19074 26537 25855 26304 31328 22842 19227 21821 21347 28072 14388
## 2  19436 11650 20119 33837 11520 10057 13128  7581 12949 14903 12560  7373
## 3    899     0    33    16   109   183   174   298   416   258   292    22
## 4   5036  2005  6308  4971  2905  3519  3936  1430  2586  3843  3540  1882
## 5  14979  7986 11316 10253 10352 11086 12707  8636  7636  8834 11080  7369
## 6   9263 22361  8333  5663  2792  6809  2147  1354  2460  7692  5060  4046
## 7  11522  4752 24446  8769  6860 10361  5451  7248  7660  9342 31588  3894
## 8  52900 38058 44356 37945 42616 54357 22155 36868 34225 49708 35716 35673
## 9     66    17    48    12    18    34    23    49    47    54    51     7
## 10  6316  1927  4315  7117  2349  5868  2029  2667  2692  3747  3465  2859
##     IL 3  IL 4  IL 5  IL 6   IL 7  IL 8  IL 9  IN 1  IN 2  IN 3  IN 4
## 1  20688 12886 46361 32398  79752 31025 26278 29652 25580 27946 28536
## 2  15998 15028 40783 30919  56639 46752 16622 10204 14974 15025 15311
## 3     11    NA     6    71     28    56     0     0   239   176   311
## 4   2974  2785  6785  6118  12208  5286  6058  5250  2298  3556  1821
## 5  12592  4547 15160 15828  12012 23239  7228 13885 10389 11946 10902
## 6   6268  3912 13269 12734  31206  6714 23801  6883 18156  6973  3788
## 7   5854  3691 13301 27481 128124 19982  8100  5406  7660 11356  5353
## 8  32698 21688 49368 49396 104084 34764 69672 45016 40346 48945 36375
## 9     15    12    64    22     45     7    51    23    29    31    28
## 10  1972  1374  8201  9726  43444 12747  5868  2476  3760  4529  2356
##     IN 5  IN 6  IN 7  IN 8  IN 9  KS 1  KS 2  KS 3  KS 4  KY 1  KY 2  KY 3
## 1  41111 25938 33431 27084 30507 26354 24794 34044 28685 20844 25069 44754
## 2  28747 13961 27535 13231 11966  7857  8386 36714 14619  9615 14071 27136
## 3    180   213     0   193    96   748   111    27   124   182   139    22
## 4   6465  2149  6307  2843  2777  3011  2871  5254  4168  1619  2102  6046
## 5  15254  8952 17979 16064 11757 12031 13987 20569 16871  8718 10309 16999
## 6  12644  2946  9182  5175  2316  3417  5255  6176  5924  2678  5133  8019
## 7  27277  7479 14572  8669  7007  9467 10736 29639  9842  7603  8561 28980
## 8  61558 39599 58478 48076 39595 44271 48646 53724 45138 34631 37533 64710
## 9     33    55     8    29    26    38    43    42    61    93   226   128
## 10  9995  2043 10068  3901  2935  4454  6864 18116  5044  2514  6660  8734
##     KY 4  KY 5  KY 6  LA 1  LA 2  LA 3  LA 4  LA 5  LA 6  MA 1  MA 2  MA 3
## 1  28268 17213 34194 36265 50416 36173 28058 22411 37536 25415 24197 21966
## 2  16747  8180 19181 17083 18550 12971  9261  7390 17646 10151 10925 15734
## 3    160    95   714   202   229   229  1757  1459   238    85   131   117
## 4   2895   726  3543  6174  6955  2736  2403  1815  5077  6205  4696  4395
## 5   9879  4493 14061 18777 16387 19225 13864 10519 58288 10335  9923 11357
## 6   4130  3641  4913 12371 15536  3934  2771  3271  5957 16477 22249  5769
## 7  12836  5611  8421 14422 10506  8131  7078  8761 13427 11672 14408 10064
## 8  33634 35439 46653 55734 36773 50707 45916 55114 44921 55137 71272 49875
## 9     60   178   174    45    38    24    47    57    35    58    56    65
## 10  2813  7367  7771  4404  3742  3891  3392  5996  4615  3751  4128  9740
##     MA 4  MA 5  MA 6   MA 7   MA 8  MA 9  MD 1  MD 2  MD 3  MD 4  MD 5
## 1  29192 28578 32179  49840  44573 31635 26919 28351 39419 23511 23988
## 2  18839 27704 19744  19444  30511 13842 10389 27600 27602 15675 15276
## 3     46    46   221      5     45   332   530     0    19     7    86
## 4   8246  5562  5881   8433   7235  5811  4208  6896  7825  4660  2470
## 5  12229 15267 17540   9387  22235 15597 13759 22197 19010 16255 25224
## 6  23862 47578 10568  75753   9387  4642  4949  5053 19367  3742  3099
## 7  12703 15981 11658  29385  67879  7168  5666 13420 16087  4753  4257
## 8  54512 56578 65007 104561 110332 50872 35041 37263 59739 28359 29254
## 9     90   158   133     80     87   136    35    21    61    22    29
## 10  8958 23982 18581  18799  21200  3379  2195  6377 12093  3800  3391
##     MD 6  MD 7  MD 8  ME 1  ME 2  MI 1 MI 10 MI 11 MI 12 MI 13 MI 14  MI 2
## 1  28866 22510 26959 32150 19226 30434 20780 38786 31485 23583 23704 26523
## 2  21681 16616 35348 13829  9334  6960 12718 38955 18459 12974 31679 23193
## 3    141    39    68   602  2756  1462   110    21    56     0     6   293
## 4   4331  5917  6212  4567  3381  2994  1885  6161  4515  3063  4173  3222
## 5  17932  8467 20471 13413 10081 11374 10834 15795  7096  5225  9219 11625
## 6   5765 30356  9880 12306  6207  2512  1510  7051  3859  4316  6447  6286
## 7  15925 19932 17369 17023  9305  7673  4414 21876  9738  2456 29976  7795
## 8  41563 78900 55745 63075 46278 41451 26162 51371 58829 46070 55166 33391
## 9     38    47   104    73    62    33    91    23    17    32    38    41
## 10  7791  5159  9747  6615  4579  3041  1352 12138  7606  2575 13694  2893
##     MI 3  MI 4  MI 5  MI 6  MI 7  MI 8  MI 9  MN 1  MN 2  MN 3  MN 4  MN 5
## 1  28310 25003 23678 24941 19663 25477 28339 24207 29531 36615 30864 43327
## 2  21181  8904 17027 12267  9691 11645 18380  8670 13093 34236 23125 30982
## 3    269   609    44   300   151   462     0   491   123   126    24     0
## 4   4091  2189  1963  3331  2158  4316  2412  3452  8416  7841  8147  9199
## 5  10892  8868  7145  8626  6802  9783  8902 11192 13756 18052 12515 14466
## 6  15167  3392  3252  5412  6032  3788  3442  5932  8519  7642 21971 15446
## 7  13954  6493  6624  8130  7697 13556  7405  9304 13506 33396 24407 46270
## 8  51494 30794 50077 35659 28657 38537 51753 57423 36281 48084 70058 97499
## 9     57   292    55    40    35    41   127    32    41    55    26    53
## 10  5112  2465  3231  2257  3536  3442  5421  6015  8966 10775  8999 13045
##     MN 6  MN 7  MN 8  MO 1  MO 2  MO 3  MO 4  MO 5  MO 6  MO 7  MO 8  MS 1
## 1  20694 22733 28098 37546 43840 27614 25573 38941 25686 34054 20999 24513
## 2  12148  4895  7117 33026 35186 10069  7481 21308  9775 18227  6286 14562
## 3    150   671   914     0    60    88   151   104   255   193   477  1356
## 4   4248  1928  3826  7323 11309  3698  1919  6369  3148  5156  1823  1906
## 5  19556 12754 11235 17992 19401 16019  9610 20703 10617 11127  8599  7894
## 6   4892  4699  4276 33940 11561  6501  3847  8229  4887  5115   849  2639
## 7   6828  8055  7666 17719 35180  7804 11841 24839  8658 11069  7583  6793
## 8  37604 51993 52868 63524 71209 31900 40927 63699 35987 50841 52456 32479
## 9     25    48    34   339    99   116   112    79   108   241   672    55
## 10  2803  3348  2984  8913 13663  4381  3002 12115  3469  6886  2954  2141
##     MS 2  MS 3  MS 4  MT 1  NC 1 NC 10 NC 11 NC 12 NC 13  NC 2  NC 3  NC 4
## 1  27693 32279 38836 49771 26552 30735 27752 43508 36421 21710 27998 47417
## 2   7623 11547  9251 24787 10760 16246  6870 49627 35567 12401 12164 35693
## 3    935  1962   721  1061   819   181   153    49    81   269   744    93
## 4   1435  2662  2767 11352  2560  3727  3319 11648  5954  4262  2380  8262
## 5   8774 12351 13753 24836  9864 10471 10996 21187 14551 13291 11385 21383
## 6   7160  5103  2846  6151 23135  6091  3430  8910  8261  5025  2999  9264
## 7   5586 13398  6875 16728 10174  5369  4505 57712 14801  4613  6167 25824
## 8  34679 53159 39242 67806 57470 54495 32710 56591 54501 26692 30155 65112
## 9     83    65    78    74    60    29    42    47    39    56   101   118
## 10  2910  5787  2836  8724  4176  3376  2196 15386  5770  3718  2166 24702
##     NC 5  NC 6  NC 7  NC 8  NC 9  ND 1  NE 1  NE 2  NE 3  NH 1  NH 2  NJ 1
## 1  28331 19001 27590 30240 25923 39787 23993 30497 19832 31034 24545 22216
## 2  17056 10263  9391 12200 13046 14826 10746 28573  5562 16470 12126 17937
## 3    211   303   635   350   822   451   114    38  1045   128   494    71
## 4   4331  2673  3380  4994  4576  5463  4302  7103  2761  6104  6235  4174
## 5  15071 10925 11706 10069 12992 25725 14300 18963 11497 12644 11693 11692
## 6  12537  5388  3008  4075  5984  4817  6763  9224  2796 10085 14467  3957
## 7  12736  4533  6301  4213 14945 18128 14702 37459  9544 18510  7828  5854
## 8  47026 31430 37390 40294 32873 59272 39260 50260 35569 43904 45920 52299
## 9     39    40    33    32    65    78    30    20    95    49    55    18
## 10  3327  3274  4407  2440  3465  6798  6271 11414  3106  7891  5765  4287
##    NJ 10 NJ 11 NJ 12  NJ 2  NJ 3  NJ 4  NJ 5  NJ 6  NJ 7  NJ 8  NJ 9  NM 1
## 1  15198 27506 20734 47746 22146 23826 25952 22616 28110 19222 20923 33815
## 2  10766 31407 20242  9974 14611 15732 15881 24868 26475 14159 19865 16740
## 3      0    12    94   211   104   116   128    15   137    NA     9    82
## 4   4491  7289  4734  3573  5077  8149  5539  3413  6799  2197  4551  4866
## 5   6363 15303  8818 13241 10480 17119 12474 12400 15732  8132 14175 16864
## 6   8553 12638 29917  3210  3023  9983 14778  6820  6538  6438  4771  3903
## 7   8954 28912 21328  5924 20168 11417 10973 10937 19215 37041  7957 11218
## 8  37068 56174 43530 40487 47540 53307 61779 45068 57006 33334 40289 50366
## 9     63    59    51    24    14    60    34    18    61    23    37    21
## 10  3931  9177  7734  2370  4424  9578  6234  7567 16222  5459  8405  6576
##     NM 2  NM 3   NV 1  NV 2  NV 3  NV 4  NY 1  NY 10 NY 11  NY 12 NY 13
## 1  24219 28460 190365 46779 58749 22140 23841  81321 12509 152731 10860
## 2   7497  5399  30053 19303 27565 11110 12885  47566  5377 104186  3149
## 3    193   146     19    86     9    17   140     NA     0     83     0
## 4   2897  5108   7981  7276  8483  4298  4921  24273  2410  44653  2118
## 5  12431  8914  17315 16029 19296 12746 18113  15143 10216  38877  1928
## 6   1719  3233   1894  2118  4465  2489  4674  64752  8140  71475 16408
## 7   4905  5590   7851  7847 14135  4203  6691 109148  3615 196024  1650
## 8  34188 35137  40511 31234 23264 17543 48145 102966 54330 136728 71275
## 9     34    23     29    85    35    24    25    179    15    276    48
## 10  1798  2774   3397  4602  4838  3179  3681  53708  2389 114715  1984
##    NY 14 NY 15 NY 16 NY 17 NY 18 NY 19  NY 2 NY 20 NY 21 NY 22 NY 23 NY 24
## 1  14195  8366 15348 25514 20781 20164 19167 32703 22670 28344 25100 27043
## 2   5464  5235  7425 20944 11039  4479 16662 16981  6098 10083  7297 15240
## 3     NA    NA     1    59   258   506    10     0   553   190   373    89
## 4   2871  2392  4820  7247  4800  4131  3154  7187  3265  3149  3056  4556
## 5  14027  5790 14277 17295 10163  8694 22562 14245  8238  6673  7452 11465
## 6   8215  8360 12398 15394  9964  8469  3918 20737  5063  9648 29477 15179
## 7   3151  1329  3987 18810  6136  5754  5901 19130  4480 10972  5605 12557
## 8  35654 39149 40877 71553 44129 37387 38745 65037 37425 45665 40257 50892
## 9     26    12    73    55    55    43    18    36    42    33    78    29
## 10  2958  1658  3620  8373  5070  2595  5513  9142  3627  4640  3345  5305
##    NY 25 NY 26 NY 27  NY 3  NY 4  NY 5  NY 6  NY 7  NY 8  NY 9  OH 1 OH 10
## 1  28322 38630 24051 26423 28256 14889 14856 23276 11480  9755 40271 31577
## 2  26763 26791  8367 26250 13753  8644  6564  9312  6210  2138 24927 16682
## 3      0     0   179   149    10     0     0     0     0     0     7    36
## 4   7625  4755  4992  7508  6301  3933  1485  3899  2749  3872  8225  3546
## 5  11343 10700 11538 15993 14532  8102 11336 14003  3988  3117 16468  9744
## 6  31500 11503  4468 12546 13710  7117  4885 11064 10902  6785  9558 11889
## 7  12741 27083  5709 27155 15210  1616  5948  7773  3445  1703 25268 10995
## 8  65362 66433 31867 83297 52073 28463 64629 47702 37608 52182 73193 58675
## 9     44    27    28    73    32    16    71   108    34    53    25    31
## 10 10306  6477  2484 12797  4467  1171  2357  5251  2531  2529 10462  9832
##     OH 11 OH 12 OH 13 OH 14 OH 15 OH 16  OH 2  OH 3  OH 4  OH 5  OH 6
## 1   30769 34062 27798 29588 29724 31303 28968 32727 22487 30635 18913
## 2   26024 24206 13758 25168 14212 19458 21386 26487 14698 34851  7897
## 3      10    74    27    88   121    51   121    NA    81   209   103
## 4    8887  4306  2738  5445  3581  3591  3084  5245  2769  2324  1324
## 5   12383 10957 10900 12066  8140 11724 11263 13761 10351 10872  9663
## 6   24794  8355  4416  5612  2586  5087  3969  9630  7885  6323  4140
## 7   24651 35067  5055 21571  8477 12515 15729 30818  5639  9127  4908
## 8  114676 57432 45957 40272 33254 48797 44178 67687 42760 42157 38065
## 9      27    41    22    36    31    36    42    23    42    28    59
## 10   7298  8186  3578  4581  5545  5373  6111  6990  2571  2927  1639
##     OH 7  OH 8  OH 9  OK 1  OK 2  OK 3  OK 4  OK 5  OR 1  OR 2  OR 3  OR 4
## 1  20218 25562 26953 35681 19313 21296 30346 42040 33299 32324 46237 28496
## 2  11097 12477 12119 26002  6780  7188 10975 28704 23901 12385 23635 13487
## 3    127   138     9    25   386   236    65    28  1559  2922   238  4673
## 4   2543  2398  7014  6515  3189  4904  7649  6237  4995  5790  6955  4063
## 5  12531 10450  8466 18953  7430 14387 11180 19166 19184 13340 18715 11384
## 6   5404  3602  7321  8244   702   851  1937  9553 11090  2842 15765  2926
## 7   5550 12189  8018 16099  6195  7457  8167 20124 14572  7400 19271  8181
## 8  37966 34570 43732 55459 37984 26031 37078 57605 43238 44795 57919 44825
## 9     31    21    46    28    31    35    25    72   107    77    87    82
## 10  2306  2171  4099 12665  1814  2744  3211  8668 12245  4288 10146  5608
##     OR 5  PA 1 PA 10 PA 11 PA 12 PA 13 PA 14 PA 15 PA 16 PA 17 PA 18  PA 2
## 1  30024 30218 25270 21385 23003 22739 38726 27266 22333 24212 29258 26384
## 2  16629 15395  6389 16531 14277 23666 31385 15801 11478 13083 18140 18324
## 3   2711    NA   272   183    70     8     0   138   450    46    56     0
## 4   4449 21156  2378  2256  2841  3962  9713  6738  5121  7666  4869  5555
## 5  17172  8044  9961  8487 13221 13916 14812 10684 22450  7548 26692  3787
## 6   5368 12932  6950  6116  5890 10770 48422 11489  8631 12901  8153 77024
## 7   9247 12996  6832 13770  8123 14378 38770 10280  9721  9630  9835 24535
## 8  43697 51084 42596 47817 46513 67142 89481 59450 52772 51435 48442 89909
## 9     85    34    42    32    48    35    84    35    51    25    65    56
## 10  3782  5243  2317  4744  4803  7378 10852  4627  3148  5643  5298 11752
##     PA 3  PA 4  PA 5  PA 6  PA 7  PA 8  PA 9 PR 98  RI 1  RI 2  SC 1  SC 2
## 1  23659 27962 22927 25995 21591 23005 21909 79246 21357 25748 44085 26268
## 2  11846 14236  8324 23153 25942 23868  9316 77062 10381 11302 14817 17704
## 3    147    77   354   168   330    30   155   172    30   108    78   334
## 4   3253  4114  3870  6817  4774  7353  2798  3543  5890  4725  6962  2717
## 5   9904 13561  8207 12558 18294 17703  9835 24510  8312  8121 10770 10714
## 6  11616  7315  3944  8912 12026  5610  4268 40866 19548 10106  4304  2053
## 7  10328 14339  5512 32153 20703  9864  5479 31708 11219 13997  7580  6365
## 8  60318 48648 38542 53036 46821 46832 43007 84261 39772 46669 29512 26346
## 9     31    21    44    22    54    30    32   810    36    36    59    50
## 10  3876  4481  3396 10643 15749  5797  2768 18019  2519  4097  6467  3216
##     SC 3  SC 4  SC 5  SC 6  SC 7  SD 1  TN 1  TN 2  TN 3  TN 4  TN 5  TN 6
## 1  17993 31976 19054 27497 40447 40971 34186 33130 27913 24821 50902 21689
## 2  11589 38790  9810 25252 10984 10579 11560 35596 23929 14396 34292 10371
## 3    495    93   726  1293   877   378    49   100   146   128    55   146
## 4   1625  3640  2148  2733  6459  6289  5238  2634  2994  1771  9535  2140
## 5   7223 13877  8461 13891  9906 19464  8984 11361 11041 12143 18435  9303
## 6   3418 10220  2835  7398  1741  8029  2793  5585  5287  4610 20827  1535
## 7   3396 10966  7828 20022  8840 25870  7434 13796 14336  9916 27303  6317
## 8  22979 40432 21578 48703 34625 65468 42109 45536 39867 27675 83858 30094
## 9     60    48    39    41    41    58    39    47    31    45    73    22
## 10  1395  9144  3151  6414  3141  6877  3920  5789  3896  3089 13905  2524
##     TN 7  TN 8  TN 9  TX 1 TX 10 TX 11 TX 12 TX 13 TX 14 TX 15 TX 16 TX 17
## 1  23774 23802 27355 26442 33714 29245 34501 25594 30392 21046 30004 30569
## 2  16181 22660 33479 12168 21171 10114 16373  6960 10611 11268 22332 17634
## 3    977   268   149   710   150   325   181   473   217   549   185   412
## 4   3127  2369  3894  2298  3824  2812  5683  1971  3464  1480  1775  3086
## 5   9343 10062 11829 14285 20484 22868 16259 12747 24453  7068  9262 17402
## 6   3594  5872  8233  4192  6020  2365  5887  1134  1927  3215  2610 10465
## 7  14610 11487  8966 10763 12073  7944 18281  9490  7523  6257  6249 10812
## 8  37908 48055 45094 50694 31262 34372 44788 36793 36052 44905 42696 36763
## 9     43    43    56    68    89    55    79    32    45    31    32    31
## 10  6365  3077  4971  3797 11073  3434  4787  3307  2094  3017  8633  8346
##    TX 18 TX 19  TX 2 TX 20 TX 21 TX 22 TX 23 TX 24 TX 25 TX 26 TX 27 TX 28
## 1  34061 30052 39931 32495 58451 30954 24128 59890 26851 29808 32132 19271
## 2  32118  9593 26086 26117 39795  9042  8634 87624 11618 17549 13624  7661
## 3      7   753    21     0    67    89   247    30    58    74   209   358
## 4   5649  2296  5936  6175  7865  4925  2401  5115  3477  3964  2804  1842
## 5  24880 14727 33409  7908 27954 10662 26349 34315 12347 12340 21028  7579
## 6   3624  5964 14656  6257 14316  3476  1353  9890  5260  3493  2066  1555
## 7  16479 10933 15309 37956 21218  4980  6456 58104  9125 20599  7087  5923
## 8  30742 45562 27299 42277 62440 34363 21490 46293 35087 26930 44267 36795
## 9     35    62    67    22    83    43    38    47    92    35    38    16
## 10 10269  4925  6088  4548 16137  3684  1352 34962  4946  4596  2763  5847
##    TX 29  TX 3 TX 30 TX 31 TX 32 TX 33 TX 34 TX 35 TX 36  TX 4  TX 5  TX 6
## 1  19594 39702 30966 29561 36510 20877 20205 47296 22636 22233 19407 27402
## 2  22221 24800 17270 10705 28125 28656  9005 17283 13180  9282  9460 17669
## 3      0    10    11     6    41     0   382    49   586   183   230   118
## 4    857  5460  5244  4535  4680  4646  1320  4343  1394  1638  2157  3527
## 5  28021 13816 11692 14530 12598 23561  5279 20176 29717  9605 16832 13011
## 6   1311  3867  7167  4760 10603  3678  3041  4353  2509  1685  1434  3143
## 7   4966 47722 19442 10915 21850  4963  5014  9049  4755  6722  3817  9890
## 8  12787 44623 60406 45462 53945 27969 50390 36345 26236 38576 26450 29308
## 9     20    32    31    21    77    38    10    81    45    43    24    23
## 10  1572 17479 11540  5873 11436  3084  2975  7672  1429  2397  1688  3224
##     TX 7  TX 8   TX 9  UT 1  UT 2  UT 3  UT 4  VA 1 VA 10 VA 11  VA 2
## 1  47529 24852  22521 25802 35345 27738 22675 24755 29419 35360 37555
## 2  38717 10427  28024 11945 20263 22596 25958 11515 26429 33483 14323
## 3     43   236      0   286   122    48    46   910   171     0   207
## 4   5574  4165   5331  8325  5215  4228  3634  5760  6168  8091  8145
## 5  28496 13160  15486 15421 17561 14425 25289 20980 25372 11538 12251
## 6   7399  2219  15491  2958  5998 31010  6114  3375  7261  7017  6048
## 7  30111  6424   7244  8455 21738 10852 18179  8478  8617 25112 12683
## 8  48575 22665 104298 27561 40811 31056 33948 27829 32402 45637 26901
## 9     84    40     29    35    27    34    20    60    58    43    37
## 10 11514  2201   4170  3136 11270 12852 16699  3351 12634 30653  4093
##     VA 3  VA 4  VA 5  VA 6  VA 7  VA 8  VA 9  VT 1  WA 1 WA 10  WA 2  WA 3
## 1  33648 28253 24066 34768 29080 40093 23041 32985 22802 21551 29984 19308
## 2  31464 13379 11466 12870 21448 35292  9121  7877 15845  9746 10727  9644
## 3     50   233  1462   193   302     0   507   506   603   864   450  2806
## 4   4309  4006  3604  3707  6581  5972  1715  7165  5691  6138  4042  3676
## 5  15515 18069 13436 15398 15363 14041  8105 13911 24006 14831 19222 15301
## 6   6561  6426  6265 18474  4258 10013  2827 15899  5577  5422  2802  2096
## 7  11720 14158  7420 13568 34529 11208  5831  9103  5751  8779 10215  6907
## 8  59017 45817 37728 49878 39896 33467 36160 48095 23093 33840 35836 31400
## 9     20    53    79    31    50   104    30    56    73    68    69    89
## 10  7171  5642  3741  4780  6999 11238  3607  6839 48682  4283  5484  3959
##     WA 4  WA 5  WA 6  WA 7  WA 8  WA 9  WI 1  WI 2  WI 3  WI 4  WI 5  WI 6
## 1  18460 23281 24699 53427 19396 35572 26495 37494 28214 28746 30654 27705
## 2  13575 12471  9220 18086  7326 38993 12972 18511 12889 24673 27386 12585
## 3   4053   450  1030  1511  2139    47   108   949   274     0    72   344
## 4   4223  3637  4550 12765  8098  7065  4045  5755  4513  8336  5467  4701
## 5  11147 12413 10093 18814 15782 22322  9325 15915 10155  6496 17832 15152
## 6   2436  9908  4149 11565  1900  8996  4051  5022  3266 16549 13272  6594
## 7   4329 11955  7074 20976  3053 15678  5950 26444 13746 30379 18849 11474
## 8  28036 45623 47511 66371 20464 60080 34954 56674 45623 66340 59582 42601
## 9     47    70    82   124    36    75    17    41   112    24    30    28
## 10  2356  4388  2799 28604  3591 22052  3142 17934  5084  7224 10696  3136
##     WI 7  WI 8  WV 1  WV 2  WV 3  WY 1
## 1  24631 29515 25617 22234 19403 29305
## 2   8296 18457 11769 10098  7862  6506
## 3    771   658   137   339   458   235
## 4   3614  6393  2891  2358  2157  4483
## 5  11130 14796  8777  9555  5583 20246
## 6   2030  4629  3851  5232   872  2115
## 7   9964 17069  5505  7522  3966  6677
## 8  42525 45428 50153 38314 42176 32521
## 9     49    49    31    49    28   117
## 10  2360  6947  3382  3694  3386  4024

10) Now return the data to a long (tidy) format by moving districts back into a single column and employment in a single column (the final data should include three columns again: one for Congressional districts one for industry categories, and one for employment.)

list <- colnames(ECD_spread)[2:438]
ECD_gather<-ECD_spread %>% 
  gather(key=Congressional_District, value=Employment, list)
head(ECD_gather,10)
##                              NAICS_Decription Congressional_District
## 1             Accommodation and food services                   AK 1
## 2        Administrative and support and waste                   AK 1
## 3  Agriculture, forestry, fishing and hunting                   AK 1
## 4         Arts, entertainment, and recreation                   AK 1
## 5                                Construction                   AK 1
## 6                        Educational services                   AK 1
## 7                       Finance and insurance                   AK 1
## 8           Health care and social assistance                   AK 1
## 9                   Industries not classified                   AK 1
## 10                                Information                   AK 1
##    Employment
## 1       28112
## 2       17628
## 3         819
## 4        4639
## 5       18581
## 6        3025
## 7        7340
## 8       49240
## 9          76
## 10       6711