Learn R Programming

rodham

Fetch and process Hillary Rodham Clinton's personal emails. See site for more details.

Installation

You can install rodham from CRAN or Github with:

# from CRAN
install.packages("rodham")

# dev version
devtools::install_github("JohnCoene/rodham")

Example

Data

# load emails
data(emails)

# build graph
edges <- edges_emails(emails)
g <- igraph::graph.data.frame(edges)

# plot 
plot(g)

Download contents

See "how-to" vignette for more examples!

ext <- get_xpdf() # get pdf extractor

# get emails related to Benghazi released in December
emails_bengh <- get_emails(release = "Benghazi", extractor = ext)

# load contents
hrc_emails <- load_emails(emails_bengh)

print(hrc_emails)
#> 4366 emails

# get emails content
cont <- get_content(hrc_emails)

# clean emails
cont <- clean_content(cont)

####
# Chart in header
####

# devtools::install_github("JohnCoene/echarts")
library(echarts)
library(dplyr)

get_com(hrc_emails) %>%
  filter(from != "") %>%
  count(from) %>%
  echart(from) %>%
  ecloud(n) %>%
  etitle(text = "Email senders", subtext = "Benghazi release") %>%
  etheme("helianthus")

Resources

Copy Link

Version

Install

install.packages('rodham')

Monthly Downloads

35

Version

0.1.1

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

John Coene

Last Published

July 18th, 2017

Functions in rodham (0.1.1)

get_content

get_contents: get original emails senders and receivers' name
get_date

get_date: get emails date
clean_content

Clean emails
download_emails

Download emails
hrc_names

Hillary Rodham Clinton emails
load_emails

load emails from text files
extract_emails

Extract emails contents
get_com

get_com: get emails sender's and receiver's name
get_interest

get_interest: get emails subjects
get_or

get_or: get emails senders and receivers' name
get_emails

Get emails and its contents
get_id

get_id: get emails subjects
get_subject

get_subject: get emails subjects
get_xpdf

Get pdf to text extractor (xpdf)
rodham

rodham: Hillary Rodham Clinton emails
search_emails

Search Rodham's emails
edges_emails

Network the treacherous
emails

Hillary Rodham Clinton emails
tidy_emails

Tidy contents