title: “Homework 11” output: html_notebook — —

Mapping Analysis of Unemployment Rates in U.S

I am using Social Explorer dataset from ACS 2016 5 year estimates with variables that provided unemployment rate of civil polulation of 16 years old and older.By means of mapping analysis, I would like to compare the unemployment rate among the states in our country.

R Packages:

Reading data and preparing merging:

library (readr)
work <-read_csv("C:/Users/Marcy/Documents/soc 712/R12145472_SL050.csv")
#head (last)


work$FIPS<-as.character(work$FIPS)
work<-work %>%
             rename(GEOID=FIPS)%>%
                   mutate(GEOID = parse_integer(GEOID))

Merging available data to see the 5 year average (2011-2016) unemployment rate grouped by U.S. counties.

work_comb <- countymap %>% 
    mutate(GEOID = parse_integer(GEOID)) %>% 
          left_join(work, by = 'GEOID')

Filtering out the border states:

work_comb_sub <- work_comb %>% 
  filter(STATEFP != "02") %>% 
  filter(STATEFP != "15") %>% 
  filter(STATEFP != "60") %>% 
  filter(STATEFP != "66") %>% 
  filter(STATEFP != "69") %>% 
  filter(STATEFP != "72") %>% 
  filter(STATEFP != "78")

Adding the states borders for clarity:

us_states <-work_comb_sub %>% 
  aggregate_map(by ="STATEFP")

On average, the rate of unemployment among civil population over 16 across the states’ counties is 0 to 10,000. However, some counties, like San Diego, CA and Pushmataha, TX have double rate of unemployment. In Pushmataha county, for example, shown results reveals a higher rate of unemployment. According to U.S. Census Bureau, the most of Pushmataha County is mountainous, with the exception of a relatively flat agricultural belt along the county’s southern border. Maybe, that is the reason for higher unemployment rate than state and country average average.Interestingly, the highest rate of unemployment exists in Los Angeles - 400,000 to 500,000.

tm_shape(work_comb_sub, projection = 2163) +
  tm_polygons("Civilian Population in Labor Force 16 Years and Over: Unemployed", palette = "-RdBu",midpoint=150000,border.col = "grey", border.alpha = .5)+ tm_shape(us_states) + tm_borders(lwd = 1, col = "black", alpha = .5)+tm_style("beaver")

Emphasizing state border lines of the map.

tm_shape(work_comb_sub) + tm_polygons("Civilian Population in Labor Force 16 Years and Over: Unemployed", border.col = "grey", border.alpha = .5) + tm_shape(us_states) + tm_borders(lwd = 1, col = "black", alpha = 1)

Now, I will look at the national rate of unemployment in a non-spacial way. As shown, the overwhelming majority of civil population over 16 and older in not unemployed. According to the Bureau of Labor Statistics, the unemployment rate for the population in 2016 was slightly flactuating, being on average 4.7%.

Spatial data has spatial information in the form of latitude and longitude.It is primarily defined as those which are directly or indirectly referenced to a location on the surface of the earth. When a dataset cannot be related to a location on the surface of the earth is referred as non spatial data. Non spatial data are mostly the attributes associated with spatial information layers. Non spatial data may include numbers, characters etc. Spatial data include satellite images.Traditionally, we use data which appear to be non spatial in nature.However, these datasets may indirectly referring to specific locations.

Apparently, spacial data in this case provided more clarify of the results, unlike non-spacial plotting. Merging data with the U.S. map shows data distribution specific to each county which provides more possibilities for comprehensive analysis.

ggplot(work_comb_sub, aes(`Civilian Population in Labor Force 16 Years and Over: Unemployed` )) + geom_histogram() + xlab("Proportion of Civil Population Unemployed") + ylab("")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Also, when performing mapping analysis, it is important to differeciate between “Cb” = TRUE, where the map results in producing more landscape-related accurate details and “cb”= FALSE, where the emphasis is eliminating such details, like water, or lakes.

