Last active
October 11, 2015 10:08
-
-
Save daniel-toman/3842712 to your computer and use it in GitHub Desktop.
Torture or Interrogation?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Torture or Interrogation?</title> | |
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
<script type="text/javascript" src="//raw.github.com/daniel-toman/torture-or-interrogation/master/jqcloud-1.0.4.min.js"></script> | |
<script type="text/javascript"> | |
// Torture term frequency by outlet | |
var Default_terms = [ | |
{text: "torture", weight: 5}, | |
{text: "enhanced interrogation", weight: 4}, | |
{text: "interrogation", weight: 1}, | |
{text: "coerced interrogation", weight: 1}, | |
{text: "harsh interrogation", weight: 1}, | |
{text: "strong interrogation", weight: 1}, | |
{text: "tough interrogation", weight: 1}, | |
{text: "rough interrogation", weight: 1}, | |
{text: "intense interrogation", weight: 1}, | |
{text: "extensive interrogation", weight: 1}, | |
{text: "harsh questioning", weight: 1}, | |
{text: "abuse", weight: 1}, | |
{text: " ", weight: 10} | |
]; | |
var Fox_terms = [ | |
{text: "torture", weight: 107}, | |
{text: "enhanced interrogation", weight: 139}, | |
{text: "interrogation", weight: 113}, | |
{text: "coerced interrogation", weight: 26}, | |
{text: "abuse", weight: 10}, | |
{text: "harsh interrogation", weight: 8}, | |
{text: "strong interrogation", weight: 2}, | |
{text: "tough interrogation", weight: 1}, | |
{text: "rough interrogation", weight: 1}, | |
{text: "intense interrogation", weight: 1}, | |
{text: "extensive interrogation", weight: 1}, | |
{text: "harsh questioning", weight: 1} | |
]; | |
var AP_terms = [ | |
{text: "torture", weight: 106}, | |
{text: "enhanced interrogation", weight: 5}, | |
{text: "interrogation", weight: 13}, | |
{text: "harsh interrogation", weight: 6}, | |
{text: "abuse", weight: 6}, | |
{text: "harsh questioning", weight: 2} | |
]; | |
$(document).ready(function() { | |
$("#wordcloud").jQCloud(Default_terms); | |
// Fox News | |
$("#news-outlets-menu .Fox").hover(function () { | |
$("#wordcloud *").remove(); | |
$("#wordcloud").jQCloud(Fox_terms); | |
}, | |
function () { | |
$("#wordcloud *").remove(); | |
$("#wordcloud").jQCloud(Default_terms); | |
}); | |
// Associated Press | |
$("#news-outlets-menu .AP").hover(function () { | |
$("#wordcloud *").remove(); | |
$("#wordcloud").jQCloud(AP_terms); | |
}, | |
function () { | |
$("#wordcloud *").remove(); | |
$("#wordcloud").jQCloud(Default_terms); | |
}); | |
}); | |
</script> | |
<style type="text/css"> | |
body { | |
font-family: "News Gothic MT", "Franklin Gothic Medium", sans-serif; | |
font-size: 14pt; | |
} | |
#page-title { text-align: center; font-weight: bold; } | |
#news-outlets-menu { margin: 30px auto; width: 500px; height: 30px; } | |
#news-outlets-menu #news-outlets { margin: 0px auto; } | |
#news-outlets-menu li { | |
float: left; | |
list-style-type: none; | |
padding: 3px 10px; | |
margin: 0px 5px; | |
background-color: #444; | |
color: #efefef; | |
} | |
#news-outlets-menu li.menu-label, | |
#news-outlets-menu li.menu-label:hover { | |
cursor: auto; | |
text-transform: uppercase; | |
color: #333; | |
background-color: #fff; | |
} | |
#news-outlets-menu li:hover { | |
cursor: pointer; | |
background-color: #eee; | |
color: #333; | |
} | |
#wordcloud { | |
margin: 0px auto; | |
width: 950px; | |
height: 420px; | |
} | |
/* fonts */ | |
div.jqcloud { | |
font-family: "News Gothic MT", "Franklin Gothic Medium", sans-serif; | |
font-size: 10pt; | |
line-height: normal; | |
} | |
div.jqcloud a { | |
font-size: inherit; | |
text-decoration: none; | |
} | |
div.jqcloud span.w10 { font-size: 550%; font-weight: bold; } | |
div.jqcloud span.w9 { font-size: 500%; } | |
div.jqcloud span.w8 { font-size: 450%; } | |
div.jqcloud span.w7 { font-size: 400%; } | |
div.jqcloud span.w6 { font-size: 350%; } | |
div.jqcloud span.w5 { font-size: 300%; } | |
div.jqcloud span.w4 { font-size: 250%; } | |
div.jqcloud span.w3 { font-size: 200%; } | |
div.jqcloud span.w2 { font-size: 150%; } | |
div.jqcloud span.w1 { font-size: 100%; } | |
/* colors */ | |
div.jqcloud { color: #09f; } | |
div.jqcloud a { color: inherit; } | |
div.jqcloud a:hover { color: #0df; } | |
div.jqcloud a:hover { color: #0cf; } | |
div.jqcloud span.w10 { color: #000; } | |
div.jqcloud span.w9 { color: #222; } | |
div.jqcloud span.w8 { color: #222; } | |
div.jqcloud span.w7 { color: #333; } | |
div.jqcloud span.w6 { color: #444; } | |
div.jqcloud span.w5 { color: #555; } | |
div.jqcloud span.w4 { color: #666; } | |
div.jqcloud span.w3 { color: #777; } | |
div.jqcloud span.w2 { color: #999; } | |
div.jqcloud span.w1 { color: #bbb; } | |
/* layout */ | |
div.jqcloud { | |
overflow: hidden; | |
position: relative; | |
} | |
div.jqcloud span { padding: 0; } | |
/* smaller size for small screens / embeds */ | |
@media (max-width: 700px) { | |
div.jqcloud span.w10 { font-size: 280%; font-weight: bold; } | |
div.jqcloud span.w9 { font-size: 260%; } | |
div.jqcloud span.w8 { font-size: 240%; } | |
div.jqcloud span.w7 { font-size: 220%; } | |
div.jqcloud span.w6 { font-size: 200%; } | |
div.jqcloud span.w5 { font-size: 180%; } | |
div.jqcloud span.w4 { font-size: 160%; } | |
div.jqcloud span.w3 { font-size: 140%; } | |
div.jqcloud span.w2 { font-size: 120%; } | |
div.jqcloud span.w1 { font-size: 100%; } | |
#wordcloud { width: 500px !important; } | |
} | |
</style> | |
</head> | |
<body> | |
<div id="wordcloud"></div> | |
<div id="news-outlets-menu"> | |
<ul id="news-outlets"> | |
<li class="menu-label">Outlets</li> | |
<li class="Fox">Fox News</li> | |
<li class="AP">Associated Press</li> | |
</ul> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment