San Antonio Promise Zones

Author

Jacob M. Souch

BLACK_tract_C <- BLACK_tract[BLACK_tract$year  %in% c(2013, 2019),] %>% select(tract, year, estimate) %>% pivot_wider(names_from = year, values_from = estimate)

BLACK_tract_C$Delta <- BLACK_tract_C$`2019` - BLACK_tract_C$`2013` 


Change <- rbind(slice_min(BLACK_tract_C, order_by = abs(Delta), n= 1), 
      slice_max(BLACK_tract_C, order_by = (Delta), n= 1), 
      slice_min(BLACK_tract_C, order_by = (Delta), n= 1)) 



names = c("Most Stable","Greatest Increase", "Greatest Decrease")

BLACK_tract <- left_join(BLACK_tract, cbind(Change,names), "tract")
df = BLACK_tract

Plot <-
  ggplot(data = df, aes(y = estimate, x = year, group = year)) + geom_boxplot(color = "azure4", fill = "linen") + geom_point(alpha = 0.3, color = "darkgrey") +  geom_line(aes(group = tract), alpha = 0.09) +
  geom_line(
    data = subset(
      df,
      names %in% c("Greatest Increase", "Most Stable", "Greatest Decrease")
    ),
    aes(
      group = tract,
      color = paste0(names, " (Tract ", tract, ", ", round(Delta), "%", ")")
    ),
    size = 1.25
  ) +
  scale_color_discrete(name = "") +
  ggpubr::theme_pubr() +
  ylab("Percent of Population Non-Hispanic Black") +
  xlab("Year") +
  ggtitle(label = "Percent Change in Population Percent Non-Hispanic Black, 2013-2019", subtitle = "Census Tracts San Antonio Promise Zone") +
  theme(
    plot.title = element_text(
      size = 12,
      face = "bold",
      family = "Sans", hjust = 0.5
    ),axis.title.x = element_text(face = "bold", size = 9),
    axis.title.y = element_text(face = "bold", size =9),
    legend.spacing.x = unit(0.2, 'cm'), plot.subtitle = element_text(hjust = 0.5),
    legend.background = element_rect(color = "white", fill = "snow2"), legend.text = element_text(size = 7.5), legend.direction = "horizontal", legend.position = "top", plot.caption = element_text(size =8, color = "darkgrey"), plot.background = element_rect(color = "black", fill = NA)
  )+labs(caption= "Source: American Community Survey \n Authors: Julia Kay Wolf, Drew Schaefer, Jacob M. Souch")
Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
ℹ Please use `linewidth` instead.
Plot
Warning in grid.Call(C_stringMetric, as.graphicsAnnot(x$label)): font family
not found in Windows font database
Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
family not found in Windows font database

Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
family not found in Windows font database

Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
family not found in Windows font database

nhblack19 <- get_acs(state = "TX", 
                   county = "Bexar",
                   geography = "tract", 
                   variables = "DP05_0078PE", 
                   geometry = TRUE,
                   year = 2019)
Getting data from the 2015-2019 5-year ACS
Downloading feature geometry from the Census website.  To cache shapefiles for use in future sessions, set `options(tigris_use_cache = TRUE)`.
Using the ACS Data Profile

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |                                                                      |   1%
  |                                                                            
  |=                                                                     |   1%
  |                                                                            
  |=                                                                     |   2%
  |                                                                            
  |==                                                                    |   3%
  |                                                                            
  |===                                                                   |   4%
  |                                                                            
  |===                                                                   |   5%
  |                                                                            
  |====                                                                  |   5%
  |                                                                            
  |====                                                                  |   6%
  |                                                                            
  |=====                                                                 |   7%
  |                                                                            
  |=====                                                                 |   8%
  |                                                                            
  |======                                                                |   8%
  |                                                                            
  |=======                                                               |   9%
  |                                                                            
  |=======                                                               |  10%
  |                                                                            
  |========                                                              |  11%
  |                                                                            
  |========                                                              |  12%
  |                                                                            
  |=========                                                             |  12%
  |                                                                            
  |=========                                                             |  13%
  |                                                                            
  |=========                                                             |  14%
  |                                                                            
  |==========                                                            |  14%
  |                                                                            
  |==========                                                            |  15%
  |                                                                            
  |===========                                                           |  15%
  |                                                                            
  |===========                                                           |  16%
  |                                                                            
  |============                                                          |  17%
  |                                                                            
  |============                                                          |  18%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |=============                                                         |  19%
  |                                                                            
  |==============                                                        |  20%
  |                                                                            
  |===============                                                       |  21%
  |                                                                            
  |===============                                                       |  22%
  |                                                                            
  |================                                                      |  23%
  |                                                                            
  |=================                                                     |  24%
  |                                                                            
  |=================                                                     |  25%
  |                                                                            
  |==================                                                    |  25%
  |                                                                            
  |==================                                                    |  26%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |====================                                                  |  28%
  |                                                                            
  |====================                                                  |  29%
  |                                                                            
  |=====================                                                 |  30%
  |                                                                            
  |======================                                                |  32%
  |                                                                            
  |=======================                                               |  33%
  |                                                                            
  |========================                                              |  34%
  |                                                                            
  |========================                                              |  35%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |==========================                                            |  37%
  |                                                                            
  |==========================                                            |  38%
  |                                                                            
  |===========================                                           |  38%
  |                                                                            
  |===========================                                           |  39%
  |                                                                            
  |============================                                          |  40%
  |                                                                            
  |============================                                          |  41%
  |                                                                            
  |=============================                                         |  42%
  |                                                                            
  |==============================                                        |  42%
  |                                                                            
  |==============================                                        |  43%
  |                                                                            
  |===============================                                       |  44%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |================================                                      |  46%
  |                                                                            
  |=================================                                     |  47%
  |                                                                            
  |==================================                                    |  48%
  |                                                                            
  |==================================                                    |  49%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |====================================                                  |  51%
  |                                                                            
  |====================================                                  |  52%
  |                                                                            
  |=====================================                                 |  52%
  |                                                                            
  |=====================================                                 |  54%
  |                                                                            
  |======================================                                |  54%
  |                                                                            
  |=======================================                               |  55%
  |                                                                            
  |=======================================                               |  56%
  |                                                                            
  |========================================                              |  57%
  |                                                                            
  |========================================                              |  58%
  |                                                                            
  |=========================================                             |  58%
  |                                                                            
  |=========================================                             |  59%
  |                                                                            
  |==========================================                            |  60%
  |                                                                            
  |===========================================                           |  61%
  |                                                                            
  |===========================================                           |  62%
  |                                                                            
  |============================================                          |  63%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |=============================================                         |  65%
  |                                                                            
  |==============================================                        |  65%
  |                                                                            
  |==============================================                        |  66%
  |                                                                            
  |===============================================                       |  66%
  |                                                                            
  |===============================================                       |  67%
  |                                                                            
  |===============================================                       |  68%
  |                                                                            
  |================================================                      |  68%
  |                                                                            
  |================================================                      |  69%
  |                                                                            
  |=================================================                     |  69%
  |                                                                            
  |=================================================                     |  70%
  |                                                                            
  |==================================================                    |  71%
  |                                                                            
  |===================================================                   |  72%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |====================================================                  |  74%
  |                                                                            
  |=====================================================                 |  76%
  |                                                                            
  |======================================================                |  77%
  |                                                                            
  |=======================================================               |  78%
  |                                                                            
  |=======================================================               |  79%
  |                                                                            
  |========================================================              |  80%
  |                                                                            
  |========================================================              |  81%
  |                                                                            
  |=========================================================             |  81%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |==========================================================            |  82%
  |                                                                            
  |==========================================================            |  83%
  |                                                                            
  |===========================================================           |  84%
  |                                                                            
  |===========================================================           |  85%
  |                                                                            
  |============================================================          |  85%
  |                                                                            
  |============================================================          |  86%
  |                                                                            
  |=============================================================         |  87%
  |                                                                            
  |=============================================================         |  88%
  |                                                                            
  |==============================================================        |  88%
  |                                                                            
  |==============================================================        |  89%
  |                                                                            
  |===============================================================       |  90%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |================================================================      |  92%
  |                                                                            
  |=================================================================     |  92%
  |                                                                            
  |=================================================================     |  93%
  |                                                                            
  |==================================================================    |  94%
  |                                                                            
  |==================================================================    |  95%
  |                                                                            
  |===================================================================   |  96%
  |                                                                            
  |====================================================================  |  97%
  |                                                                            
  |===================================================================== |  98%
  |                                                                            
  |===================================================================== |  99%
  |                                                                            
  |======================================================================|  99%
  |                                                                            
  |======================================================================| 100%
