Executive Summary

Rendered at 10:38 AM, Apr. 17, 2023

Ryan Thornburg ()

This analysis accompanies the full report by Carissa Byrne Hessick and Amy Ullrick as part of the the Prosecutors and Politics Project at the UNC School of Law.

Code for loading the data as well as additional information about the code and data is available on GitHub.

Which states and contests did we cover?

Code
all_mentions %>% 
  group_by(state, contest) %>%
  summarize(mentions=n())  %>% 
  mutate(mentions = case_when(
    contest == "Butler" ~ 0,
    TRUE ~ as.numeric(mentions))
    ) %>%
  datatable(options = list(dom='t',
                         pageLength = 27),
            colnames = c('State', 'Contest', 'Mentions'),
          rownames = FALSE)

How many articles did we code?

Code
inc_unique_articles <- incumbents %>% 
  filter(duplicative_publication_of_previous_article == "0")

nrow(inc_unique_articles)
[1] 1646

1,646 articles that mention incumbents that are coded as unique.

Code
ninc_unique_articles <- non_incumbents %>% filter(duplicative_publication_of_previous_article == "0" & duplicative_of_incumbent_article == "0")

nrow(ninc_unique_articles)
[1] 328

328 articles that mention non-incumbents that are coded as unique.

We did not determine whether an article was unique across the whole data set. For example, if an article mentions two different challengers, it would appear in our data twice.

What types of articles did we have?

1 = news story

2 = opinion or editorial

3 = letter to the editor

4 = advertisement/notification

99 = other

Code
combined_unique_articles <- bind_rows(inc_unique_articles, ninc_unique_articles) 

combined_unique_articles %>%
    tabyl(type_of_article) %>%
  datatable(options = list(dom='t'),
            rownames = FALSE,
            colnames = c('Type', '# of articles', '% of articles')) %>%
  formatPercentage('percent', 2) %>%
  formatRound('n', digits = 0)

How competitive was each contest we analyzed?

Note: In Lake County, Oregon, there was no incumbent following the resignation of the previous district attorney in 2018. In other contests marked as “open,” the incumbent did not run but did receive news coverage.

Code
competitiveness %>%
  select(state, contest, type, incumbents, non_incumbents) %>% 
  datatable(options = list(dom='t',
                         pageLength = 27),
            colnames = c('State', 'Contest', 'Competitiveness', 'Incumbents', 'Challengers'),
          rownames = FALSE)