# Load libraries
library(tidyverse)
library(here)
library(skimr)
library(janitor)
library(scales)
library(RColorBrewer)

Introduction

The Tennessee Department of Economic Development (TNECD) provides grants through the FastTrack grant program to businesses looking to expand their operations in Tennessee. They do this to encourage job creation and other beneficial economic activities. Because FastTrack grants make up a substantial public expenditure, it is important to understand the nature of the program.

For example, where are new jobs created by incentivized investments going? Also, how does the number of new jobs impact how much grant money the TNECD provides? And does the economic state of a county effect how much grant money per job the TNECD provides there?

To answer these questions, I will use data downloaded from the TNECD FastTrack Project Database.

# read in data
projects <- read_csv(here("data", "FastTrackProjectDatabase.csv"),
                     locale=locale(encoding="latin1"))

head(projects)
## # A tibble: 6 × 12
##   Company         `Landed Month / Year` `Capital Investment` `Incentivized Jobs`
##   <chr>           <chr>                 <chr>                              <dbl>
## 1 3M Company      1/20/2022             $466,200,000                         585
## 2 Eagle Bend Man… 10/1/2015             $54,900,000                          127
## 3 Dura-Line Corp… 10/27/2015            $23,258,120                           70
## 4 Mirion Technol… 7/31/2021             $8,820,000                            76
## 5 MAG USA, Inc.   11/30/2017            $600,000                              32
## 6 Duksan Electer… 7/27/2022             $94,624,389                          101
## # ℹ 8 more variables: ` New Jobs ` <dbl>, `Project Type` <chr>, County <chr>,
## #   `County Tier` <dbl>, FJTAP <chr>, FIDP <chr>, ED <chr>,
## #   `Grants Total` <chr>



Data Preparation

Before any analysis can take place, the data needs to be prepared and a few fields need to be mutated and calculated.

projectplot <- projects %>%
  clean_names() %>% # column names will change here.
  rename(landed_date = landed_month_year) %>%
  mutate_at("grants_total", parse_number) %>% # removes special characters between numbers
  mutate_at("grants_total", as.numeric) %>% # converts characters to numbers
  mutate(ppj = grants_total / new_jobs) %>% # calculate Price Per Job for use later
  select(company, county, new_jobs, grants_total, ppj, county_tier)

#convert tiers to factors for categorization
projectplot$county_tier <- as.factor(projectplot$county_tier)


Analysis

Where are all the new jobs going?

Tennessee has 95 counties, 86 of which have received FastTrack projects since 2015. Since a major goal of the TNECD is to improve economically distressed counties, they assign a tier to every county rating its economic status: Tier 1 being the best-off and Tier 4 being the worst-off. With that in mind, which counties are receiving the most jobs, and are those counties the ones that need new jobs the most?

#plot counties on a bar chart by total new jobs and county tier
projectplot %>% 
  drop_na(county, new_jobs, county_tier) %>% 
  group_by(county, county_tier) %>% 
  summarise(totaljobs = sum(new_jobs)) %>% 
  ggplot(aes(x = reorder(county, totaljobs), #Puts bars in order by totals
             y = totaljobs,
             fill = county_tier)) +
  geom_col(width = .9, height = .3) +
  coord_flip() +
  theme_bw() +
  scale_y_continuous(labels = label_comma()) + 
  scale_fill_brewer(name = "County Tier",
                    palette = "RdYlBu",
                    direction = -1) + # Reverses the color palette order
  labs(title = "Total New Jobs by County",
       x = "County",
       y = "New Jobs")
**Figure 1**: Of the top 10 counties for new jobs, 9 are Tier 1 counties, meaning they are the least economically distressed. Many of more distressed counties (Tier 3 and 4) fall in the bottom half of the list having received far fewer new jobs.

Figure 1: Of the top 10 counties for new jobs, 9 are Tier 1 counties, meaning they are the least economically distressed. Many of more distressed counties (Tier 3 and 4) fall in the bottom half of the list having received far fewer new jobs.


Looking at Figure 1, it becomes obvious that most of the new jobs being created are ending up in Tier 1 and 2 counties, counties that are already considered well off. Of the top 10 counties, only one, Shelby County (Memphis) is Tier 2. A possible explanation for this is that companies expanding their operations find the well-off counties more desirable for doing business. Also, many of the counties near the top are densely populated, meaning companies have access to large labor markets. In fact, the top 10 most populated counties in Tennessee according to World Population Review are near the top of the list for new jobs. Davidson County (Nashville) alone received nearly 30,000 new jobs, and Shelby County received nearly 15,000 new jobs. In contrast, many of the more distressed counties have received less than a thousand new jobs.

Figure 2 exemplifies the differences between the four tiers in the total number of jobs they have received. It is also important to keep in mind that the TNECD still provides incentives for companies doing business in Tier 1 and 2 counties. These charts show that the counties that need the jobs the most are not the ones receiving them.

projectplot %>% 
  drop_na(new_jobs, county_tier) %>% 
  group_by(county_tier) %>% 
  summarise(totaljobs = sum(new_jobs)) %>% 
  ggplot(aes(x = county_tier,
             y = totaljobs,
             fill = county_tier)) +
  geom_col(width = .9) +
  theme_bw() +
  scale_y_continuous(labels = label_comma()) + 
  scale_fill_brewer(name = "County Tier",
                    palette = "RdYlBu",
                    direction = -1) +
  labs(title = "Total New Jobs by Tier",
       x = "County Tier",
       y = "New Jobs")
**Figure 2**: Tier 1 and 2 far exceed Tier 3 and 4 in the number of new jobs received since 2015.

Figure 2: Tier 1 and 2 far exceed Tier 3 and 4 in the number of new jobs received since 2015.

# Save to png
ggsave(here("output", "NewJobsByTier.png"))


How does the number of new jobs created impact the grants provided?

Because Tier 1 and 2 counties are receiving the most new jobs, it is also important to understand how the number of new jobs corresponds to the size of the grants provided.

#plot new jobs against grant totals
projectplot %>% 
  drop_na(new_jobs, grants_total, county_tier) %>% 
  #Remove Oracle and companies with no new jobs
  filter(new_jobs < 2500, new_jobs > 0) %>%  
  ggplot(aes(x = new_jobs, y = grants_total)) +
  geom_point(aes(color = county_tier)) +
  geom_smooth(color = "black") +
  theme_bw() +
  scale_y_continuous(labels = label_number(scale = .000001, prefix = "$", suffix = "M")) + #Converts to reader friendly format
   scale_color_brewer(name = "County Tier",
                    palette = "RdYlBu",
                    direction = -1) +
  labs(title = "FastTrack grants per project in relation to the new job count",
       subtitle = "Excluding Oracle and grant recipients with no new jobs",
       x = "New Jobs",
       y = "Total Grants")
**Figure 3**: The trendline curves slightly upwards indicating that grant amounts increase at a higher rate when more jobs are being created. This plot excludes grant recipients that created zero jobs and Oracle, who is receiving $65 million in grants and creating 8,500 new jobs.

Figure 3: The trendline curves slightly upwards indicating that grant amounts increase at a higher rate when more jobs are being created. This plot excludes grant recipients that created zero jobs and Oracle, who is receiving $65 million in grants and creating 8,500 new jobs.


In Figure 3, the amount of grants a project receives appears to increase at a slightly faster rate as the number of new jobs created increases, meaning the TNECD may be willing to pay out a little more when the volume of new jobs is high. As established previously, many of those projects with high job counts are in Tier 1 and 2 counties.

Regardless of county tiers, the relationship between the number of new jobs and the grants provided seems relatively consistent for the majority of projects that fall under $10 million in grants and 1000 jobs created. More analysis is needed to see if the tier effects the price per job the TNECD is willing to provide in grants.


Does the county tier effect the price per job?

While Figure 3 may suggest that the TNECD is willing to pay more in grants to companies creating more jobs even for Tier 1 counties, it does not say much about how much the TNECD is paying per job on average. Figure 4 shows the distribution of prices per job broken down by each tier level.

projectplot %>%
  drop_na(grants_total, new_jobs) %>% 
  filter(new_jobs > 0) %>% # will prevent infinite values in next step
  # Create a grants per job field by dividing grants by job for each project.
  mutate(ppj = grants_total / new_jobs) %>% 
  # plot ppj by tier
  ggplot(aes(x = county_tier, y = ppj, fill = county_tier)) +
  geom_boxplot() +
  theme_bw() +
  scale_y_continuous(labels = label_currency()) + 
  scale_fill_brewer(name = "County Tier",
                    palette = "RdYlBu",
                    direction = -1) +
  scale_color_brewer(name = "County Tier",
                    palette = "RdYlBu",
                    direction = -1) +
  labs(title = "Distribution of Price Per Job by County Tier",
       x = "County Tier",
       y = "Price Per Job")
**Figure 4**: On average, the TNECD pays the most in grants per job for Tier 4 counties, followed by Tier 3 counties. However, there are many outliers in Tier 1 and 2.

Figure 4: On average, the TNECD pays the most in grants per job for Tier 4 counties, followed by Tier 3 counties. However, there are many outliers in Tier 1 and 2.


On average, the TNECD pays the least per job in Tier 1 and 2 counties and the most per job in Tier 3 and 4. It makes sense that they are willing to pay more in grants to create jobs where they are needed most. However, considering which counties have received the most jobs, the variation in the rate may not matter much.

In this case, it is also important to consider that Tier 1 and 2 also have many outliers. While they may spend less on average, the outliers indicate that there have been quite a few instances where the TNECD payed far above average rates to create jobs in those areas. Moving forward, the TNECD may need to consider if those projects are worth the expense and if that spending is detracting from counties that could use the help more.