-
-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathstream.html
More file actions
329 lines (296 loc) · 21.5 KB
/
stream.html
File metadata and controls
329 lines (296 loc) · 21.5 KB
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<script>
var search_flow_config_local = {
search_options: {
options: [
{
id: "triple_sg", name: "Streamgraph TRIPLE", disabled: false, default: false
, text: "Streamgraph", description: "", vis_type_name: "streamgraph"
, script: "searchTRIPLE.php", milliseconds_progressbar: 800
, max_length_search_term_short: 115, timeout: 120000
}
, {
id: "triple_km", name: "Knowledge Map TRIPLE", disabled: false, default: true
, text: "Knowledge Map", description: "", vis_type_name: "knowledge map"
, script: "searchTRIPLE.php", milliseconds_progressbar: 800
, max_length_search_term_short: 115, timeout: 120000
}
]
, examples: {
examples_integration1: {
example_text: "Try out:",
examples: [
{ text: "covid-19", link: "url" }
]
}
}
}
, waiting_page_options: {
vis_page_cool_uri: false
// Parameters for the vis page
// id: id in post_params array
// name: name of the param passed to vis page
// (optional) value: a specific value for this parameter
// example: { id: 'embed', name: 'embed', value: 'true' } sets parameter 'embed' to true
// you can also transform parameter values here with key value pairs
// , e.g. value: {'triple_km': 'overview', 'triple_sg': 'timeline'}
, vis_page_params: [
{ id: 'unique_id', name: 'id' }
, { id: "service", "name": "vis_type", value: { 'triple_km': 'overview', 'triple_sg': 'timeline' } }
]
, vis_page_additional_params: [
]
}
, vis_page_options: {
//Fit visualization div to page
fit_to_page: false
}
}
</script>
<script>
var search_flow_config = {
search_options: {
//Text to display when a service is unavailable
disabled_message: "Undergoing downtime - please try again later!"
//Enable/disable auto focus on search input field
, search_term_focus: true
//Enable/disable auto showing of search filters
, show_filters: false
//Text to show on filters link/button
, filters_text: "Refine your search"
//Options for each integration to search in
, options: [
{
id: "integration1", name: "Integration 1", disabled: false, default: false
, text: "Integration 1", description: "(all disciplines)", vis_type_name: "knowledge map"
, script: "searchPubmed.php", milliseconds_progressbar: 800
, max_length_search_term_short: 115, timeout: 120000
}
]
//Example links for each integration
, examples: {
examples_integration1: {
example_text: "Try out:",
examples: [
{ text: "covid-19", link: "url" }
]
}
}
//empty shell for filter options - do not fill in here, fill in in PHP part above
, filter_options: {}
}
, waiting_page_options: {
//Enable/disable adding of a link to the original search engine when not enough results can be retrieved
//Currently only functional for BASE and PubMed
add_not_enough_results_links: false
//Whether the vis_page is a cool URI (e.g. "map/21043904") or uses standard parameter form (e.g. "vis?id=21043904")
, vis_page_cool_uri: false
// Parameters for the vis page
// id: id in post_params array
// name: name of the param passed to vis page
// (optional) value: a specific value for this parameter
// example: { id: 'embed', name: 'embed', value: 'true' } sets parameter 'embed' to true
// you can also transform parameter values here with key value pairs
// , e.g. value: {'triple_km': 'overview', 'triple_sg': 'timeline'}
, vis_page_params: [
{ id: 'unique_id', name: 'id' }
, { id: "optradio", "name": "vis_type", value: { 'triple_km': 'overview', 'triple_sg': 'timeline' } }
, { id: 'embed', name: 'embed', value: "true" }
]
// For cool URIs the ability to add "classic" parameters with "¶m=value"
// For classic URIs, it will simply append the parameters in here
, vis_page_additional_params: [
]
//Default API error reason
, default_api_error: "not_enough_results"
//Additional API errors and their related texts
, additional_api_errors: {
"API error: timeout": "timeout"
, "API error: requested metadata size": "pubmed_502_error"
, "API error: PubMed not reachable": "pubmed_500_error"
, "unexpected PubMed API error": "pubmed_unexpected_error"
, "unexpected data processing error": "server_error"
, "dataprocessing rate limit": "rate_limit"
, "API error: BASE not reachable": "base_xml_error"
}
//Reason to always add to the list of error reasons
, error_reason_always_add: [
'typo'
]
}
//Texts for the waiting page
, waiting_page_texts: {
longer_than_expected_text: 'Creating your visualization takes longer than expected. Please stay tuned!'
, waiting_title: 'Your <span class="vis_type_name">knowledge map</span> on <strong id="search_term"></strong> is being created!'
, status_waiting: 'Please be patient, this takes around 20 seconds.<br>While you are waiting, find out how the <span class="vis_type_name">knowledge map</span> is being created below.'
, try_again_title: 'Have another try!'
}
//Translations for potential error reasons when not enough results are returned
, error_reason_translation: {
'timeframe too short': 'Increase the custom time range'
, 'query length': 'Try a shorter query'
, 'too specific': 'Try keywords instead of long phrases'
, 'typo': 'Check if you have a typo in your query'
}
//Error texts
, error_texts: {
not_enough_results: {
title: 'Sorry! We could not create a <span class="vis_type_name">knowledge map</span>.'
, reason: 'Most likely there were not enough results for <strong id="search_term_fail"></strong> with the selected search options.'
, remedy: "<strong>Here are some tips to improve your query:</strong>"
, more_info: 'Alternatively you can <a class="underline" id="more-info-link_na" target="_blank">check out results for your search query on <span id="more-info-link_service"></span></a>. For more information about our service please <a class="underline" href="https://openknowledgemaps.org/faq">see our FAQs</a>.'
, contact: 'If you think that there is something wrong with our service, please let us know at <a class="underline" href="mailto:info@openknowledgemaps.org">info@openknowledgemaps.org</a>. Please include the search query in your message.'
, "resolution": "Try again"
, "resolution_link": "index"
},
connection_error: {
title: "Connection lost"
, reason: "It seems that your Internet is unavailable or the connection was reset."
, remedy: 'Please check your Internet settings and try again by <a class="underline" style="cursor:pointer" onClick="window.location.reload();">refreshing this page</a>.'
, "resolution": "Refresh this page"
, "resolution_link": "javascript:location.reload()"
},
server_error: {
title: "Sorry! An unexpected error occurred."
, reason: 'Unfortunately we don’t know what went wrong. We apologize for the inconvenience. Please <a class="underline" href="index.php">try again</a> in a few minutes.'
, remedy: 'If the error persists, please let us know at <a class="underline" href="mailto:info@openknowledgemaps.org">info@openknowledgemaps.org</a>. We will investigate the issue further.'
, "resolution": "Try again"
, "resolution_link": "index"
},
no_post_data: {
title: "Ooops! You should not be here..."
, reason: 'We apologize for this slight detour. You will be redirected to <a class="underline" href="index">our search page</a> in 10 seconds.'
, contact: 'For more information about our service please <a class="underline" href="https://openknowledgemaps.org/faq">see our FAQs</a>. If you think that there is something wrong with our service, please let us know at <a class="underline" href="mailto:info@openknowledgemaps.org">info@openknowledgemaps.org</a>'
, "resolution": "Go to search page"
, "resolution_link": "index"
},
timeout: {
title: "We didn't anticipate this taking so long - unfortunately your request timed out."
, reason: "It might be that too many people are currently creating <span class=\"vis_type_name\">knowledge map</span>s. You may also have lost your Internet connection."
, remedy: 'In any case, we recommend to check your Internet settings and try again by <a class="underline" style="cursor:pointer" onClick="window.location.reload();">refreshing this page</a>.'
, contact: 'For more information about our service please <a class="underline" href="https://openknowledgemaps.org/faq">see our FAQs</a>. If you think that there is something wrong with our service, please let us know at <a class="underline" href="mailto:info@openknowledgemaps.org">info@openknowledgemaps.org</a>'
, "resolution": "Try again"
, "resolution_link": "javascript:location.reload()"
},
rate_limit: {
title: "Sorry! We are experiencing too many requests."
, reason: "Unfortunately this means, we cannot create your <span class=\"vis_type_name\">knowledge map</span>. Please try again in a few seconds."
, contact: 'If the error persists, please let us know at <a class="underline" href="mailto:info@openknowledgemaps.org">info@openknowledgemaps.org</a>. We will investigate the issue further.'
, "resolution": "Try again"
, "resolution_link": "javascript:location.reload()"
},
pubmed_unexpected_error: {
title: "An unexpected error occurred while retrieving data from PubMed."
, reason: "The PubMed API is currently experiencing problems. We have logged the error and will investigate the issue."
, remedy: 'Please <a class="underline" style="cursor:pointer" onClick="window.location.reload();">try again</a> in a few minutes or <a class="underline" style="cursor:pointer" href="index">use the BASE integration</a>, which also covers the articles indexed in PubMed.'
, contact: 'For more information about our service please <a class="underline" href="https://openknowledgemaps.org/faq">see our FAQs</a>. If you think that there is something wrong with our service, please let us know at <a class="underline" href="mailto:info@openknowledgemaps.org">info@openknowledgemaps.org</a>'
, "resolution": "Try again"
, "resolution_link": "index"
},
pubmed_500_error: {
title: "The PubMed API is currently experiencing down time."
, reason: "Unfortunately this means, at the moment we cannot provide <span class=\"vis_type_name\">knowledge map</span>s for PubMed."
, remedy: 'Please <a class="underline" style="cursor:pointer" onClick="window.location.reload();">try again</a> in a few minutes or <a class="underline" style="cursor:pointer" href="index">use the BASE integration</a>, which also covers the articles indexed in PubMed.'
, contact: 'For more information about our service please <a class="underline" href="https://openknowledgemaps.org/faq">see our FAQs</a>. If you think that there is something wrong with our service, please let us know at <a class="underline" href="mailto:info@openknowledgemaps.org">info@openknowledgemaps.org</a>'
, "resolution": "Try again"
, "resolution_link": "index"
},
pubmed_502_error: {
title: "An error occurred while retrieving data from PubMed."
, reason: "Unfortunately this means we cannot create a <span class=\"vis_type_name\">knowledge map</span> for this search."
, remedy: 'Please <a class="underline" style="cursor:pointer" onClick="window.location.reload();">try again</a> with a different search term or <a class="underline" style="cursor:pointer" href="index">use the BASE integration</a>, which also covers the articles indexed in PubMed.'
, contact: 'For more information about our service please <a class="underline" href="https://openknowledgemaps.org/faq">see our FAQs</a>. If you think that there is something wrong with our service, please let us know at <a class="underline" href="mailto:info@openknowledgemaps.org">info@openknowledgemaps.org</a>'
, "resolution": "Try again"
, "resolution_link": "index"
},
base_xml_error: {
title: "The API of our data source provider BASE is currently experiencing down time."
, reason: "Unfortunately this means, at the moment we cannot create <span class=\"vis_type_name\">knowledge map</span>s for this data source."
, remedy: 'Please <a class="underline" style="cursor:pointer" onClick="window.location.reload();">try again</a> in a few minutes.'
, contact: 'For more information about our service please <a class="underline" href="https://openknowledgemaps.org/faq">see our FAQs</a>. If you think that there is something wrong with our service, please let us know at <a class="underline" href="mailto:info@openknowledgemaps.org">info@openknowledgemaps.org</a>'
, "resolution": "Try again"
, "resolution_link": "index"
},
}
, vis_page_options: {
//Fit visualization div to page
fit_to_page: false
}
//Banner texts
, banner_texts: {
browser_unsupported_warning: 'You are using <strong>an unsupported browser</strong>. This website was successfully tested with the latest versions of <strong>Firefox, Chrome, Safari, Opera, and Edge</strong>. We strongly suggest <strong>to switch to one of the supported browsers.</strong>'
, mobile_warning: 'Note: the visualization isn\'t optimized for mobile yet, you may encounter some rough edges.'
, alternate_desktop_warning: 'This is a prototype - you may encounter some rough edges'
}
}
if (typeof search_flow_config_local !== "undefined") {
Object.keys(search_flow_config).forEach(function (key) {
if (search_flow_config_local.hasOwnProperty(key)) {
Object.assign(search_flow_config[key], search_flow_config_local[key]);
}
});
}
search_flow_config.search_options.filter_options.options_triple_km = { "start_date": "1809", "dropdowns": [{ "id": "year_range", "multiple": false, "name": "Time Range", "type": "dropdown", "fields": [{ "id": "any-time-years", "text": "All time" }, { "id": "user-defined", "text": "Custom range", "class": "user-defined", "inputs": [{ "id": "from", "label": "From: ", "class": "time_input" }, { "id": "to", "label": "To: ", "class": "time_input" }] }] }, { "id": "sorting", "multiple": false, "name": "Sorting", "type": "dropdown", "fields": [{ "id": "most-relevant", "text": "Most relevant" }, { "id": "most-recent", "text": "Most recent" }] }, { "id": "language", "multiple": false, "name": "Language", "type": "dropdown", "fields": [{ "id": "all", "text": "All languages" }, { "id": "en", "text": "English" }, { "id": "fr", "text": "Fran\u00e7ais" }, { "id": "es", "text": "Espa\u00f1ol" }] }] };
search_flow_config.search_options.filter_options.options_triple_sg = { "start_date": "1809", "dropdowns": [{ "id": "year_range", "multiple": false, "name": "Time Range", "type": "dropdown", "fields": [{ "id": "any-time-years", "text": "All time" }, { "id": "user-defined", "text": "Custom range", "class": "user-defined", "inputs": [{ "id": "from", "label": "From: ", "class": "time_input" }, { "id": "to", "label": "To: ", "class": "time_input" }] }] }, { "id": "sorting", "multiple": false, "name": "Sorting", "type": "dropdown", "fields": [{ "id": "most-relevant", "text": "Most relevant" }, { "id": "most-recent", "text": "Most recent" }] }, { "id": "language", "multiple": false, "name": "Language", "type": "dropdown", "fields": [{ "id": "all", "text": "All languages" }, { "id": "en", "text": "English" }, { "id": "fr", "text": "Fran\u00e7ais" }, { "id": "es", "text": "Espa\u00f1ol" }] }, { "id": "limit", "multiple": false, "name": "Limit", "type": "dropdown", "fields": [{ "id": "1000", "text": "1000 documents" }, { "id": "100", "text": "100 documents" }] }, { "id": "sg_method", "multiple": false, "name": "Streamgraph method", "type": "dropdown", "fields": [{ "id": "count", "text": "Count" }, { "id": "tfidf", "text": "TF-IDF" }, { "id": "nmf", "text": "NMF" }, { "id": "lda", "text": "LDA" }] }] };
</script>
<title>Overview of research on psychology</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description"
content="Get an overview of psychology, find relevant papers, and identify important concepts.">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<link rel="stylesheet" href="//openknowledgemaps.org/triple/search-flow/lib/bootstrap.min.css">
</head>
<body style="margin:0px; padding:0px">
<script type="text/javascript" src="./js/data-config_sg.js"></script>
<!-- Requires header-head.php -->
<link rel="stylesheet" href="//openknowledgemaps.org/triple/search-flow/css/search-flow.css">
<script type="text/javascript" src="//openknowledgemaps.org/triple/search-flow/lib/browser-detect.js"></script>
<script>
var browser = BrowserDetect.browser;
var is_supported_browser = false;
if ((browser === "Firefox" || browser === "Safari" || browser === "Chrome")) {
is_supported_browser = true;
}
</script>
<div class="alert alert-warning" id="desktop-warning" style="display:none">
<a class="close" data-dismiss="alert">×</a>
<span id="browser-warning-text"></span>
</div>
<script>
$('#browser-warning-text').html(search_flow_config.banner_texts.browser_unsupported_warning);
if (!is_supported_browser) {
$("#desktop-warning").css("display", "block");
}
</script>
<script src="//openknowledgemaps.org/triple/search-flow/js/visualization.js"></script>
<div class="overflow-vis">
<div id="visualization" style="background-color:white;"></div>
</div>
<script>
var div_height = calcDivHeight(false, search_flow_config.vis_page_options.fit_to_page);
</script>
<script type="text/javascript" src="../../dist/headstart.js"></script>
<script type="text/javascript">
$(document).ready(function () {
headstart.start();
})
</script>
<link rel="stylesheet" href="../../dist/headstart.css">
<script>
data_config.options = search_flow_config.search_options.filter_options.options_triple_sg.dropdowns;
data_config.is_streamgraph = true;
data_config.show_area = false;
data_config.credit_embed = true;
</script>
<script>
data_config.server_url = window.location.href.replace(/[^/]*$/, '') + "./headstart/server/";
data_config.files = [{
title: "psychology",
file: "./data/psychology-sg.json"
}];
</script>
</body>
</html>