Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 1 month ago
JSON representation
π΅π½ββοΈ Identifying the author behind New York Timeβs op-ed from inside the Trump White House.
- Host: GitHub
- URL: https://github.com/mkearney/resist_oped
- Owner: mkearney
- Created: 2018-09-05T23:27:03.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-10T16:47:08.000Z (over 6 years ago)
- Last Synced: 2024-05-19T14:22:06.925Z (8 months ago)
- Language: R
- Homepage: https://github.com/mkearney/resist_oped
- Size: 1.77 MB
- Stars: 201
- Watchers: 14
- Forks: 41
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
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
```