Description Dataset Functions Examples
rodham: Hillary Rodham Clinton emails
emails: dataset of 29444 emails
hrc_names: list that pairs sender and recipient names provided by the State Department website
search_emails
edges_emails
get_emails
get_xpdf
extract_emails
download_emails
load_emails
get_subject
get_or
get_com
get_interest
get_content
get_date
tidy_emails
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | ## Not run:
# get emails from internal data set
data("emails")
# build graph
edges <- edges_emails(emails)
g <- igraph::graph.data.frame(edges)
plot(g)
# plot communities
cm <- igraph::walktrap.community(g)
plot(cm, g)
# get emails content
# get extractor to extract content from emails
ext <- get_xpdf()
dir.create("./emails") # create folder to store extracted content
# get emails released in august
aug_emails <- get_emails(release = "August", save.dir = "./emails",
extractor = ext)
# alternatively
# download emails as zip then extract
download_emails("August") # download
dir.create("emails_pdf") # create directory where to extract pdf emails to
unzip("August.zip", exdir = "./emails_pdf")
dir <- "emails_text"
dir.create(dir)
# extract emails to created directory
extract_emails("emails_pdf", save.dir = dir, ext = ext)
# laod all emails
hrc_emails <- load_emails(dir)
class(hrc_emails)
# methods
dates <- get_date(hrc_emails)
communication <- get_com(hrc_emails)
cont <- get_content(hrc_emails) # get actual email content
cont <- clean_content(cont) # clean content see help
# tidy content
cont <- tidy_emails(cont)
head(cont)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.