nhblack13 <- get_acs(state = "TX", 
                   county = "Bexar",
                   geography = "tract", 
                   variables = "DP05_0073PE", 
                   geometry = TRUE,
                   year = 2013)
Getting data from the 2009-2013 5-year ACS
Downloading feature geometry from the Census website.  To cache shapefiles for use in future sessions, set `options(tigris_use_cache = TRUE)`.
Using the ACS Data Profile

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |=                                                                     |   1%
  |                                                                            
  |=                                                                     |   2%
  |                                                                            
  |==                                                                    |   2%
  |                                                                            
  |==                                                                    |   3%
  |                                                                            
  |==                                                                    |   4%
  |                                                                            
  |===                                                                   |   5%
  |                                                                            
  |====                                                                  |   5%
  |                                                                            
  |====                                                                  |   6%
  |                                                                            
  |=====                                                                 |   6%
  |                                                                            
  |=====                                                                 |   7%
  |                                                                            
  |=====                                                                 |   8%
  |                                                                            
  |======                                                                |   8%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=======                                                               |  10%
  |                                                                            
  |========                                                              |  11%
  |                                                                            
  |========                                                              |  12%
  |                                                                            
  |=========                                                             |  13%
  |                                                                            
  |==========                                                            |  14%
  |                                                                            
  |==========                                                            |  15%
  |                                                                            
  |===========                                                           |  16%
  |                                                                            
  |============                                                          |  17%
  |                                                                            
  |============                                                          |  18%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |==============                                                        |  20%
  |                                                                            
  |===============                                                       |  21%
  |                                                                            
  |===============                                                       |  22%
  |                                                                            
  |================                                                      |  22%
  |                                                                            
  |================                                                      |  23%
  |                                                                            
  |=================                                                     |  24%
  |                                                                            
  |=================                                                     |  25%
  |                                                                            
  |==================                                                    |  25%
  |                                                                            
  |==================                                                    |  26%
  |                                                                            
  |===================                                                   |  26%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |====================                                                  |  28%
  |                                                                            
  |====================                                                  |  29%
  |                                                                            
  |=====================                                                 |  30%
  |                                                                            
  |======================                                                |  31%
  |                                                                            
  |======================                                                |  32%
  |                                                                            
  |=======================                                               |  33%
  |                                                                            
  |========================                                              |  34%
  |                                                                            
  |========================                                              |  35%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |==========================                                            |  38%
  |                                                                            
  |===========================                                           |  39%
  |                                                                            
  |============================                                          |  40%
  |                                                                            
  |=============================                                         |  41%
  |                                                                            
  |=============================                                         |  42%
  |                                                                            
  |==============================                                        |  43%
  |                                                                            
  |==============================                                        |  44%
  |                                                                            
  |===============================                                       |  45%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |================================                                      |  46%
  |                                                                            
  |=================================                                     |  47%
  |                                                                            
  |==================================                                    |  48%
  |                                                                            
  |==================================                                    |  49%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |===================================                                   |  51%
  |                                                                            
  |====================================                                  |  52%
  |                                                                            
  |=====================================                                 |  53%
  |                                                                            
  |======================================                                |  54%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=======================================                               |  56%
  |                                                                            
  |========================================                              |  57%
  |                                                                            
  |=========================================                             |  59%
  |                                                                            
  |==========================================                            |  60%
  |                                                                            
  |===========================================                           |  61%
  |                                                                            
  |===========================================                           |  62%
  |                                                                            
  |============================================                          |  63%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |=============================================                         |  65%
  |                                                                            
  |==============================================                        |  66%
  |                                                                            
  |===============================================                       |  68%
  |                                                                            
  |================================================                      |  68%
  |                                                                            
  |================================================                      |  69%
  |                                                                            
  |=================================================                     |  70%
  |                                                                            
  |==================================================                    |  71%
  |                                                                            
  |==================================================                    |  72%
  |                                                                            
  |===================================================                   |  72%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |====================================================                  |  74%
  |                                                                            
  |====================================================                  |  75%
  |                                                                            
  |=====================================================                 |  75%
  |                                                                            
  |=====================================================                 |  76%
  |                                                                            
  |======================================================                |  77%
  |                                                                            
  |=======================================================               |  78%
  |                                                                            
  |=======================================================               |  79%
  |                                                                            
  |========================================================              |  79%
  |                                                                            
  |========================================================              |  80%
  |                                                                            
  |=========================================================             |  81%
  |                                                                            
  |==========================================================            |  82%
  |                                                                            
  |==========================================================            |  83%
  |                                                                            
  |==========================================================            |  84%
  |                                                                            
  |===========================================================           |  84%
  |                                                                            
  |===========================================================           |  85%
  |                                                                            
  |============================================================          |  86%
  |                                                                            
  |=============================================================         |  87%
  |                                                                            
  |=============================================================         |  88%
  |                                                                            
  |==============================================================        |  88%
  |                                                                            
  |==============================================================        |  89%
  |                                                                            
  |===============================================================       |  90%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |================================================================      |  92%
  |                                                                            
  |=================================================================     |  92%
  |                                                                            
  |=================================================================     |  93%
  |                                                                            
  |==================================================================    |  94%
  |                                                                            
  |===================================================================   |  95%
  |                                                                            
  |===================================================================   |  96%
  |                                                                            
  |====================================================================  |  97%
  |                                                                            
  |====================================================================  |  98%
  |                                                                            
  |===================================================================== |  98%
  |                                                                            
  |===================================================================== |  99%
  |                                                                            
  |======================================================================| 100%