options(tigris_class = "sf")
countymap <- counties(cb = FALSE)
## 
  |                                                                       
  |                                                                 |   0%
  |                                                                       
  |                                                                 |   1%
  |                                                                       
  |=                                                                |   1%
  |                                                                       
  |=                                                                |   2%
  |                                                                       
  |==                                                               |   2%
  |                                                                       
  |==                                                               |   3%
  |                                                                       
  |==                                                               |   4%
  |                                                                       
  |===                                                              |   4%
  |                                                                       
  |===                                                              |   5%
  |                                                                       
  |====                                                             |   5%
  |                                                                       
  |====                                                             |   6%
  |                                                                       
  |====                                                             |   7%
  |                                                                       
  |=====                                                            |   7%
  |                                                                       
  |=====                                                            |   8%
  |                                                                       
  |======                                                           |   8%
  |                                                                       
  |======                                                           |   9%
  |                                                                       
  |======                                                           |  10%
  |                                                                       
  |=======                                                          |  10%
  |                                                                       
  |=======                                                          |  11%
  |                                                                       
  |=======                                                          |  12%
  |                                                                       
  |========                                                         |  12%
  |                                                                       
  |========                                                         |  13%
  |                                                                       
  |=========                                                        |  13%
  |                                                                       
  |=========                                                        |  14%
  |                                                                       
  |=========                                                        |  15%
  |                                                                       
  |==========                                                       |  15%
  |                                                                       
  |==========                                                       |  16%
  |                                                                       
  |===========                                                      |  16%
  |                                                                       
  |===========                                                      |  17%
  |                                                                       
  |===========                                                      |  18%
  |                                                                       
  |============                                                     |  18%
  |                                                                       
  |============                                                     |  19%
  |                                                                       
  |=============                                                    |  19%
  |                                                                       
  |=============                                                    |  20%
  |                                                                       
  |=============                                                    |  21%
  |                                                                       
  |==============                                                   |  21%
  |                                                                       
  |==============                                                   |  22%
  |                                                                       
  |===============                                                  |  22%
  |                                                                       
  |===============                                                  |  23%
  |                                                                       
  |===============                                                  |  24%
  |                                                                       
  |================                                                 |  24%
  |                                                                       
  |================                                                 |  25%
  |                                                                       
  |=================                                                |  25%
  |                                                                       
  |=================                                                |  26%
  |                                                                       
  |=================                                                |  27%
  |                                                                       
  |==================                                               |  27%
  |                                                                       
  |==================                                               |  28%
  |                                                                       
  |===================                                              |  28%
  |                                                                       
  |===================                                              |  29%
  |                                                                       
  |===================                                              |  30%
  |                                                                       
  |====================                                             |  30%
  |                                                                       
  |====================                                             |  31%
  |                                                                       
  |====================                                             |  32%
  |                                                                       
  |=====================                                            |  32%
  |                                                                       
  |=====================                                            |  33%
  |                                                                       
  |======================                                           |  33%
  |                                                                       
  |======================                                           |  34%
  |                                                                       
  |======================                                           |  35%
  |                                                                       
  |=======================                                          |  35%
  |                                                                       
  |=======================                                          |  36%
  |                                                                       
  |========================                                         |  36%
  |                                                                       
  |========================                                         |  37%
  |                                                                       
  |========================                                         |  38%
  |                                                                       
  |=========================                                        |  38%
  |                                                                       
  |=========================                                        |  39%
  |                                                                       
  |==========================                                       |  39%
  |                                                                       
  |==========================                                       |  40%
  |                                                                       
  |==========================                                       |  41%
  |                                                                       
  |===========================                                      |  41%
  |                                                                       
  |===========================                                      |  42%
  |                                                                       
  |============================                                     |  42%
  |                                                                       
  |============================                                     |  43%
  |                                                                       
  |============================                                     |  44%
  |                                                                       
  |=============================                                    |  44%
  |                                                                       
  |=============================                                    |  45%
  |                                                                       
  |==============================                                   |  45%
  |                                                                       
  |==============================                                   |  46%
  |                                                                       
  |==============================                                   |  47%
  |                                                                       
  |===============================                                  |  47%
  |                                                                       
  |===============================                                  |  48%
  |                                                                       
  |================================                                 |  48%
  |                                                                       
  |================================                                 |  49%
  |                                                                       
  |================================                                 |  50%
  |                                                                       
  |=================================                                |  50%
  |                                                                       
  |=================================                                |  51%
  |                                                                       
  |=================================                                |  52%
  |                                                                       
  |==================================                               |  52%
  |                                                                       
  |==================================                               |  53%
  |                                                                       
  |===================================                              |  53%
  |                                                                       
  |===================================                              |  54%
  |                                                                       
  |===================================                              |  55%
  |                                                                       
  |====================================                             |  55%
  |                                                                       
  |====================================                             |  56%
  |                                                                       
  |=====================================                            |  56%
  |                                                                       
  |=====================================                            |  57%
  |                                                                       
  |=====================================                            |  58%
  |                                                                       
  |======================================                           |  58%
  |                                                                       
  |======================================                           |  59%
  |                                                                       
  |=======================================                          |  59%
  |                                                                       
  |=======================================                          |  60%
  |                                                                       
  |=======================================                          |  61%
  |                                                                       
  |========================================                         |  61%
  |                                                                       
  |========================================                         |  62%
  |                                                                       
  |=========================================                        |  62%
  |                                                                       
  |=========================================                        |  63%
  |                                                                       
  |=========================================                        |  64%
  |                                                                       
  |==========================================                       |  64%
  |                                                                       
  |==========================================                       |  65%
  |                                                                       
  |===========================================                      |  65%
  |                                                                       
  |===========================================                      |  66%
  |                                                                       
  |===========================================                      |  67%
  |                                                                       
  |============================================                     |  67%
  |                                                                       
  |============================================                     |  68%
  |                                                                       
  |=============================================                    |  68%
  |                                                                       
  |=============================================                    |  69%
  |                                                                       
  |=============================================                    |  70%
  |                                                                       
  |==============================================                   |  70%
  |                                                                       
  |==============================================                   |  71%
  |                                                                       
  |==============================================                   |  72%
  |                                                                       
  |===============================================                  |  72%
  |                                                                       
  |===============================================                  |  73%
  |                                                                       
  |================================================                 |  73%
  |                                                                       
  |================================================                 |  74%
  |                                                                       
  |================================================                 |  75%
  |                                                                       
  |=================================================                |  75%
  |                                                                       
  |=================================================                |  76%
  |                                                                       
  |==================================================               |  76%
  |                                                                       
  |==================================================               |  77%
  |                                                                       
  |==================================================               |  78%
  |                                                                       
  |===================================================              |  78%
  |                                                                       
  |===================================================              |  79%
  |                                                                       
  |====================================================             |  79%
  |                                                                       
  |====================================================             |  80%
  |                                                                       
  |====================================================             |  81%
  |                                                                       
  |=====================================================            |  81%
  |                                                                       
  |=====================================================            |  82%
  |                                                                       
  |======================================================           |  82%
  |                                                                       
  |======================================================           |  83%
  |                                                                       
  |======================================================           |  84%
  |                                                                       
  |=======================================================          |  84%
  |                                                                       
  |=======================================================          |  85%
  |                                                                       
  |========================================================         |  85%
  |                                                                       
  |========================================================         |  86%
  |                                                                       
  |========================================================         |  87%
  |                                                                       
  |=========================================================        |  87%
  |                                                                       
  |=========================================================        |  88%
  |                                                                       
  |==========================================================       |  88%
  |                                                                       
  |==========================================================       |  89%
  |                                                                       
  |==========================================================       |  90%
  |                                                                       
  |===========================================================      |  90%
  |                                                                       
  |===========================================================      |  91%
  |                                                                       
  |===========================================================      |  92%
  |                                                                       
  |============================================================     |  92%
  |                                                                       
  |============================================================     |  93%
  |                                                                       
  |=============================================================    |  93%
  |                                                                       
  |=============================================================    |  94%
  |                                                                       
  |=============================================================    |  95%
  |                                                                       
  |==============================================================   |  95%
  |                                                                       
  |==============================================================   |  96%
  |                                                                       
  |===============================================================  |  96%
  |                                                                       
  |===============================================================  |  97%
  |                                                                       
  |===============================================================  |  98%
  |                                                                       
  |================================================================ |  98%
  |                                                                       
  |================================================================ |  99%
  |                                                                       
  |=================================================================|  99%
  |                                                                       
  |=================================================================| 100%
