{"id":428,"date":"2016-11-29T01:15:59","date_gmt":"2016-11-29T01:15:59","guid":{"rendered":"https:\/\/scholarblogs.emory.edu\/582atextmining\/?p=428"},"modified":"2016-12-01T18:55:55","modified_gmt":"2016-12-01T18:55:55","slug":"rubicon-newspaper-corpus-visualizations","status":"publish","type":"post","link":"https:\/\/scholarblogs.emory.edu\/582atextmining\/2016\/11\/29\/rubicon-newspaper-corpus-visualizations\/","title":{"rendered":"Rubicon Newspaper Corpus Visualizations"},"content":{"rendered":"<h4>Rubicon and Demographics Correlation Matrix<\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-430\" src=\"https:\/\/scholarblogs.emory.edu\/582atextmining\/files\/2016\/11\/democorr.jpeg\" alt=\"democorr\" width=\"622\" height=\"398\" srcset=\"https:\/\/scholarblogs.emory.edu\/582atextmining\/files\/2016\/11\/democorr.jpeg 1000w, https:\/\/scholarblogs.emory.edu\/582atextmining\/files\/2016\/11\/democorr-300x192.jpeg 300w, https:\/\/scholarblogs.emory.edu\/582atextmining\/files\/2016\/11\/democorr-768x492.jpeg 768w\" sizes=\"auto, (max-width: 622px) 100vw, 622px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h4>Terms that Correlate Strongly With &#8220;Rubicon&#8221;<\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-429\" src=\"https:\/\/scholarblogs.emory.edu\/582atextmining\/files\/2016\/11\/correlation.jpeg\" alt=\"correlation\" width=\"1000\" height=\"641\" srcset=\"https:\/\/scholarblogs.emory.edu\/582atextmining\/files\/2016\/11\/correlation.jpeg 1000w, https:\/\/scholarblogs.emory.edu\/582atextmining\/files\/2016\/11\/correlation-300x192.jpeg 300w, https:\/\/scholarblogs.emory.edu\/582atextmining\/files\/2016\/11\/correlation-768x492.jpeg 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<p>&nbsp;<\/p>\n<div style=\"border: 1px solid black;overflow: auto;height: 200px;width: 600px;color: black;background-color: white\">##correlation Matrix code. Start from normalized document term matrix<br \/>\nLibrary(corrplot)<br \/>\nshort.list DTM.norm.mini.df #To get the correlation matrix<br \/>\ncor.matrix.mini round(cor.matrix.mini, 2) ## rounds off at 2 places<br \/>\ncorrplot(cor.matrix.mini, method=&#8221;shade&#8221;,shade.col=NA,tl.col=&#8221;black&#8221;,tl.srt=45,addCoef.col=&#8221;black&#8221;,order=&#8221;FPC&#8221;)#word associations start from DTM<br \/>\nLibrary(tm)<br \/>\nLibrary(ggplot2)<br \/>\nfindAssocs(DTM, &#8220;rubicon&#8221;, 0.57)<br \/>\n#build dataframe for plotting<br \/>\ntoi &lt;- &#8220;rubicon&#8221; # term of interest<br \/>\ncorlimit rubiconterms Terms = names(findAssocs(DTM, toi, corlimit)[[1]]))<br \/>\nggplot(rubiconterms, aes( y = Terms)) +geom_point(aes(x = corr), data = rubiconterms, size=2) +xlab(paste0(&#8220;Correlation with the term &#8220;, &#8220;\\&#8221;&#8221;, toi, &#8220;\\&#8221;&#8221;))<\/div>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft  wp-image-475\" src=\"https:\/\/scholarblogs.emory.edu\/582atextmining\/files\/2016\/12\/timeline1.jpeg\" alt=\"timeline1\" width=\"739\" height=\"196\" srcset=\"https:\/\/scholarblogs.emory.edu\/582atextmining\/files\/2016\/12\/timeline1.jpeg 1554w, https:\/\/scholarblogs.emory.edu\/582atextmining\/files\/2016\/12\/timeline1-300x80.jpeg 300w, https:\/\/scholarblogs.emory.edu\/582atextmining\/files\/2016\/12\/timeline1-768x204.jpeg 768w, https:\/\/scholarblogs.emory.edu\/582atextmining\/files\/2016\/12\/timeline1-1024x272.jpeg 1024w\" sizes=\"auto, (max-width: 739px) 100vw, 739px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Rubicon and Demographics Correlation Matrix &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Terms that Correlate Strongly With &#8220;Rubicon&#8221; &nbsp; ##correlation Matrix code. Start from normalized document term matrix Library(corrplot) short.list DTM.norm.mini.df #To get the correlation matrix cor.matrix.mini round(cor.matrix.mini, 2) ## rounds off at 2 places corrplot(cor.matrix.mini, method=&#8221;shade&#8221;,shade.col=NA,tl.col=&#8221;black&#8221;,tl.srt=45,addCoef.col=&#8221;black&#8221;,order=&#8221;FPC&#8221;)#word associations start from DTM Library(tm) Library(ggplot2) findAssocs(DTM, &hellip; <a href=\"https:\/\/scholarblogs.emory.edu\/582atextmining\/2016\/11\/29\/rubicon-newspaper-corpus-visualizations\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Rubicon Newspaper Corpus Visualizations<\/span><\/a><\/p>\n","protected":false},"author":3990,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-428","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/scholarblogs.emory.edu\/582atextmining\/wp-json\/wp\/v2\/posts\/428","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scholarblogs.emory.edu\/582atextmining\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scholarblogs.emory.edu\/582atextmining\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scholarblogs.emory.edu\/582atextmining\/wp-json\/wp\/v2\/users\/3990"}],"replies":[{"embeddable":true,"href":"https:\/\/scholarblogs.emory.edu\/582atextmining\/wp-json\/wp\/v2\/comments?post=428"}],"version-history":[{"count":2,"href":"https:\/\/scholarblogs.emory.edu\/582atextmining\/wp-json\/wp\/v2\/posts\/428\/revisions"}],"predecessor-version":[{"id":477,"href":"https:\/\/scholarblogs.emory.edu\/582atextmining\/wp-json\/wp\/v2\/posts\/428\/revisions\/477"}],"wp:attachment":[{"href":"https:\/\/scholarblogs.emory.edu\/582atextmining\/wp-json\/wp\/v2\/media?parent=428"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scholarblogs.emory.edu\/582atextmining\/wp-json\/wp\/v2\/categories?post=428"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scholarblogs.emory.edu\/582atextmining\/wp-json\/wp\/v2\/tags?post=428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}