Skip to content

Commit eeb1fab

Browse files
committed
v1.23
+ Support Semantic Scholar API Keys (may occassionally speed up API, request one here: https://www.semanticscholar.org/product/api#api-key). * Refactored code to make use of Object.freeze() for large arrays containing articles, increasing performance. * Refactored code to calculate "referenced" and "citing" objects on the fly instead of caching them in the graph object. This reduces size of localStorage ("autosave results locally") and network json files ("download full network"). It leads to slightly more computation when changing the network-tab. Also made it more efficient by only looking at articles' references lists (instead of also citations lists) and thus reduced some redundancies. ! The above refactoring also fixed a bug that sometimes led to slightly wrong numbers of In-Degree and Out-Degree for References and Citations. This fix also applies retrospectively to saved networks after reloading.
1 parent d29be47 commit eeb1fab

File tree

4 files changed

+98
-91
lines changed

4 files changed

+98
-91
lines changed

CHANGELOG

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
02.06.2024 v1.23
2+
+ Support Semantic Scholar API Keys (may occassionally speed up API, request one here: https://www.semanticscholar.org/product/api#api-key).
3+
* Refactored code to make use of Object.freeze() for large arrays containing articles, increasing performance.
4+
* Refactored code to calculate "referenced" and "citing" objects on the fly instead of caching them in the graph object. This reduces size of localStorage ("autosave results locally") and network json files ("download full network"). It leads to slightly more computation when changing the network-tab. Also made it more efficient by only looking at articles' references lists (instead of also citations lists) and thus reduced some redundancies.
5+
! The above refactoring also fixed a bug that sometimes led to slightly wrong numbers of In-Degree and Out-Degree for References and Citations. This fix also applies retrospectively to saved networks after reloading.
6+
17
01.06.2024 v1.22
28
+ For Input Articles: Added "Filter References" and "Filter Citations" in article details.
39
+ For all articles: Added "Filter Input Articles cited by this" (corresponds to Out-Degree) and "Filter Input Articles citing this" (corresponds to In-Degree).

examples.json

+1-1
Large diffs are not rendered by default.

index.html

+5-2
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,11 @@ <h2 class="title is-4">Input Articles ({{ currentGraph.input.length }})</h2>
265265
:disabled="isLoading">
266266
Add network for references
267267
</b-button>
268-
<b-button v-if="(currentGraph.allReferences) ? (props.row.referencesCount || props.row.references.length) : citedByInputArticleId(currentGraph.incomingSuggestions, props.row.id).length"
268+
<b-button v-if="currentGraph.incomingSuggestions?.length && ((currentGraph.allReferences) ? (props.row.referencesCount || props.row.references.length) : citedByInputArticleId(currentGraph.incomingSuggestions, props.row.id).length)"
269269
@click="showArticlesTab='topReferences'; filterColumn='citedByInputArticleId'; filterString=props.row.id">
270270
Filter References ({{ (currentGraph.allReferences) ? (props.row.referencesCount || props.row.references.length) : citedByInputArticleId(currentGraph.incomingSuggestions, props.row.id).length }})
271271
</b-button>
272-
<b-button v-if="(currentGraph.allCitations) ? props.row.citationsCount : citesInputArticleId(currentGraph.outgoingSuggestions, props.row.id).length"
272+
<b-button v-if="currentGraph.outgoingSuggestions?.length && ((currentGraph.allCitations) ? props.row.citationsCount : citesInputArticleId(currentGraph.outgoingSuggestions, props.row.id).length)"
273273
@click="showArticlesTab='topCitations'; filterColumn='citesInputArticleId'; filterString=props.row.id">
274274
Filter Citations ({{ (currentGraph.allCitations) ? props.row.citationsCount : citesInputArticleId(currentGraph.outgoingSuggestions, props.row.id).length }})
275275
</b-button>
@@ -991,6 +991,9 @@ <h3 class="modal-card-title">API options</h3>
991991
</b-select>
992992
</b-field>
993993
</b-field>
994+
<b-field label="Semantic Scholar (S2) API Key:">
995+
<b-input v-model="semanticScholarAPIKey"></b-input>
996+
</b-field>
994997
</div>
995998
</div>
996999
</b-modal>

0 commit comments

Comments
 (0)