## ── Attaching packages ──────────────────────────────────────────────────────────────────────────────────── tidyverse 1.2.1 ──
## ✔ ggplot2 3.0.0 ✔ purrr 0.2.5
## ✔ tibble 1.4.2 ✔ dplyr 0.7.7
## ✔ tidyr 0.8.1 ✔ stringr 1.3.1
## ✔ readr 1.1.1 ✔ forcats 0.3.0
## ── Conflicts ─────────────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
Brexit subset only
# brexit only
headlines_all_processed %>% filter(search_term %in% "brexit") %>% nrow()
## [1] 1041
headlines_all_processed %>% filter(search_term %in% "brexit") %>% group_by(publication_simplified) %>% summarise(n=n())
## # A tibble: 11 x 2
## publication_simplified n
## <chr> <int>
## 1 Daily Mail 87
## 2 Daily Mirror 76
## 3 Daily Star 2
## 4 Daily Telegraph 159
## 5 People 1
## 6 The Express 323
## 7 The Guardian 105
## 8 The Independent 176
## 9 The Observer 10
## 10 The Sun 21
## 11 Times 81
headlines_all_processed %>% filter(search_term %in% "brexit") %>% group_by(publication_politics) %>% summarise(n=n())
## # A tibble: 3 x 2
## publication_politics n
## <chr> <int>
## 1 centre 179
## 2 left 191
## 3 right 671
headlines_all_processed %>% filter(search_term %in% "brexit") %>% group_by(publication_format) %>% summarise(n=n())
## # A tibble: 3 x 2
## publication_format n
## <chr> <int>
## 1 broadsheet 355
## 2 online 176
## 3 tabloid 510
headlines_all_processed %>% filter(search_term %in% "brexit") %>% group_by(publication_simplified,publication_format,publication_politics) %>% summarise(n=n())
## # A tibble: 11 x 4
## # Groups: publication_simplified, publication_format [?]
## publication_simplified publication_format publication_politics n
## <chr> <chr> <chr> <int>
## 1 Daily Mail tabloid right 87
## 2 Daily Mirror tabloid left 76
## 3 Daily Star tabloid centre 2
## 4 Daily Telegraph broadsheet right 159
## 5 People tabloid centre 1
## 6 The Express tabloid right 323
## 7 The Guardian broadsheet left 105
## 8 The Independent online centre 176
## 9 The Observer broadsheet left 10
## 10 The Sun tabloid right 21
## 11 Times broadsheet right 81
Non-Brexit subset only
# non-brexit only
headlines_all_processed %>% filter(!search_term %in% "brexit") %>% nrow()
## [1] 44
headlines_all_processed %>% filter(!search_term %in% "brexit") %>% group_by(publication_simplified) %>% summarise(n=n())
## # A tibble: 8 x 2
## publication_simplified n
## <chr> <int>
## 1 Daily Mail 5
## 2 Daily Mirror 3
## 3 Daily Telegraph 13
## 4 The Express 9
## 5 The Guardian 4
## 6 The Independent 8
## 7 The Observer 1
## 8 Times 1
headlines_all_processed %>% filter(!search_term %in% "brexit") %>% group_by(publication_politics) %>% summarise(n=n())
## # A tibble: 3 x 2
## publication_politics n
## <chr> <int>
## 1 centre 8
## 2 left 8
## 3 right 28
headlines_all_processed %>% filter(!search_term %in% "brexit") %>% group_by(publication_format) %>% summarise(n=n())
## # A tibble: 3 x 2
## publication_format n
## <chr> <int>
## 1 broadsheet 19
## 2 online 8
## 3 tabloid 17
headlines_all_processed %>% filter(!search_term %in% "brexit") %>% group_by(publication_simplified,publication_format,publication_politics) %>% summarise(n=n())
## # A tibble: 8 x 4
## # Groups: publication_simplified, publication_format [?]
## publication_simplified publication_format publication_politics n
## <chr> <chr> <chr> <int>
## 1 Daily Mail tabloid right 5
## 2 Daily Mirror tabloid left 3
## 3 Daily Telegraph broadsheet right 13
## 4 The Express tabloid right 9
## 5 The Guardian broadsheet left 4
## 6 The Independent online centre 8
## 7 The Observer broadsheet left 1
## 8 Times broadsheet right 1
All headlines
# **1.6. take a look at some summaries====
# all_groups
headlines_all_processed %>% nrow()
## [1] 1085
headlines_all_processed %>% group_by(publication_simplified) %>% summarise(n=n())
## # A tibble: 11 x 2
## publication_simplified n
## <chr> <int>
## 1 Daily Mail 92
## 2 Daily Mirror 79
## 3 Daily Star 2
## 4 Daily Telegraph 172
## 5 People 1
## 6 The Express 332
## 7 The Guardian 109
## 8 The Independent 184
## 9 The Observer 11
## 10 The Sun 21
## 11 Times 82
headlines_all_processed %>% group_by(publication_politics) %>% summarise(n=n())
## # A tibble: 3 x 2
## publication_politics n
## <chr> <int>
## 1 centre 187
## 2 left 199
## 3 right 699
headlines_all_processed %>% group_by(publication_format) %>% summarise(n=n())
## # A tibble: 3 x 2
## publication_format n
## <chr> <int>
## 1 broadsheet 374
## 2 online 184
## 3 tabloid 527
headlines_all_processed %>% group_by(publication_simplified,publication_format,publication_politics) %>% summarise(n=n())
## # A tibble: 11 x 4
## # Groups: publication_simplified, publication_format [?]
## publication_simplified publication_format publication_politics n
## <chr> <chr> <chr> <int>
## 1 Daily Mail tabloid right 92
## 2 Daily Mirror tabloid left 79
## 3 Daily Star tabloid centre 2
## 4 Daily Telegraph broadsheet right 172
## 5 People tabloid centre 1
## 6 The Express tabloid right 332
## 7 The Guardian broadsheet left 109
## 8 The Independent online centre 184
## 9 The Observer broadsheet left 11
## 10 The Sun tabloid right 21
## 11 Times broadsheet right 82