library (readr)
work <-read_csv("C:/Users/Marcy/Documents/soc 712/R12145472_SL050.csv")
## Parsed with column specification:
## cols(
##   .default = col_logical(),
##   FIPS = col_double(),
##   `Name of Area` = col_character(),
##   `Qualifying Name` = col_character(),
##   `State/U.S.-Abbreviation (USPS)` = col_character(),
##   `Summary Level` = col_double(),
##   `Geographic Component` = col_double(),
##   `File Identification` = col_character(),
##   `Logical Record Number` = col_double(),
##   `State (FIPS)` = col_double(),
##   County = col_double(),
##   `Geographic Identifier` = col_character(),
##   `Area (Land)` = col_double(),
##   `Area (Water)` = col_double(),
##   `Civilian Population in Labor Force 16 Years and Over:` = col_double(),
##   `Civilian Population in Labor Force 16 Years and Over: Employed` = col_double(),
##   `Civilian Population in Labor Force 16 Years and Over: Unemployed` = col_double()
## )
## See spec(...) for full column specifications.
#head (last)


work$FIPS<-as.character(work$FIPS)
work<-work %>%
             rename(GEOID=FIPS)%>%
                   mutate(GEOID = parse_integer(GEOID))
work_comb <- countymap %>% 
    mutate(GEOID = parse_integer(GEOID)) %>% 
          left_join(work, by = 'GEOID')
work_comb_sub <- work_comb %>% 
  filter(STATEFP != "02") %>% 
  filter(STATEFP != "15") %>% 
  filter(STATEFP != "60") %>% 
  filter(STATEFP != "66") %>% 
  filter(STATEFP != "69") %>% 
  filter(STATEFP != "72") %>% 
  filter(STATEFP != "78")
us_states <-work_comb_sub %>% 
  aggregate_map(by ="STATEFP")
tm_shape(work_comb_sub, projection = 2163) +
  tm_polygons("Civilian Population in Labor Force 16 Years and Over: Unemployed", palette = "-RdBu",midpoint=150000,border.col = "grey", border.alpha = .5)+ tm_shape(us_states) + tm_borders(lwd = 1, col = "black", alpha = .5)+tm_style("beaver")

Therefore, changing cb to false makes the map less detailed which is often useful for the researcher to emphasize relevant information only.

Thus, on average, the unemployment rate of civil population in the overwhelming majority of the counties is between 0 and 100,000. Only Los Angeles, CA, shows a triple of national average rate of unemployment. For more understanding, looking closely at this distribution is requred. However, mapping of this survey data provided an opportunity to single out counties with up to double rate of unemployment in few states which could provide vast opportunities for further research.