nhblack19$tract <- word(nhblack19$NAME,3, sep= " ") 
nhblack19$tract <- str_remove(nhblack19$tract, ",")
nhblack19 <- nhblack19 %>% filter( tract %in% c( "1110", "1214.04", "1302", "1303", "1304.01", "1304.02", "1305", "1306", "1307", "1308", "1309", "1310", "1311", "1312", "1313", "1401", "1404", "1405", "1919"))
nhblack13$tract <- word(nhblack13$NAME,3, sep= " ") 
nhblack13$tract <- str_remove(nhblack13$tract, ",")
nhblack13 <- nhblack13 %>% filter( tract %in% c( "1110", "1214.04", "1302", "1303", "1304.01", "1304.02", "1305", "1306", "1307", "1308", "1309", "1310", "1311", "1312", "1313", "1401", "1404", "1405", "1919"))
nhblack13$black13 <- nhblack13$estimate
nhblack19$black19 <- nhblack19$estimate

st_geometry(nhblack19) <- NULL
nhblackmap <- left_join(nhblack13, nhblack19, by=c("GEOID"="GEOID"))
nhblackmap$`Percent Change` <- (nhblackmap$black13-nhblackmap$black19)


p <- tm_shape(nhblackmap, unit = "mi") +tm_basemap(server = "OpenStreetMap") +  tm_polygons(c("Percent Change"), border.alpha = 0.2,
              palette="RdYlGn", style = "pretty") + tm_text('tract.y', size = 0.55) + tm_layout(title = "Percent Change Non-Hispanic Black, 2013-2019", title.size = 1,title.fontface = "bold",bg.color =  "white" ,legend.bg.color = "snow2",legend.just = "left",inner.margins = 0.09 , legend.frame = FALSE) + tm_compass(position = "left")+ tm_scale_bar(position = "left") 

p
Variable(s) "Percent Change" contains positive and negative values, so midpoint is set to 0. Set midpoint = NA to show the full spectrum of the color palette.

for (i in 2013:2016){
assign(x = paste0("WHITE",i),get_acs(state = "TX", county = "Bexar",geography = "tract", variables = "DP05_0072PE", year = i))
}
Getting data from the 2009-2013 5-year ACS
Using the ACS Data Profile
Getting data from the 2010-2014 5-year ACS
Using the ACS Data Profile
Getting data from the 2011-2015 5-year ACS
Using the ACS Data Profile
Getting data from the 2012-2016 5-year ACS
Using the ACS Data Profile
for (i in 2017:2019){
assign(x = paste0("WHITE",i),get_acs(state = "TX", county = "Bexar",geography = "tract", variables = "DP05_0077PE", year = i))
}
Getting data from the 2013-2017 5-year ACS
Using the ACS Data Profile
Getting data from the 2014-2018 5-year ACS
Using the ACS Data Profile
Getting data from the 2015-2019 5-year ACS
Using the ACS Data Profile
WHITE2013$year <- 2013
WHITE2014$year <- 2014
WHITE2015$year <- 2015 
WHITE2016$year <- 2016
WHITE2017$year <- 2017
WHITE2018$year <- 2018
WHITE2019$year <- 2019

WHITE <- list(WHITE2013, WHITE2014, WHITE2015,WHITE2016, WHITE2017, WHITE2018, WHITE2019)

data_WHITE <- rbind(WHITE2013, WHITE2014, WHITE2015,WHITE2016, WHITE2017, WHITE2018, WHITE2019)

rm(WHITE2013, WHITE2014, WHITE2015,WHITE2016, WHITE2017, WHITE2018, WHITE2019)

data_WHITE$tract <- word(data_WHITE$NAME,3, sep= " ") 
data_WHITE$tract <- str_remove(data_WHITE$tract, ",")


WHITE_tract <- data_WHITE %>% filter( tract %in% c( "1110", "1214.04", "1302", "1303", "1304.01", "1304.02", "1305", "1306", "1307", "1308", "1309", "1310", "1311", "1312", "1313", "1401", "1404", "1405", "1919"))


WHITE_tract_C <- WHITE_tract[WHITE_tract$year  %in% c(2013, 2019),] %>% select(tract, year, estimate) %>% pivot_wider(names_from = year, values_from = estimate)

WHITE_tract_C$Delta <- WHITE_tract_C$`2019` - WHITE_tract_C$`2013` 


