Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mkearney/resist_oped

πŸ•΅πŸ½β€β™€οΈ Identifying the author behind New York Time’s op-ed from inside the Trump White House.
https://github.com/mkearney/resist_oped

Last synced: about 2 months ago
JSON representation

πŸ•΅πŸ½β€β™€οΈ Identifying the author behind New York Time’s op-ed from inside the Trump White House.

Awesome Lists containing this project

README

        

---
output:
github_document:
df_print: kable
---

```{r setup, include = FALSE}
knitr::opts_chunk$set(
echo = FALSE,
collapse = TRUE,
comment = "#>"
)
library(tidyverse)
```
# resist_oped

πŸ•΅πŸ½
♀️ Identifying the author behind New York Time's op-ed from [*inside the Trump White House*](https://www.nytimes.com/2018/09/05/opinion/trump-white-house-anonymous-resistance.html).

```{r}
## corr matrix
mat <- readRDS("data/mat.rds")

## plot estimates
est <- cor(t(mat))[, "op-ed"] %>% sort()
```

I compared the paragraphs of the op-ed to tweets posted to timelines by members of the Cabinet. Here's what I found:

## Method

I've written an [explanation post](resist-oped-text-similarity.md), which I expect to publish at TBD outlet.

## Code/Estimates

See the [analysis](R/01-features.R) (to replicate, btw, start here as well) and [visualization](R/02-plot.R) code.

Download the [raw estimates here](estimates.csv) or view the results below:

```{r}
## print matrix
results <- cor(t(mat))[, "op-ed"] %>% sort(decreasing = TRUE) %>% data.frame(author = names(.), r = ., stringsAsFactors = FALSE, row.names = NULL) %>% `names<-`(c("author", "r"))
write.csv(results, "estimates.csv", row.names = FALSE)
results
```