-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
167 lines (144 loc) · 5.82 KB
/
index.html
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<!doctype html>
<html>
<head>
<title>2018 in Headlines | Sosolimited</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Explore every 2018 headline from the New York Times and The Guardian. Search for a topic, compare the coverage, and download the results.">
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/PapaParse/4.1.3/papaparse.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/4.5.0/d3.min.js"></script>
<script src="https://2018-headlines.sosolimited.com/data/liwc.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.css" type="text/css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<link href="https://fonts.googleapis.com/css?family=PT+Serif:400i,700|Source+Sans+Pro|PT+Mono" rel="stylesheet">
</head>
<body>
<div id="mobile-sorry">
<h1>Explore<br>2018 in<br>Headlines</h1>
<p>This experience works<br>best on desktop.<br><br></p>
<h2><a id="mobile-continue" href="#">Continue...</a></h2>
</div>
<header>
<div id="titleBlock">
<div id="title">
<h1>Explore 2018 in headlines</h1>
</div>
<div id="info">
<p>
Headlines are tiny windows into a big, happening world. As we try to make sense of the past year, it
seems timely to take a critical look at the power and impact of these short phrases.
</p>
<p>
Explore every 2018 headline from the New York Times and The Guardian. Search for a topic or
phrase, compare the coverage, and download the results. Use this tool for research or for fun. Download
the code and make your own visualization.
</p>
<br/>
</div>
</div>
<div id="interactivePanel">
<div id="search-options">
<hr/>
<h2>Search</h2>
<input id="search" type="text" spellcheck="false" />
<div id="search-icon" class="ion-ios-search-strong"></div>
<p>
<br/>Search terms can be singular (<span class="code">immigration</span>), comma-separated to match
either/or (<span class="code">trump, putin</span>), space-separated to match an
exact phrase (<span class="code">north korea</span>), or end with a <span class="code">*</span> for partial
matching (<span class="code">tech*</span>).
</p>
</div>
<div id="filter-options">
<hr/>
<h2>Filter</h2>
<div id="source_select"><p>Select news source(s): </p></div>
<br />
Y axis:<br />
<input id="radio-perc-hl" data-key="%" type="radio" name="graph-y" value="% headlines" checked>
<label for="radio-perc-hl">% of headlines </label>
<input id="radio-num-hl" data-key="#" type="radio" name="graph-y" value="# headlines">
<label for="radio-num-hl"># of headlines</label>
<br /><br/>
<div id="liwc-ui">
Filter further by <a target="_blank" href="https://liwc.wpengine.com/how-it-works/">LIWC category</a>:<br />
<select id="liwc_category">
<option value="">(none)</option>
</select>
</div>
</div>
<div id="download-options">
<hr/>
<h2>Download</h2>
<div id="save-csv">
Download 2018 search results for “<span id="csv-term"></span>” as CSV:<br /><br />
<a class="csvfreq" download="2018_headlines_frequency.csv" href="" target="_blank"># of headlines</a><br />
<a class="csvperc" download="2018_headlines_percentages.csv" href="" target="_blank">% of headlines</a><br />
<a class="csvterms" download="2018_headlines_interesting_terms.csv" href="" target="_blank">weekly top terms</a><br />
<a class="csvtxt" download="2018_headlines_text.csv" href="" target="_blank">all headline text</a>
</div>
</div>
<div class="cf"></div>
</div>
</header>
<section id="graph">
<svg width="1250" height="400"></svg>
<div class="axis-label"></div>
<div class="big-text" id="no-results">
No results.
</div>
<div id="results-title">
<h3>
Week of <span class="results-title-date"></span> <span class="results-title-source"></span>
</h3>
</div>
<div id="words"></div>
<div id="interesting-terms"></div>
<div class="big-text" id="instructions">
Hover over the chart <br/>
to view headlines and stats.
</div>
<div class="cf"></div>
</section>
<footer>
<div id="footer-container">
<div id ="soso-credits">
<a href="https://www.sosolimited.com">
<img alt="Sosolimited logo" src="img/soso-logo.svg" id="soso-logo">
</a>
</div>
<div id ="soso-desc">
<p>
<a href="https://www.sosolimited.com" class="footer-link">
Sosolimited</a> is a design studio that creates
thought-provoking experiences driven by data and technology.
</p>
<p class="copyright">© Sosolimited 2019</p>
</div>
<div class ="data-links">
<a href="http://developer.nytimes.com/" target="_blank" class="nyt-color">
Data provided by the
New York Times
</a>
</div>
<div class ="data-links">
<a href="https://open-platform.theguardian.com/" target="_blank" class="guardian-color">
Data provided by
The Guardian
</a>
</div>
<div class ="data-links">
<a href="https://github.com/sosolimited/2018-Headlines-Explorer" target="_blank" class="footer-link">
Download the code <br>on Github
</a>
</div>
<div class="cf"></div>
</div>
</footer>
<script src="src/csv.js"></script>
<script src="src/graph.js"></script>
<script src="src/search.js"></script>
<script src="src/main.js"></script>
</body>
</html>