Change <- rbind(slice_min(WHITE_tract_C, order_by = abs(Delta), n= 1), 
      slice_max(WHITE_tract_C, order_by = (Delta), n= 1), 
      slice_min(WHITE_tract_C, order_by = (Delta), n= 1)) 



names = c("Most Stable","Greatest Increase", "Greatest Decrease")

WHITE_tract <- left_join(WHITE_tract, cbind(Change,names), "tract")



df = WHITE_tract

Plot <-
  ggplot(data = df, aes(y = estimate, x = year, group = year)) + geom_boxplot(color = "azure4", fill = "linen") + geom_point(alpha = 0.3, color = "darkgrey") +  geom_line(aes(group = tract), alpha = 0.09) +
  geom_line(
    data = subset(
      df,
      names %in% c("Greatest Increase", "Most Stable", "Greatest Decrease")
    ),
    aes(
      group = tract,
      color = paste0(names, " (Tract ", tract, ", ", round(Delta), "%", ")")
    ),
    size = 1.25
  ) +
  scale_color_discrete(name = "") +
  ggpubr::theme_pubr() +
  ylab("Percent of Population Non-Hispanic White") +
  xlab("Year") +
  ggtitle(label = "Percent Change in Population Percent Non-Hispanic White, 2013-2019", subtitle = "Census Tracts San Antonio Promise Zone") +
  theme(
    plot.title = element_text(
      size = 12,
      face = "bold",
      family = "Sans", hjust = 0.5
    ),axis.title.x = element_text(face = "bold", size = 9),
    axis.title.y = element_text(face = "bold", size =9),
    legend.spacing.x = unit(0.2, 'cm'), plot.subtitle = element_text(hjust = 0.5),
    legend.background = element_rect(color = "white", fill = "snow2"), legend.text = element_text(size = 7.5), legend.direction = "horizontal", legend.position = "top", plot.caption = element_text(size =8, color = "darkgrey"), plot.background = element_rect(color = "black", fill = NA)
  )+labs(caption= "Source: American Community Survey \n Authors: Julia Kay Wolf, Drew Schaefer, Jacob M. Souch")


Plot
Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
family not found in Windows font database

Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
family not found in Windows font database

Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
family not found in Windows font database

for (i in 2013:2016){
assign(x = paste0("HISPANIC",i),get_acs(state = "TX", county = "Bexar",geography = "tract", variables = "DP05_0066PE", year = i))
}
Getting data from the 2009-2013 5-year ACS
Using the ACS Data Profile
Getting data from the 2010-2014 5-year ACS
Using the ACS Data Profile
Getting data from the 2011-2015 5-year ACS
Using the ACS Data Profile
Getting data from the 2012-2016 5-year ACS
Using the ACS Data Profile
for (i in 2017:2019){
assign(x = paste0("HISPANIC",i),get_acs(state = "TX", county = "Bexar",geography = "tract", variables = "DP05_0071PE", year = i))
}
Getting data from the 2013-2017 5-year ACS
Using the ACS Data Profile
Getting data from the 2014-2018 5-year ACS
Using the ACS Data Profile
Getting data from the 2015-2019 5-year ACS
Using the ACS Data Profile
HISPANIC2013$year <- 2013
HISPANIC2014$year <- 2014
HISPANIC2015$year <- 2015 
HISPANIC2016$year <- 2016
HISPANIC2017$year <- 2017
HISPANIC2018$year <- 2018
HISPANIC2019$year <- 2019

HISPANIC <- list(HISPANIC2013, HISPANIC2014, HISPANIC2015,HISPANIC2016, HISPANIC2017, HISPANIC2018, HISPANIC2019)

data_HISPANIC <- rbind(HISPANIC2013, HISPANIC2014, HISPANIC2015,HISPANIC2016, HISPANIC2017, HISPANIC2018, HISPANIC2019)

rm(HISPANIC2013, HISPANIC2014, HISPANIC2015,HISPANIC2016, HISPANIC2017, HISPANIC2018, HISPANIC2019)

data_HISPANIC$tract <- word(data_HISPANIC$NAME,3, sep= " ") 
data_HISPANIC$tract <- str_remove(data_HISPANIC$tract, ",")


HISPANIC_tract <- data_HISPANIC %>% filter( tract %in% c( "1110", "1214.04", "1302", "1303", "1304.01", "1304.02", "1305", "1306", "1307", "1308", "1309", "1310", "1311", "1312", "1313", "1401", "1404", "1405", "1919"))


HISPANIC_tract_C <- HISPANIC_tract[HISPANIC_tract$year  %in% c(2013, 2019),] %>% select(tract, year, estimate) %>% pivot_wider(names_from = year, values_from = estimate)

HISPANIC_tract_C$Delta <- HISPANIC_tract_C$`2019` - HISPANIC_tract_C$`2013` 


Change <- rbind(slice_min(HISPANIC_tract_C, order_by = abs(Delta), n= 1), 
      slice_max(HISPANIC_tract_C, order_by = (Delta), n= 1), 
      slice_min(HISPANIC_tract_C, order_by = (Delta), n= 1)) 



names = c("Most Stable","Greatest Increase", "Greatest Decrease")

HISPANIC_tract <- left_join(HISPANIC_tract, cbind(Change,names), "tract")



df = HISPANIC_tract

Plot <-
  ggplot(data = df, aes(y = estimate, x = year, group = year)) + geom_boxplot(color = "azure4", fill = "linen") + geom_point(alpha = 0.3, color = "darkgrey") +  geom_line(aes(group = tract), alpha = 0.09) +
  geom_line(
    data = subset(
      df,
      names %in% c("Greatest Increase", "Most Stable", "Greatest Decrease")
    ),
    aes(
      group = tract,
      color = paste0(names, " (Tract ", tract, ", ", round(Delta), "%", ")")
    ),
    size = 1.25
  ) +
  scale_color_discrete(name = "") +
  ggpubr::theme_pubr() +
  ylab("Percent of Population Hispanic") +
  xlab("Year") +
  ggtitle(label = "Percent Change in Population Percent Hispanic, 2013-2019", subtitle = "Census Tracts San Antonio Promise Zone") +
  theme(
    plot.title = element_text(
      size = 12,
      face = "bold",
      family = "Sans", hjust = 0.5
    ),axis.title.x = element_text(face = "bold", size = 9),
    axis.title.y = element_text(face = "bold", size =9),
    legend.spacing.x = unit(0.2, 'cm'), plot.subtitle = element_text(hjust = 0.5),
    legend.background = element_rect(color = "white", fill = "snow2"), legend.text = element_text(size = 7.5), legend.direction = "horizontal", legend.position = "top", plot.caption = element_text(size =8, color = "darkgrey"), plot.background = element_rect(color = "black", fill = NA)
  )+labs(caption= "Source: American Community Survey \n Authors: Julia Kay Wolf, Drew Schaefer, Jacob M. Souch")


Plot
Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
family not found in Windows font database

Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
family not found in Windows font database

Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
family not found in Windows font database

hispanic19 <- get_acs(state = "TX", 
                   county = "Bexar",
                   geography = "tract", 
                   variables = "DP05_0071PE", 
                   geometry = TRUE,
                   year = 2019)
Getting data from the 2015-2019 5-year ACS
Downloading feature geometry from the Census website.  To cache shapefiles for use in future sessions, set `options(tigris_use_cache = TRUE)`.
Using the ACS Data Profile
hispanic13 <- get_acs(state = "TX", 
                   county = "Bexar",
                   geography = "tract", 
                   variables = "DP05_0066PE", 
                   geometry = TRUE,
                   year = 2013)
Getting data from the 2009-2013 5-year ACS
Downloading feature geometry from the Census website.  To cache shapefiles for use in future sessions, set `options(tigris_use_cache = TRUE)`.
Using the ACS Data Profile
hispanic19$tract <- word(hispanic19$NAME,3, sep= " ") 
hispanic19$tract <- str_remove(hispanic19$tract, ",")
hispanic19 <- hispanic19 %>% filter( tract %in% c( "1110", "1214.04", "1302", "1303", "1304.01", "1304.02", "1305", "1306", "1307", "1308", "1309", "1310", "1311", "1312", "1313", "1401", "1404", "1405", "1919"))
hispanic13$tract <- word(hispanic13$NAME,3, sep= " ") 
hispanic13$tract <- str_remove(hispanic13$tract, ",")
hispanic13 <- hispanic13 %>% filter( tract %in% c( "1110", "1214.04", "1302", "1303", "1304.01", "1304.02", "1305", "1306", "1307", "1308", "1309", "1310", "1311", "1312", "1313", "1401", "1404", "1405", "1919"))
hispanic13$hispanic13 <- hispanic13$estimate
hispanic19$hispanic19 <- hispanic19$estimate

st_geometry(hispanic19) <- NULL
hispanicmap <- left_join(hispanic13, hispanic19, by=c("GEOID"="GEOID"))
hispanicmap$`Percent Change` <- (hispanicmap$hispanic13-hispanicmap$hispanic19)

p <- tm_shape(hispanicmap, unit = "mi") +tm_basemap(server = "OpenStreetMap") +  tm_polygons(c("Percent Change"), border.alpha = 0.2,
              palette="RdYlGn", style = "pretty") + tm_text('tract.y', size = 0.55) + tm_layout(title = "Percent Change Hispanic, 2013-2019", title.size = 1,title.fontface = "bold",bg.color =  "white" ,legend.bg.color = "snow2",legend.just = "left",inner.margins = 0.09 , legend.frame = FALSE) + tm_compass(position = "left")+ tm_scale_bar(position = "left") 

p
Variable(s) "Percent Change" contains positive and negative values, so midpoint is set to 0. Set midpoint = NA to show the full spectrum of the color palette.

for (i in 2013:2018){
assign(x = paste0("HSORMORE",i),get_acs(state = "TX", county = "Bexar",geography = "tract", variables = "DP02_0066PE", year = i))
}
Getting data from the 2009-2013 5-year ACS
Using the ACS Data Profile
Getting data from the 2010-2014 5-year ACS
Using the ACS Data Profile
Getting data from the 2011-2015 5-year ACS
Using the ACS Data Profile
Getting data from the 2012-2016 5-year ACS
Using the ACS Data Profile
Getting data from the 2013-2017 5-year ACS
Using the ACS Data Profile
Getting data from the 2014-2018 5-year ACS
Using the ACS Data Profile
for (i in 2019:2019){
assign(x = paste0("HSORMORE",i),get_acs(state = "TX", county = "Bexar",geography = "tract", variables = "DP02_0067P", year = i))
}
Getting data from the 2015-2019 5-year ACS
Using the ACS Data Profile
HSORMORE2013$year <- 2013
HSORMORE2014$year <- 2014
HSORMORE2015$year <- 2015 
HSORMORE2016$year <- 2016
HSORMORE2017$year <- 2017
HSORMORE2018$year <- 2018
HSORMORE2019$year <- 2019

HSORMORE <- list(HSORMORE2013, HSORMORE2014, HSORMORE2015,HSORMORE2016, HSORMORE2017, HSORMORE2018, HSORMORE2019)

data_HSORMORE <- rbind(HSORMORE2013, HSORMORE2014, HSORMORE2015,HSORMORE2016, HSORMORE2017, HSORMORE2018, HSORMORE2019)

rm(HSORMORE2013, HSORMORE2014, HSORMORE2015,HSORMORE2016, HSORMORE2017, HSORMORE2018, HSORMORE2019)

data_HSORMORE$tract <- word(data_HSORMORE$NAME,3, sep= " ") 
data_HSORMORE$tract <- str_remove(data_HSORMORE$tract, ",")


HSORMORE_tract <- data_HSORMORE %>% filter( tract %in% c( "1110", "1214.04", "1302", "1303", "1304.01", "1304.02", "1305", "1306", "1307", "1308", "1309", "1310", "1311", "1312", "1313", "1401", "1404", "1405", "1919"))

HSORMORE_tract_C <- HSORMORE_tract[HSORMORE_tract$year  %in% c(2013, 2019),] %>% select(tract, year, estimate) %>% pivot_wider(names_from = year, values_from = estimate)

HSORMORE_tract_C$Delta <- HSORMORE_tract_C$`2019` - HSORMORE_tract_C$`2013` 


Change <- rbind(slice_min(HSORMORE_tract_C, order_by = abs(Delta), n= 1), 
      slice_max(HSORMORE_tract_C, order_by = (Delta), n= 1), 
      slice_min(HSORMORE_tract_C, order_by = (Delta), n= 1)) 


names = c("Most Stable","Greatest Increase", "Greatest Decrease")

HSORMORE_tract <- left_join(HSORMORE_tract, cbind(Change,names), "tract")



df = HSORMORE_tract

Plot <-
  ggplot(data = df, aes(y = estimate, x = year, group = year)) + geom_boxplot(color = "azure4", fill = "linen") + geom_point(alpha = 0.3, color = "darkgrey") +  geom_line(aes(group = tract), alpha = 0.09) +
  geom_line(
    data = subset(
      df,
      names %in% c("Greatest Increase", "Most Stable", "Greatest Decrease")
    ),
    aes(
      group = tract,
      color = paste0(names, " (Tract ", tract, ", ", round(Delta), "%", ")")
    ),
    size = 1.25
  ) +
  scale_color_discrete(name = "") +
  ggpubr::theme_pubr() +
  ylab("Percent of Population High School or More") +
  xlab("Year") +
  ggtitle(label = "Percent Change in Population Percent High School Education or More, 2013-2019", subtitle = "Census Tracts San Antonio Promise Zone") +
  theme(
    plot.title = element_text(
      size = 12,
      face = "bold",
      family = "Sans", hjust = 0.5
    ),axis.title.x = element_text(face = "bold", size = 9),
    axis.title.y = element_text(face = "bold", size =9),
    legend.spacing.x = unit(0.2, 'cm'), plot.subtitle = element_text(hjust = 0.5),
    legend.background = element_rect(color = "white", fill = "snow2"), legend.text = element_text(size = 7.5), legend.direction = "horizontal", legend.position = "top", plot.caption = element_text(size =8, color = "darkgrey"), plot.background = element_rect(color = "black", fill = NA)
  )+labs(caption= "Source: American Community Survey \n Authors: Julia Kay Wolf, Drew Schaefer, Jacob M. Souch")


Plot
Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
family not found in Windows font database

Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
family not found in Windows font database

Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
family not found in Windows font database

hs19 <- get_acs(state = "TX", 
                   county = "Bexar",
                   geography = "tract", 
                   variables = "DP02_0067P", 
                   geometry = TRUE,
                   year = 2019)
Getting data from the 2015-2019 5-year ACS
Downloading feature geometry from the Census website.  To cache shapefiles for use in future sessions, set `options(tigris_use_cache = TRUE)`.
Using the ACS Data Profile
hs13 <- get_acs(state = "TX", 
                   county = "Bexar",
                   geography = "tract", 
                   variables = "DP02_0066PE", 
                   geometry = TRUE,
                   year = 2013)
Getting data from the 2009-2013 5-year ACS
Downloading feature geometry from the Census website.  To cache shapefiles for use in future sessions, set `options(tigris_use_cache = TRUE)`.
Using the ACS Data Profile
hs19$tract <- word(hs19$NAME,3, sep= " ") 
hs19$tract <- str_remove(hs19$tract, ",")
hs19 <- hs19 %>% filter( tract %in% c( "1110", "1214.04", "1302", "1303", "1304.01", "1304.02", "1305", "1306", "1307", "1308", "1309", "1310", "1311", "1312", "1313", "1401", "1404", "1405", "1919"))
hs13$tract <- word(hs13$NAME,3, sep= " ") 
hs13$tract <- str_remove(hs13$tract, ",")
hs13 <- hs13 %>% filter( tract %in% c( "1110", "1214.04", "1302", "1303", "1304.01", "1304.02", "1305", "1306", "1307", "1308", "1309", "1310", "1311", "1312", "1313", "1401", "1404", "1405", "1919"))
hs13$hs13 <- hs13$estimate
hs19$hs19 <- hs19$estimate

st_geometry(hs19) <- NULL
hsmap <- left_join(hs13, hs19, by=c("GEOID"="GEOID"))
hsmap$`Percent Change` <- (hsmap$hs13-hsmap$hs19)

p <- tm_shape(hsmap, unit = "mi") +tm_basemap(server = "OpenStreetMap") +  tm_polygons(c("Percent Change"), border.alpha = 0.2,
              palette="RdYlGn", style = "pretty") + tm_text('tract.y', size = 0.55) + tm_layout(title = "Percent Change High School or Higher, 2013-2019", title.size = 1,title.fontface = "bold",bg.color =  "white" ,legend.bg.color = "snow2",legend.just = "left",inner.margins = 0.09 , legend.frame = FALSE) + tm_compass(position = "left")+ tm_scale_bar(position = "left") 

p
Variable(s) "Percent Change" contains positive and negative values, so midpoint is set to 0. Set midpoint = NA to show the full spectrum of the color palette.

for (i in 2013:2018){
assign(x = paste0("COLLORMORE",i),get_acs(state = "TX", county = "Bexar",geography = "tract", variables = "DP02_0067PE", year = i))
}
Getting data from the 2009-2013 5-year ACS
Using the ACS Data Profile
Getting data from the 2010-2014 5-year ACS
Using the ACS Data Profile
Getting data from the 2011-2015 5-year ACS
Using the ACS Data Profile
Getting data from the 2012-2016 5-year ACS
Using the ACS Data Profile
Getting data from the 2013-2017 5-year ACS
Using the ACS Data Profile
Getting data from the 2014-2018 5-year ACS
Using the ACS Data Profile
for (i in 2019:2019){
assign(x = paste0("COLLORMORE",i),get_acs(state = "TX", county = "Bexar",geography = "tract", variables = "DP02_0068PE", year = i))
}
Getting data from the 2015-2019 5-year ACS
Using the ACS Data Profile
COLLORMORE2013$year <- 2013
COLLORMORE2014$year <- 2014
COLLORMORE2015$year <- 2015 
COLLORMORE2016$year <- 2016
COLLORMORE2017$year <- 2017
COLLORMORE2018$year <- 2018
COLLORMORE2019$year <- 2019

COLLORMORE <- list(COLLORMORE2013, COLLORMORE2014, COLLORMORE2015,COLLORMORE2016, COLLORMORE2017, COLLORMORE2018, COLLORMORE2019)

data_COLLORMORE <- rbind(COLLORMORE2013, COLLORMORE2014, COLLORMORE2015,COLLORMORE2016, COLLORMORE2017, COLLORMORE2018, COLLORMORE2019)

rm(COLLORMORE2013, COLLORMORE2014, COLLORMORE2015,COLLORMORE2016, COLLORMORE2017, COLLORMORE2018, COLLORMORE2019)

data_COLLORMORE$tract <- word(data_COLLORMORE$NAME,3, sep= " ") 
data_COLLORMORE$tract <- str_remove(data_COLLORMORE$tract, ",")


COLLORMORE_tract <- data_COLLORMORE %>% filter( tract %in% c( "1110", "1214.04", "1302", "1303", "1304.01", "1304.02", "1305", "1306", "1307", "1308", "1309", "1310", "1311", "1312", "1313", "1401", "1404", "1405", "1919"))

COLLORMORE_tract_C <- COLLORMORE_tract[COLLORMORE_tract$year  %in% c(2013, 2019),] %>% select(tract, year, estimate) %>% pivot_wider(names_from = year, values_from = estimate)

COLLORMORE_tract_C$Delta <- COLLORMORE_tract_C$`2019` - COLLORMORE_tract_C$`2013` 


Change <- rbind(slice_min(COLLORMORE_tract_C, order_by = abs(Delta), n= 1), 
      slice_max(COLLORMORE_tract_C, order_by = (Delta), n= 1), 
      slice_min(COLLORMORE_tract_C, order_by = (Delta), n= 1)) 


names = c("Most Stable","Greatest Increase", "Greatest Decrease")

COLLORMORE_tract <- left_join(COLLORMORE_tract, cbind(Change,names), "tract")



df = COLLORMORE_tract

Plot <-
  ggplot(data = df, aes(y = estimate, x = year, group = year)) + geom_boxplot(color = "azure4", fill = "linen") + geom_point(alpha = 0.3, color = "darkgrey") +  geom_line(aes(group = tract), alpha = 0.09) +
  geom_line(
    data = subset(
      df,
      names %in% c("Greatest Increase", "Most Stable", "Greatest Decrease")
    ),
    aes(
      group = tract,
      color = paste0(names, " (Tract ", tract, ", ", round(Delta), "%", ")")
    ),
    size = 1.25
  ) +
  scale_color_discrete(name = "") +
  ggpubr::theme_pubr() +
  ylab("Percent of Population College or More") +
  xlab("Year") +
  ggtitle(label = "Percent Change in Population Percent College Education or More, 2013-2019", subtitle = "Census Tracts San Antonio Promise Zone") +
  theme(
    plot.title = element_text(
      size = 12,
      face = "bold",
      family = "Sans", hjust = 0.5
    ),axis.title.x = element_text(face = "bold", size = 9),
    axis.title.y = element_text(face = "bold", size =9),
    legend.spacing.x = unit(0.2, 'cm'), plot.subtitle = element_text(hjust = 0.5),
    legend.background = element_rect(color = "white", fill = "snow2"), legend.text = element_text(size = 7.5), legend.direction = "horizontal", legend.position = "top", plot.caption = element_text(size =8, color = "darkgrey"), plot.background = element_rect(color = "black", fill = NA)
  )+labs(caption= "Source: American Community Survey \n Authors: Julia Kay Wolf, Drew Schaefer, Jacob M. Souch")


Plot
Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
family not found in Windows font database

Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
family not found in Windows font database

Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
family not found in Windows font database

for (i in 2013:2019){
assign(x = paste0("POVERTY",i),get_acs(state = "TX", county = "Bexar",geography = "tract", variables = "DP03_0119P", year = i))
}
Getting data from the 2009-2013 5-year ACS
Using the ACS Data Profile
Getting data from the 2010-2014 5-year ACS
Using the ACS Data Profile
Getting data from the 2011-2015 5-year ACS
Using the ACS Data Profile
Getting data from the 2012-2016 5-year ACS
Using the ACS Data Profile
Getting data from the 2013-2017 5-year ACS
Using the ACS Data Profile
Getting data from the 2014-2018 5-year ACS
Using the ACS Data Profile
Getting data from the 2015-2019 5-year ACS
Using the ACS Data Profile
POVERTY2013$year <- 2013
POVERTY2014$year <- 2014
POVERTY2015$year <- 2015 
POVERTY2016$year <- 2016
POVERTY2017$year <- 2017
POVERTY2018$year <- 2018
POVERTY2019$year <- 2019

data_pov <- rbind(POVERTY2013, POVERTY2014, POVERTY2015,POVERTY2016, POVERTY2017, POVERTY2018, POVERTY2019)

Poverty <- list(POVERTY2013, POVERTY2014, POVERTY2015,POVERTY2016, POVERTY2017, POVERTY2018, POVERTY2019)

rm(POVERTY2013, POVERTY2014, POVERTY2015,POVERTY2016, POVERTY2017, POVERTY2018, POVERTY2019)

data_pov$tract <- word(data_pov$NAME,3, sep= " ") 
data_pov$tract <- str_remove(data_pov$tract, ",")


POVERTY_tract <- data_pov %>% filter( tract %in% c( "1110", "1214.04", "1302", "1303", "1304.01", "1304.02", "1305", "1306", "1307", "1308", "1309", "1310", "1311", "1312", "1313", "1401", "1404", "1405", "1919"))


POVERTY_tract_C <- POVERTY_tract[POVERTY_tract$year  %in% c(2013, 2019),] %>% select(tract, year, estimate) %>% pivot_wider(names_from = year, values_from = estimate)

POVERTY_tract_C$Delta <- POVERTY_tract_C$`2019` - POVERTY_tract_C$`2013` 


Change <- rbind(slice_min(POVERTY_tract_C, order_by = abs(Delta), n= 1), 
      slice_max(POVERTY_tract_C, order_by = (Delta), n= 1), 
      slice_min(POVERTY_tract_C, order_by = (Delta), n= 1)) 


names = c("Most Stable","Greatest Increase", "Greatest Decrease")

POVERTY_tract <- left_join(POVERTY_tract, cbind(Change,names), "tract")



df = POVERTY_tract

Plot <-
  ggplot(data = df, aes(y = estimate, x = year, group = year)) + geom_boxplot(color = "azure4", fill = "linen") + geom_point(alpha = 0.3, color = "darkgrey") +  geom_line(aes(group = tract), alpha = 0.09) +
  geom_line(
    data = subset(
      df,
      names %in% c("Greatest Increase", "Most Stable", "Greatest Decrease")
    ),
    aes(
      group = tract,
      color = paste0(names, " (Tract ", tract, ", ", round(Delta), "%", ")")
    ),
    size = 1.25
  ) +
  scale_color_discrete(name = "") +
  ggpubr::theme_pubr() +
  ylab("Percent of Population in Poverty") +
  xlab("Year") +
  ggtitle(label = "Percent Change in Population Percent Poverty, 2013-2019", subtitle = "Census Tracts San Antonio Promise Zone") +
  theme(
    plot.title = element_text(
      size = 12,
      face = "bold",
      family = "Sans", hjust = 0.5
    ),axis.title.x = element_text(face = "bold", size = 9),
    axis.title.y = element_text(face = "bold", size =9),
    legend.spacing.x = unit(0.2, 'cm'), plot.subtitle = element_text(hjust = 0.5),
    legend.background = element_rect(color = "white", fill = "snow2"), legend.text = element_text(size = 7.5), legend.direction = "horizontal", legend.position = "top", plot.caption = element_text(size =8, color = "darkgrey"), plot.background = element_rect(color = "black", fill = NA)
  )+labs(caption= "Source: American Community Survey \n Authors: Julia Kay Wolf, Drew Schaefer, Jacob M. Souch") 


Plot
Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
family not found in Windows font database

Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
family not found in Windows font database

Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
family not found in Windows font database

for (i in 2013:2019){
assign(x = paste0("EMPLOY",i),get_acs(state = "TX", county = "Bexar",geography = "tract", variables = "DP03_0005PE", year = i))
}
Getting data from the 2009-2013 5-year ACS
Using the ACS Data Profile
Getting data from the 2010-2014 5-year ACS
Using the ACS Data Profile
Getting data from the 2011-2015 5-year ACS
Using the ACS Data Profile
Getting data from the 2012-2016 5-year ACS
Using the ACS Data Profile
Getting data from the 2013-2017 5-year ACS
Using the ACS Data Profile
Getting data from the 2014-2018 5-year ACS
Using the ACS Data Profile
Getting data from the 2015-2019 5-year ACS
Using the ACS Data Profile
EMPLOY2013$year <- 2013
EMPLOY2014$year <- 2014
EMPLOY2015$year <- 2015 
EMPLOY2016$year <- 2016
EMPLOY2017$year <- 2017
EMPLOY2018$year <- 2018
EMPLOY2019$year <- 2019

EMPLOY <- list(EMPLOY2013, EMPLOY2014, EMPLOY2015,EMPLOY2016, EMPLOY2017, EMPLOY2018, EMPLOY2019)

data_emp <- rbind(EMPLOY2013, EMPLOY2014, EMPLOY2015,EMPLOY2016, EMPLOY2017, EMPLOY2018, EMPLOY2019)

rm(EMPLOY2013, EMPLOY2014, EMPLOY2015,EMPLOY2016, EMPLOY2017, EMPLOY2018, EMPLOY2019)

data_emp$tract <- word(data_emp$NAME,3, sep= " ") 
data_emp$tract <- str_remove(data_emp$tract, ",")


EMPLOYMENT_tract <- data_emp %>% filter( tract %in% c( "1110", "1214.04", "1302", "1303", "1304.01", "1304.02", "1305", "1306", "1307", "1308", "1309", "1310", "1311", "1312", "1313", "1401", "1404", "1405", "1919"))


EMPLOYMENT_tract_C <- EMPLOYMENT_tract[EMPLOYMENT_tract$year  %in% c(2013, 2019),] %>% select(tract, year, estimate) %>% pivot_wider(names_from = year, values_from = estimate)

EMPLOYMENT_tract_C$Delta <- EMPLOYMENT_tract_C$`2019` - EMPLOYMENT_tract_C$`2013` 


Change <- rbind(slice_min(EMPLOYMENT_tract_C, order_by = abs(Delta), n= 1), 
      slice_max(EMPLOYMENT_tract_C, order_by = (Delta), n= 1), 
      slice_min(EMPLOYMENT_tract_C, order_by = (Delta), n= 1)) 


names = c("Most Stable","Greatest Increase", "Greatest Decrease")

EMPLOYMENT_tract <- left_join(EMPLOYMENT_tract, cbind(Change,names), "tract")



df = EMPLOYMENT_tract

Plot <-
  ggplot(data = df, aes(y = estimate, x = year, group = year)) + geom_boxplot(color = "azure4", fill = "linen") + geom_point(alpha = 0.3, color = "darkgrey") +  geom_line(aes(group = tract), alpha = 0.09) +
  geom_line(
    data = subset(
      df,
      names %in% c("Greatest Increase", "Most Stable", "Greatest Decrease")
    ),
    aes(
      group = tract,
      color = paste0(names, " (Tract ", tract, ", ", round(Delta), "%", ")")
    ),
    size = 1.25
  ) +
  scale_color_discrete(name = "") +
  ggpubr::theme_pubr() +
  ylab("Percent of Population 16+ Unemployed") +
  xlab("Year") +
  ggtitle(label = "Percent Change in Population Percent 16+ Unemployed, 2013-2019", subtitle = "Census Tracts San Antonio Promise Zone") +
  theme(
    plot.title = element_text(
      size = 12,
      face = "bold",
      family = "Sans", hjust = 0.5
    ),axis.title.x = element_text(face = "bold", size = 9),
    axis.title.y = element_text(face = "bold", size =9),
    legend.spacing.x = unit(0.2, 'cm'), plot.subtitle = element_text(hjust = 0.5),
    legend.background = element_rect(color = "white", fill = "snow2"), legend.text = element_text(size = 7.5), legend.direction = "horizontal", legend.position = "top", plot.caption = element_text(size =8, color = "darkgrey"), plot.background = element_rect(color = "black", fill = NA)
  )+labs(caption= "Source: American Community Survey \n Authors: Julia Kay Wolf, Drew Schaefer, Jacob M. Souch") 

Plot
Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
family not found in Windows font database

Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
family not found in Windows font database

Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
family not found in Windows font database