diff --git a/src/client/literature.js b/src/client/literature.js index a605848d0..967b24ab4 100644 --- a/src/client/literature.js +++ b/src/client/literature.js @@ -19,6 +19,7 @@ import {pt} from "src/client/graphics.js" import toTitleCase from "src/external/title-case.js" import moment from "src/external/moment.js" +import Preferences from 'src/client/preferences.js' function specialInspect(target, contentNode, inspector, normal) { inspector.renderObjectdProperties(contentNode, target) @@ -113,6 +114,11 @@ export class Paper { } static async getId(id, optionalEntity) { + if (Preferences.get("UseOpenAlex")) { + var json = await fetch("alex://data/" + id).then(r => r.json()) + return new AlexPaper(json) + } + var paper = this.byId(id) if (paper) return paper if (optionalEntity) { @@ -236,11 +242,13 @@ export class Paper { entryTags: { author: this.authors.map(author => author.name).join(" and "), title: this.title, - year: this.year, - scholarid: this.scholarid, + year: this.year }, entryType: this.bibtexType } + + if (this.scholarid) entry.entryTags.scholarid = this.scholarid + if (this.alexid) entry.entryTags.alexid = this.alexid if (this.booktitle) { entry.entryTags.booktitle = this.booktitle } if (this.doi) { entry.entryTags.doi = this.doi } @@ -430,8 +438,95 @@ export class Paper { } +export class AlexAuthor { + + constructor(value) { + this.value = value + } + + get name() { + return this.value.author.display_name // "Original author name" + } + + get id() { + return this.value.author.id + } + + livelyInspect(contentNode, inspector, normal) { + specialInspect(this, contentNode, inspector, normal) + } +} + +export class AlexPaper extends Paper { + + get alexid() { + return this.value.id.replace("https://openalex.org/","") + } + + + get authors() { + return (this.value.authorships || []).map(ea => new AlexAuthor(ea)) + } + + + get year() { + return this.value.publication_year + } + + get doi() { + return this.value.doi && this.value.doi.replace("https://doi.org/","") + } + + + get bibtexType() { + // https://docs.openalex.org/api-entities/works/work-object#type + var type = this.value.type + switch(type) { + case "article": return "article"; // TODO distinguish conference article from journal? + case "book-chapter": return "article"; + case "dataset": return "misc" + case "preprint": return "misc" + case "dissertation": return "phdthesis"; + case "book": return "book"; + case "review": return "misc" + case "paratext":return "misc" + case "libguides":return "misc" + case "letter":return "misc" + case "other":return "misc" + case "reference-entry":return "misc" + case "report":return "misc" + case "editorial":return "misc" + case "peer-review":return "misc" + case "erratum":return "misc" + case "standard":return "misc" + case "grant":return "misc" + case "supplementary-materials":return "misc" + } + return "misc" + } + + get booktitle() { + var source = this.value.primary_location.source + if (source && source.display_name) { + return source.display_name + } + return "" + } + + get keywords() { + return [] // #TODO + } + + + + +} + export default class Literature { + static useOpenAlex() { + return Preferences.get("UseOpenAlex") + } static async ensureCache() { if (this.isLoadingCache) { @@ -573,6 +668,19 @@ export default class Literature { return db } + + static get alexdb() { + var db = new Dexie("openalex"); + + db.version(1).stores({ + papers: 'alexid,doi,authors,year,title,key,keywords,booktitle', + }).upgrade(function () { + }) + + + return db + } + } diff --git a/src/client/preferences.js b/src/client/preferences.js index 2823a6f84..936c57e2f 100644 --- a/src/client/preferences.js +++ b/src/client/preferences.js @@ -53,6 +53,8 @@ export default class Preferences { AIShadowText: {default: false, short: "complete w/ shadow text (key required)"}, AILukasExperiment: {default: false, short: "AI Lukas Experiment"}, DisableBabelCaching: {default: false, short: "Disable babel transpile caching"}, + SemanticScholarAuth: {default: false, short: "use Semantic Scholar API key"}, + UseOpenAlex: {default: true, short: "use OpenAlex for Literature"}, } } diff --git a/src/client/protocols/alex.js b/src/client/protocols/alex.js new file mode 100644 index 000000000..c0c7de9e6 --- /dev/null +++ b/src/client/protocols/alex.js @@ -0,0 +1,118 @@ +import { Scheme } from "src/client/poid.js"; +import PolymorphicIdentifier from "src/client/poid.js"; +import focalStorage from "src/external/focalStorage.js"; + +import {Author, Paper} from "src/client/literature.js" + +import Preferences from 'src/client/preferences.js'; + + +import _ from 'src/external/lodash/lodash.js'; +/*MD +# Alex Scholar API + + +MD*/`` + + +export default class OpenAlexScheme extends Scheme { + + get scheme() { + return "alex"; + } + + resolve() { + return true; + } + + response(content, contentType = "text/html") { + return new Response(content, { + headers: { + "content-type": contentType + }, + status: 200 + }); + } + + notfound(content, contentType = "text/html") { + return new Response(content, { + headers: { + "content-type": contentType + }, + status: 303 + }); + } + + + get baseURL() { + return "https://api.openalex.org/" + } + + + async GET(options) { + var m = this.url.match(new RegExp(this.scheme + "\:\/\/([^/]*)/(.*)")) + var mode = m[1] + var query = m[2]; + if (query.length < 2) return this.response(`{"error": "query to short"}`); + + if (mode === "browse") { + if (query.match(/W.*/)) { + let id = query.replace(/.*\//,"") + return this.response(``); + } + } + + + var url = this.baseURL + query + + var headers = new Headers({}) + var content = await fetch(url, { + method: "GET", + headers: headers + }).then(r => r.text()) + + if (mode === "browse") { + var json = JSON.parse(content) + content = JSON.stringify(json, undefined, 2) + } + + return this.response(content); + } + + async POST(options) { + // #TODO get rid of duplication with GET + var m = this.url.match(new RegExp(this.scheme + "\:\/\/([^/]*)/(.*)")) + var mode = m[1] + var query = m[2]; + if (query.length < 2) return this.response(`{"error": "query to short"}`); + + var url = this.baseURL + query + + + var headers = new Headers({}) + var content = await fetch(url, { + method: "POST", + headers: headers, + body: options.body + }).then(r => r.text()) + + return this.response(content); + } + + + async OPTIONS(options) { + var content = JSON.stringify({}, undefined, 2); + return new Response(content, { + headers: { + "content-type": "application/json" + }, + status: 200 + }); + } + +} + +PolymorphicIdentifier.register(OpenAlexScheme); + +// import Tracing from "src/client/tracing.js" +// Tracing.traceClass(Paper) diff --git a/src/client/protocols/scholar.js b/src/client/protocols/scholar.js index 9b1ba91de..56bd37370 100644 --- a/src/client/protocols/scholar.js +++ b/src/client/protocols/scholar.js @@ -4,6 +4,8 @@ import focalStorage from "src/external/focalStorage.js"; import {Author, Paper, MicrosoftAcademicEntities} from "src/client/literature.js" +import Preferences from 'src/client/preferences.js'; + import _ from 'src/external/lodash/lodash.js'; /*MD @@ -113,19 +115,19 @@ export default class SemanticScholarScheme extends Scheme { } else if (query.match("author/")) { var authorId = query.replace(/.*author\//,"") return this.response(``); - } else { - return this.response(`query not supported: ` + query); - } + } } var url = this.baseURL + query - - var key = await SemanticScholarScheme.ensureSubscriptionKey() // maybe only get... ? + var headers = new Headers({}) - if (key) { - headers.set("x-api-key", key) + if (Preferences.get("SemanticScholarAuth")) { + var key = await SemanticScholarScheme.ensureSubscriptionKey() // maybe only get... ? + if (key) { + headers.set("x-api-key", key) + } } var content = await fetch(url, { @@ -133,6 +135,11 @@ export default class SemanticScholarScheme extends Scheme { headers: headers }).then(r => r.text()) + if (mode === "browse") { + var json = JSON.parse(content) + content = JSON.stringify(json, undefined, 2) + } + return this.response(content); } @@ -156,11 +163,13 @@ fetch("scholar://data/paper/batch?fields=referenceCount,citationCount,title", { if (query.length < 2) return this.response(`{"error": "query to short"}`); var url = this.baseURL + query - - var key = await SemanticScholarScheme.ensureSubscriptionKey() // maybe only get... ? + var headers = new Headers({}) - if (key) { - headers.set("x-api-key", key) + if (Preferences.get("SemanticScholarAuth")) { + var key = await SemanticScholarScheme.ensureSubscriptionKey() // maybe only get... ? + if (key) { + headers.set("x-api-key", key) + } } var content = await fetch(url, { diff --git a/src/components/tools/literature-paper.js b/src/components/tools/literature-paper.js index 512466354..4682c739f 100644 --- a/src/components/tools/literature-paper.js +++ b/src/components/tools/literature-paper.js @@ -1,7 +1,7 @@ "enable aexpr"; import Morph from 'src/components/widgets/lively-morph.js'; -import {Author, Paper, Scholar} from "src/client/literature.js" +import {AlexPaper, Author, Paper, Scholar} from "src/client/literature.js" import Literature from "src/client/literature.js" /*MD # Literature Paper @@ -46,6 +46,17 @@ export default class LiteraturePaper extends Morph { } + get alexId() { + return this.getAttribute("alexId") + } + + set alexId(id) { + this.data = null + this.setAttribute("alexId", id) + this.updateView() + } + + get mode() { return this.getAttribute("mode") } @@ -81,7 +92,10 @@ export default class LiteraturePaper extends Morph { // #important async ensureData() { if (this.data) return this.data - if (this.scholarId || this.scholarPaper) { + + if (this.alexId) { + this.url = `alex://data/${this.getAttribute("alexId")}` + } else if (this.scholarId || this.scholarPaper) { // cached:// var id = this.scholarId || this.scholarPaper this.url = `scholar://data/paper/${id}?fields=${this.fields()}` // cached:// @@ -109,6 +123,10 @@ export default class LiteraturePaper extends Morph { async ensurePaper() { if (!this.paper) { + if (this.alexId) { + await this.ensureData() + this.paper = new AlexPaper(this.data) + } if (this.scholarId) { this.paper = await Paper.getId(this.scholarId) } @@ -154,7 +172,7 @@ export default class LiteraturePaper extends Morph { return } await this.renderAuthor(data) - } else if (this.scholarId || this.scholarPaper) { + } else if (this.scholarId || this.scholarPaper || this.alexId) { var paper = await this.ensurePaper() await this.renderPaper(paper) } else { @@ -600,8 +618,13 @@ export default class LiteraturePaper extends Morph { // this.scholarPaper = "MAG:2087784813" // this.searchQuery = "Toward Multi Language And Multi Environment Framework For Live Programming" - this.scholarId = "f24887f1cb1f1783c9a4481067453790b96f0752" - this.mode = "short" + + + // this.scholarId = "f24887f1cb1f1783c9a4481067453790b96f0752" + // this.mode = "short" + + this.alexId = "W2741809807" + // this.mode = "short" // this.searchQuery = "Smalltalk 80" } diff --git a/src/components/tools/literature-search.js b/src/components/tools/literature-search.js index 77cc4b640..6a6376eac 100644 --- a/src/components/tools/literature-search.js +++ b/src/components/tools/literature-search.js @@ -1,8 +1,9 @@ import Bibliography from "src/client/bibliography.js" import FileIndex from "src/client/fileindex.js"; import moment from "src/external/moment.js" -import {Paper} from "src/client/literature.js" +import {Paper, AlexPaper} from "src/client/literature.js" import Morph from 'src/components/widgets/lively-morph.js'; +import Preferences from 'src/client/preferences.js'; /*MD # Literature Search @@ -112,10 +113,12 @@ export default class LiteratureSearch extends Morph { var rows = [] let allBibtexEntries = await FileIndex.current().db.bibliography.toArray() for(let bib of bibEntries) { - let id = bib.value.entryTags.scholarid + let id = bib.value.entryTags.scholarid || bib.value.entryTags.alexid + debugger let existing = allBibtexEntries .filter(ea => ea.key == bib.value.citationKey) .filter(ea => !this.baseURL || ea.url.startsWith(this.baseURL)) + let rename = { await this.literatureListing.renameFile(this.renameURL, bib.generateFilename() + ".pdf") @@ -168,11 +171,26 @@ export default class LiteratureSearch extends Morph { return bibEntries } + async findBibtexEntriesAlex(queryString, div) { + var json = await fetch("alex://data/works?search=" + queryString).then(r => r.json()) + if (json.error) return []; + var papers = json.results.map(ea => new AlexPaper(ea)) + var bibEntries = [] + for(let ea of papers) { + bibEntries.push(await this.bibtexComponentForEntry(ea.toBibtexEntry(), ea)) + } + return bibEntries + } + async findBibtexEntriesFuzzy(queryString, div) { var bibEntries = [] + var json + if (Preferences.get("UseOpenAlex")) { + return this.findBibtexEntriesAlex(queryString, div); + } var fields = "externalIds,url,title,year,referenceCount,citationCount,fieldsOfStudy,s2FieldsOfStudy,authors" - var json = await fetch("scholar://data/paper/search?query=" + queryString + `&fields=${fields}`).then(r => r.json()) + json = await fetch("scholar://data/paper/search?query=" + queryString + `&fields=${fields}`).then(r => r.json()) if (!json || !json.data) { div.innerHTML = "nothing found" @@ -180,7 +198,6 @@ export default class LiteratureSearch extends Morph { } for(let ea of json.data) { - let bib = await ( ) let entry = { entryTags: { author: ea.authors.map(author => author.name.replace(/<\/?[a-z]+>/g,"")).join(" and "), @@ -194,19 +211,24 @@ export default class LiteratureSearch extends Morph { entryType: "article" } entry.citationKey = Bibliography.generateCitationKey(entry) + bibEntries.push(this.bibtexComponentForEntry(entry, ea)) + } + return bibEntries + } + + async bibtexComponentForEntry(entry, data) { + let bib = await ( ) bib.value = entry bib.updateView() bib.addEventListener("click", evt => { if (evt.shiftKey) { - lively.openInspector(ea) + lively.openInspector(data) } }) - - bibEntries.push(bib) - } - return bibEntries + return bib } + livelyMigrate(other) { this.literatureListing = other.literatureListing } diff --git a/src/components/tools/lively-generic-search.js b/src/components/tools/lively-generic-search.js index e0b7a43b8..c283421d8 100644 --- a/src/components/tools/lively-generic-search.js +++ b/src/components/tools/lively-generic-search.js @@ -123,8 +123,9 @@ export default class LivelyGenericSearch extends Morph { var pattern = this.input.value; var search = new RegExp(pattern, 'ig'); + var root = lively4url + "/" const filteredFiles = (await this.files).filter(file => { - if (file.url.startsWith(lively4url)) { + if (file.url.startsWith(root)) { const relativePath = file.url.replace(/.*\//ig, ''); return relativePath.match(search); } else { diff --git a/src/components/tools/lively-index-search.js b/src/components/tools/lively-index-search.js index 5125683f6..72d5cc424 100644 --- a/src/components/tools/lively-index-search.js +++ b/src/components/tools/lively-index-search.js @@ -126,7 +126,7 @@ export default class IndexSearch extends Morph { var result = [] var scope = this.scope var searchTime = await lively.time(async () => { - var root = lively4url; // there are other files in our cache... too + var root = lively4url + "/"; // there are other files in our cache... too var roots = [root].concat(lively.preferences.get("ExtraSearchRoots")).concat(this.findRootsInBrowsers()) return FileIndex.current().db.files.each(file => { if (roots.find(eaRoot => file.url.startsWith(eaRoot)) && file.content && (!scope || file.url.match(scope))) { diff --git a/test/client/literature-alex-work-example.json b/test/client/literature-alex-work-example.json new file mode 100644 index 000000000..af7b256f3 --- /dev/null +++ b/test/client/literature-alex-work-example.json @@ -0,0 +1,1682 @@ + { + "id": "https://openalex.org/W2741809807", + "doi": "https://doi.org/10.7717/peerj.4375", + "title": "The state of OA: a large-scale analysis of the prevalence and impact of Open Access articles", + "display_name": "The state of OA: a large-scale analysis of the prevalence and impact of Open Access articles", + "publication_year": 2018, + "publication_date": "2018-02-13", + "ids": { + "openalex": "https://openalex.org/W2741809807", + "doi": "https://doi.org/10.7717/peerj.4375", + "mag": "2741809807", + "pmid": "https://pubmed.ncbi.nlm.nih.gov/29456894", + "pmcid": "https://www.ncbi.nlm.nih.gov/pmc/articles/5815332" + }, + "language": "en", + "primary_location": { + "is_oa": true, + "landing_page_url": "https://doi.org/10.7717/peerj.4375", + "pdf_url": "https://peerj.com/articles/4375.pdf", + "source": { + "id": "https://openalex.org/S1983995261", + "display_name": "PeerJ", + "issn_l": "2167-8359", + "issn": [ + "2167-8359" + ], + "is_oa": true, + "is_in_doaj": true, + "is_indexed_in_scopus": true, + "is_core": true, + "host_organization": "https://openalex.org/P4310320104", + "host_organization_name": "PeerJ, Inc.", + "host_organization_lineage": [ + "https://openalex.org/P4310320104" + ], + "host_organization_lineage_names": [ + "PeerJ, Inc." + ], + "type": "journal" + }, + "license": "cc-by", + "license_id": "https://openalex.org/licenses/cc-by", + "version": "publishedVersion", + "is_accepted": true, + "is_published": true + }, + "type": "article", + "type_crossref": "journal-article", + "indexed_in": [ + "crossref", + "doaj", + "pubmed" + ], + "open_access": { + "is_oa": true, + "oa_status": "gold", + "oa_url": "https://peerj.com/articles/4375.pdf", + "any_repository_has_fulltext": true + }, + "authorships": [ + { + "author_position": "first", + "author": { + "id": "https://openalex.org/A5048491430", + "display_name": "Heather Piwowar", + "orcid": "https://orcid.org/0000-0003-1613-5981" + }, + "institutions": [ + { + "id": "https://openalex.org/I4210166736", + "display_name": "Impact Technology Development (United States)", + "ror": "https://ror.org/05ppvf150", + "country_code": "US", + "type": "company", + "lineage": [ + "https://openalex.org/I4210166736" + ] + } + ], + "countries": [ + "US" + ], + "is_corresponding": false, + "raw_author_name": "Heather Piwowar", + "raw_affiliation_strings": [ + "Impactstory, Sanford, NC, USA" + ], + "affiliations": [ + { + "raw_affiliation_string": "Impactstory, Sanford, NC, USA", + "institution_ids": [ + "https://openalex.org/I4210166736" + ] + } + ] + }, + { + "author_position": "middle", + "author": { + "id": "https://openalex.org/A5023888391", + "display_name": "Jason Priem", + "orcid": "https://orcid.org/0000-0001-6187-6610" + }, + "institutions": [ + { + "id": "https://openalex.org/I4210166736", + "display_name": "Impact Technology Development (United States)", + "ror": "https://ror.org/05ppvf150", + "country_code": "US", + "type": "company", + "lineage": [ + "https://openalex.org/I4210166736" + ] + } + ], + "countries": [ + "US" + ], + "is_corresponding": false, + "raw_author_name": "Jason Priem", + "raw_affiliation_strings": [ + "Impactstory, Sanford, NC, USA" + ], + "affiliations": [ + { + "raw_affiliation_string": "Impactstory, Sanford, NC, USA", + "institution_ids": [ + "https://openalex.org/I4210166736" + ] + } + ] + }, + { + "author_position": "middle", + "author": { + "id": "https://openalex.org/A5068542997", + "display_name": "Vincent Larivière", + "orcid": "https://orcid.org/0000-0002-2733-0689" + }, + "institutions": [ + { + "id": "https://openalex.org/I70931966", + "display_name": "Université de Montréal", + "ror": "https://ror.org/0161xgx34", + "country_code": "CA", + "type": "funder", + "lineage": [ + "https://openalex.org/I70931966" + ] + }, + { + "id": "https://openalex.org/I159129438", + "display_name": "Université du Québec à Montréal", + "ror": "https://ror.org/002rjbv21", + "country_code": "CA", + "type": "funder", + "lineage": [ + "https://openalex.org/I159129438", + "https://openalex.org/I49663120" + ] + } + ], + "countries": [ + "CA" + ], + "is_corresponding": false, + "raw_author_name": "Vincent Larivière", + "raw_affiliation_strings": [ + "Observatoire des Sciences et des Technologies (OST), Centre Interuniversitaire de Recherche sur la Science et la Technologie (CIRST), Université du Québec à Montréal, Montréal, QC, Canada", + "École de bibliothéconomie et des sciences de l’information, Université de Montréal, Montréal, QC, Canada" + ], + "affiliations": [ + { + "raw_affiliation_string": "École de bibliothéconomie et des sciences de l’information, Université de Montréal, Montréal, QC, Canada", + "institution_ids": [ + "https://openalex.org/I70931966" + ] + }, + { + "raw_affiliation_string": "Observatoire des Sciences et des Technologies (OST), Centre Interuniversitaire de Recherche sur la Science et la Technologie (CIRST), Université du Québec à Montréal, Montréal, QC, Canada", + "institution_ids": [ + "https://openalex.org/I159129438" + ] + } + ] + }, + { + "author_position": "middle", + "author": { + "id": "https://openalex.org/A5085171399", + "display_name": "Juan Pablo Alperín", + "orcid": "https://orcid.org/0000-0002-9344-7439" + }, + "institutions": [ + { + "id": "https://openalex.org/I18014758", + "display_name": "Simon Fraser University", + "ror": "https://ror.org/0213rcc28", + "country_code": "CA", + "type": "funder", + "lineage": [ + "https://openalex.org/I18014758" + ] + }, + { + "id": "https://openalex.org/I4387153203", + "display_name": "Public Knowledge Project", + "ror": "https://ror.org/05ek4tb53", + "country_code": null, + "type": "other", + "lineage": [ + "https://openalex.org/I18014758", + "https://openalex.org/I4387153203" + ] + } + ], + "countries": [ + "CA" + ], + "is_corresponding": false, + "raw_author_name": "Juan Pablo Alperin", + "raw_affiliation_strings": [ + "Canadian Institute for Studies in Publishing, Simon Fraser University, Vancouver, BC, Canada", + "Public Knowledge Project, Canada" + ], + "affiliations": [ + { + "raw_affiliation_string": "Canadian Institute for Studies in Publishing, Simon Fraser University, Vancouver, BC, Canada", + "institution_ids": [ + "https://openalex.org/I18014758" + ] + }, + { + "raw_affiliation_string": "Public Knowledge Project, Canada", + "institution_ids": [ + "https://openalex.org/I4387153203" + ] + } + ] + }, + { + "author_position": "middle", + "author": { + "id": "https://openalex.org/A5066880338", + "display_name": "Lisa Matthias", + "orcid": "https://orcid.org/0000-0002-2612-2132" + }, + "institutions": [ + { + "id": "https://openalex.org/I18014758", + "display_name": "Simon Fraser University", + "ror": "https://ror.org/0213rcc28", + "country_code": "CA", + "type": "funder", + "lineage": [ + "https://openalex.org/I18014758" + ] + } + ], + "countries": [ + "CA" + ], + "is_corresponding": false, + "raw_author_name": "Lisa Matthias", + "raw_affiliation_strings": [ + "Scholarly Communications Lab, Simon Fraser University, Vancouver, Canada" + ], + "affiliations": [ + { + "raw_affiliation_string": "Scholarly Communications Lab, Simon Fraser University, Vancouver, Canada", + "institution_ids": [ + "https://openalex.org/I18014758" + ] + } + ] + }, + { + "author_position": "middle", + "author": { + "id": "https://openalex.org/A5015414792", + "display_name": "Bree Norlander", + "orcid": "https://orcid.org/0000-0002-0431-4221" + }, + "institutions": [ + { + "id": "https://openalex.org/I201448701", + "display_name": "University of Washington", + "ror": "https://ror.org/00cvxb145", + "country_code": "US", + "type": "funder", + "lineage": [ + "https://openalex.org/I201448701" + ] + }, + { + "id": "https://openalex.org/I58610484", + "display_name": "Seattle University", + "ror": "https://ror.org/02jqc0m91", + "country_code": "US", + "type": "education", + "lineage": [ + "https://openalex.org/I58610484" + ] + } + ], + "countries": [ + "US" + ], + "is_corresponding": false, + "raw_author_name": "Bree Norlander", + "raw_affiliation_strings": [ + "FlourishOA, USA", + "Information School, University of Washington, Seattle, USA" + ], + "affiliations": [ + { + "raw_affiliation_string": "Information School, University of Washington, Seattle, USA", + "institution_ids": [ + "https://openalex.org/I201448701", + "https://openalex.org/I58610484" + ] + }, + { + "raw_affiliation_string": "FlourishOA, USA", + "institution_ids": [] + } + ] + }, + { + "author_position": "middle", + "author": { + "id": "https://openalex.org/A5062989025", + "display_name": "Ashley Farley", + "orcid": "https://orcid.org/0000-0001-9310-6944" + }, + "institutions": [ + { + "id": "https://openalex.org/I201448701", + "display_name": "University of Washington", + "ror": "https://ror.org/00cvxb145", + "country_code": "US", + "type": "funder", + "lineage": [ + "https://openalex.org/I201448701" + ] + }, + { + "id": "https://openalex.org/I58610484", + "display_name": "Seattle University", + "ror": "https://ror.org/02jqc0m91", + "country_code": "US", + "type": "education", + "lineage": [ + "https://openalex.org/I58610484" + ] + } + ], + "countries": [ + "US" + ], + "is_corresponding": false, + "raw_author_name": "Ashley Farley", + "raw_affiliation_strings": [ + "FlourishOA, USA", + "Information School, University of Washington, Seattle, USA" + ], + "affiliations": [ + { + "raw_affiliation_string": "Information School, University of Washington, Seattle, USA", + "institution_ids": [ + "https://openalex.org/I201448701", + "https://openalex.org/I58610484" + ] + }, + { + "raw_affiliation_string": "FlourishOA, USA", + "institution_ids": [] + } + ] + }, + { + "author_position": "middle", + "author": { + "id": "https://openalex.org/A5046879461", + "display_name": "Jevin D. West", + "orcid": "https://orcid.org/0000-0002-4118-0322" + }, + "institutions": [ + { + "id": "https://openalex.org/I201448701", + "display_name": "University of Washington", + "ror": "https://ror.org/00cvxb145", + "country_code": "US", + "type": "funder", + "lineage": [ + "https://openalex.org/I201448701" + ] + }, + { + "id": "https://openalex.org/I58610484", + "display_name": "Seattle University", + "ror": "https://ror.org/02jqc0m91", + "country_code": "US", + "type": "education", + "lineage": [ + "https://openalex.org/I58610484" + ] + } + ], + "countries": [ + "US" + ], + "is_corresponding": false, + "raw_author_name": "Jevin West", + "raw_affiliation_strings": [ + "Information School, University of Washington, Seattle, USA" + ], + "affiliations": [ + { + "raw_affiliation_string": "Information School, University of Washington, Seattle, USA", + "institution_ids": [ + "https://openalex.org/I201448701", + "https://openalex.org/I58610484" + ] + } + ] + }, + { + "author_position": "last", + "author": { + "id": "https://openalex.org/A5014077037", + "display_name": "Stefanie Haustein", + "orcid": "https://orcid.org/0000-0003-0157-1430" + }, + "institutions": [ + { + "id": "https://openalex.org/I159129438", + "display_name": "Université du Québec à Montréal", + "ror": "https://ror.org/002rjbv21", + "country_code": "CA", + "type": "funder", + "lineage": [ + "https://openalex.org/I159129438", + "https://openalex.org/I49663120" + ] + }, + { + "id": "https://openalex.org/I153718931", + "display_name": "University of Ottawa", + "ror": "https://ror.org/03c4mmv16", + "country_code": "CA", + "type": "funder", + "lineage": [ + "https://openalex.org/I153718931" + ] + } + ], + "countries": [ + "CA" + ], + "is_corresponding": false, + "raw_author_name": "Stefanie Haustein", + "raw_affiliation_strings": [ + "Observatoire des Sciences et des Technologies (OST), Centre Interuniversitaire de Recherche sur la Science et la Technologie (CIRST), Université du Québec à Montréal, Montréal, QC, Canada", + "School of Information Studies, University of Ottawa, Ottawa, ON, Canada" + ], + "affiliations": [ + { + "raw_affiliation_string": "Observatoire des Sciences et des Technologies (OST), Centre Interuniversitaire de Recherche sur la Science et la Technologie (CIRST), Université du Québec à Montréal, Montréal, QC, Canada", + "institution_ids": [ + "https://openalex.org/I159129438" + ] + }, + { + "raw_affiliation_string": "School of Information Studies, University of Ottawa, Ottawa, ON, Canada", + "institution_ids": [ + "https://openalex.org/I153718931" + ] + } + ] + } + ], + "institution_assertions": [], + "countries_distinct_count": 2, + "institutions_distinct_count": 8, + "corresponding_author_ids": [], + "corresponding_institution_ids": [], + "apc_list": { + "value": 1395, + "currency": "USD", + "value_usd": 1395 + }, + "apc_paid": { + "value": 1395, + "currency": "USD", + "value_usd": 1395 + }, + "fwci": 78.64, + "has_fulltext": true, + "fulltext_origin": "pdf", + "cited_by_count": 941, + "citation_normalized_percentile": { + "value": 0.999782, + "is_in_top_1_percent": true, + "is_in_top_10_percent": true + }, + "cited_by_percentile_year": { + "min": 99, + "max": 100 + }, + "biblio": { + "volume": "6", + "issue": null, + "first_page": "e4375", + "last_page": "e4375" + }, + "is_retracted": false, + "is_paratext": false, + "primary_topic": { + "id": "https://openalex.org/T10102", + "display_name": "scientometrics and bibliometrics research", + "score": 0.9969, + "subfield": { + "id": "https://openalex.org/subfields/1804", + "display_name": "Statistics, Probability and Uncertainty" + }, + "field": { + "id": "https://openalex.org/fields/18", + "display_name": "Decision Sciences" + }, + "domain": { + "id": "https://openalex.org/domains/2", + "display_name": "Social Sciences" + } + }, + "topics": [ + { + "id": "https://openalex.org/T10102", + "display_name": "scientometrics and bibliometrics research", + "score": 0.9969, + "subfield": { + "id": "https://openalex.org/subfields/1804", + "display_name": "Statistics, Probability and Uncertainty" + }, + "field": { + "id": "https://openalex.org/fields/18", + "display_name": "Decision Sciences" + }, + "domain": { + "id": "https://openalex.org/domains/2", + "display_name": "Social Sciences" + } + }, + { + "id": "https://openalex.org/T13607", + "display_name": "Academic Publishing and Open Access", + "score": 0.9807, + "subfield": { + "id": "https://openalex.org/subfields/1802", + "display_name": "Information Systems and Management" + }, + "field": { + "id": "https://openalex.org/fields/18", + "display_name": "Decision Sciences" + }, + "domain": { + "id": "https://openalex.org/domains/2", + "display_name": "Social Sciences" + } + }, + { + "id": "https://openalex.org/T11937", + "display_name": "Research Data Management Practices", + "score": 0.9185, + "subfield": { + "id": "https://openalex.org/subfields/1710", + "display_name": "Information Systems" + }, + "field": { + "id": "https://openalex.org/fields/17", + "display_name": "Computer Science" + }, + "domain": { + "id": "https://openalex.org/domains/3", + "display_name": "Physical Sciences" + } + } + ], + "keywords": [ + { + "id": "https://openalex.org/keywords/scholarly-communication", + "display_name": "Scholarly Communication", + "score": 0.5683152 + }, + { + "id": "https://openalex.org/keywords/web-of-science", + "display_name": "Web of science", + "score": 0.5055373 + }, + { + "id": "https://openalex.org/keywords/open-science", + "display_name": "Open Science", + "score": 0.48734793 + }, + { + "id": "https://openalex.org/keywords/citation-analysis", + "display_name": "Citation analysis", + "score": 0.43920913 + } + ], + "concepts": [ + { + "id": "https://openalex.org/C2778805511", + "wikidata": "https://www.wikidata.org/wiki/Q1713", + "display_name": "Citation", + "level": 2, + "score": 0.68818974 + }, + { + "id": "https://openalex.org/C2780560020", + "wikidata": "https://www.wikidata.org/wiki/Q79719", + "display_name": "License", + "level": 2, + "score": 0.5919564 + }, + { + "id": "https://openalex.org/C2777462167", + "wikidata": "https://www.wikidata.org/wiki/Q7432048", + "display_name": "Scholarly communication", + "level": 3, + "score": 0.5683152 + }, + { + "id": "https://openalex.org/C3020774429", + "wikidata": "https://www.wikidata.org/wiki/Q1201886", + "display_name": "Web of science", + "level": 3, + "score": 0.5055373 + }, + { + "id": "https://openalex.org/C178315738", + "wikidata": "https://www.wikidata.org/wiki/Q603441", + "display_name": "Bibliometrics", + "level": 2, + "score": 0.4962271 + }, + { + "id": "https://openalex.org/C2778149293", + "wikidata": "https://www.wikidata.org/wiki/Q309823", + "display_name": "Open science", + "level": 2, + "score": 0.48734793 + }, + { + "id": "https://openalex.org/C41008148", + "wikidata": "https://www.wikidata.org/wiki/Q21198", + "display_name": "Computer science", + "level": 0, + "score": 0.45299834 + }, + { + "id": "https://openalex.org/C136764020", + "wikidata": "https://www.wikidata.org/wiki/Q466", + "display_name": "World Wide Web", + "level": 1, + "score": 0.45292723 + }, + { + "id": "https://openalex.org/C105345328", + "wikidata": "https://www.wikidata.org/wiki/Q206276", + "display_name": "Citation analysis", + "level": 3, + "score": 0.43920913 + }, + { + "id": "https://openalex.org/C71924100", + "wikidata": "https://www.wikidata.org/wiki/Q11190", + "display_name": "Medicine", + "level": 0, + "score": 0.38992488 + }, + { + "id": "https://openalex.org/C161191863", + "wikidata": "https://www.wikidata.org/wiki/Q199655", + "display_name": "Library science", + "level": 1, + "score": 0.37244928 + }, + { + "id": "https://openalex.org/C17744445", + "wikidata": "https://www.wikidata.org/wiki/Q36442", + "display_name": "Political science", + "level": 0, + "score": 0.24154112 + }, + { + "id": "https://openalex.org/C95190672", + "wikidata": "https://www.wikidata.org/wiki/Q815382", + "display_name": "Meta-analysis", + "level": 2, + "score": 0.15993848 + }, + { + "id": "https://openalex.org/C126322002", + "wikidata": "https://www.wikidata.org/wiki/Q11180", + "display_name": "Internal medicine", + "level": 1, + "score": 0.1485905 + }, + { + "id": "https://openalex.org/C105795698", + "wikidata": "https://www.wikidata.org/wiki/Q12483", + "display_name": "Statistics", + "level": 1, + "score": 0.13449502 + }, + { + "id": "https://openalex.org/C33923547", + "wikidata": "https://www.wikidata.org/wiki/Q395", + "display_name": "Mathematics", + "level": 0, + "score": 0.11654329 + }, + { + "id": "https://openalex.org/C151719136", + "wikidata": "https://www.wikidata.org/wiki/Q3972943", + "display_name": "Publishing", + "level": 2, + "score": 0 + }, + { + "id": "https://openalex.org/C199539241", + "wikidata": "https://www.wikidata.org/wiki/Q7748", + "display_name": "Law", + "level": 1, + "score": 0 + }, + { + "id": "https://openalex.org/C111919701", + "wikidata": "https://www.wikidata.org/wiki/Q9135", + "display_name": "Operating system", + "level": 1, + "score": 0 + } + ], + "mesh": [], + "locations_count": 7, + "locations": [ + { + "is_oa": true, + "landing_page_url": "https://doi.org/10.7717/peerj.4375", + "pdf_url": "https://peerj.com/articles/4375.pdf", + "source": { + "id": "https://openalex.org/S1983995261", + "display_name": "PeerJ", + "issn_l": "2167-8359", + "issn": [ + "2167-8359" + ], + "is_oa": true, + "is_in_doaj": true, + "is_indexed_in_scopus": true, + "is_core": true, + "host_organization": "https://openalex.org/P4310320104", + "host_organization_name": "PeerJ, Inc.", + "host_organization_lineage": [ + "https://openalex.org/P4310320104" + ], + "host_organization_lineage_names": [ + "PeerJ, Inc." + ], + "type": "journal" + }, + "license": "cc-by", + "license_id": "https://openalex.org/licenses/cc-by", + "version": "publishedVersion", + "is_accepted": true, + "is_published": true + }, + { + "is_oa": false, + "landing_page_url": "https://doaj.org/article/13b0006802e745a6973c19b2ecb9b97a", + "pdf_url": null, + "source": { + "id": "https://openalex.org/S4306401280", + "display_name": "DOAJ (DOAJ: Directory of Open Access Journals)", + "issn_l": null, + "issn": null, + "is_oa": true, + "is_in_doaj": false, + "is_indexed_in_scopus": false, + "is_core": false, + "host_organization": null, + "host_organization_name": null, + "host_organization_lineage": [], + "host_organization_lineage_names": [], + "type": "repository" + }, + "license": null, + "license_id": null, + "version": null, + "is_accepted": false, + "is_published": false + }, + { + "is_oa": true, + "landing_page_url": "https://europepmc.org/articles/pmc5815332", + "pdf_url": "https://europepmc.org/articles/pmc5815332?pdf=render", + "source": { + "id": "https://openalex.org/S4306400806", + "display_name": "Europe PMC (PubMed Central)", + "issn_l": null, + "issn": null, + "is_oa": true, + "is_in_doaj": false, + "is_indexed_in_scopus": false, + "is_core": false, + "host_organization": "https://openalex.org/I1303153112", + "host_organization_name": "European Bioinformatics Institute", + "host_organization_lineage": [ + "https://openalex.org/I1303153112" + ], + "host_organization_lineage_names": [ + "European Bioinformatics Institute" + ], + "type": "repository" + }, + "license": "cc-by", + "license_id": "https://openalex.org/licenses/cc-by", + "version": "publishedVersion", + "is_accepted": true, + "is_published": true + }, + { + "is_oa": true, + "landing_page_url": "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5815332", + "pdf_url": null, + "source": { + "id": "https://openalex.org/S2764455111", + "display_name": "PubMed Central", + "issn_l": null, + "issn": null, + "is_oa": true, + "is_in_doaj": false, + "is_indexed_in_scopus": false, + "is_core": false, + "host_organization": "https://openalex.org/I1299303238", + "host_organization_name": "National Institutes of Health", + "host_organization_lineage": [ + "https://openalex.org/I1299303238" + ], + "host_organization_lineage_names": [ + "National Institutes of Health" + ], + "type": "repository" + }, + "license": null, + "license_id": null, + "version": "publishedVersion", + "is_accepted": true, + "is_published": true + }, + { + "is_oa": true, + "landing_page_url": "https://digitalcommons.unl.edu/cgi/viewcontent.cgi?article=1143&context=scholcom", + "pdf_url": "https://digitalcommons.unl.edu/cgi/viewcontent.cgi?article=1143&context=scholcom", + "source": { + "id": "https://openalex.org/S4377196105", + "display_name": "Digital Commons - University of Nebraska Lincoln (University of Nebraska–Lincoln)", + "issn_l": null, + "issn": null, + "is_oa": false, + "is_in_doaj": false, + "is_indexed_in_scopus": false, + "is_core": false, + "host_organization": "https://openalex.org/I114395901", + "host_organization_name": "University of Nebraska–Lincoln", + "host_organization_lineage": [ + "https://openalex.org/I114395901" + ], + "host_organization_lineage_names": [ + "University of Nebraska–Lincoln" + ], + "type": "repository" + }, + "license": "cc-by", + "license_id": "https://openalex.org/licenses/cc-by", + "version": "submittedVersion", + "is_accepted": false, + "is_published": false + }, + { + "is_oa": true, + "landing_page_url": "http://hdl.handle.net/1866/23242", + "pdf_url": "https://papyrus.bib.umontreal.ca/xmlui/bitstream/1866/23242/1/peerj-06-4375.pdf", + "source": { + "id": "https://openalex.org/S4306402422", + "display_name": "Papyrus : Institutional Repository (Université de Montréal)", + "issn_l": null, + "issn": null, + "is_oa": true, + "is_in_doaj": false, + "is_indexed_in_scopus": false, + "is_core": false, + "host_organization": "https://openalex.org/I70931966", + "host_organization_name": "Université de Montréal", + "host_organization_lineage": [ + "https://openalex.org/I70931966" + ], + "host_organization_lineage_names": [ + "Université de Montréal" + ], + "type": "repository" + }, + "license": "cc-by", + "license_id": "https://openalex.org/licenses/cc-by", + "version": "submittedVersion", + "is_accepted": false, + "is_published": false + }, + { + "is_oa": false, + "landing_page_url": "https://pubmed.ncbi.nlm.nih.gov/29456894", + "pdf_url": null, + "source": { + "id": "https://openalex.org/S4306525036", + "display_name": "PubMed", + "issn_l": null, + "issn": null, + "is_oa": false, + "is_in_doaj": false, + "is_indexed_in_scopus": false, + "is_core": false, + "host_organization": "https://openalex.org/I1299303238", + "host_organization_name": "National Institutes of Health", + "host_organization_lineage": [ + "https://openalex.org/I1299303238" + ], + "host_organization_lineage_names": [ + "National Institutes of Health" + ], + "type": "repository" + }, + "license": null, + "license_id": null, + "version": null, + "is_accepted": false, + "is_published": false + } + ], + "best_oa_location": { + "is_oa": true, + "landing_page_url": "https://doi.org/10.7717/peerj.4375", + "pdf_url": "https://peerj.com/articles/4375.pdf", + "source": { + "id": "https://openalex.org/S1983995261", + "display_name": "PeerJ", + "issn_l": "2167-8359", + "issn": [ + "2167-8359" + ], + "is_oa": true, + "is_in_doaj": true, + "is_indexed_in_scopus": true, + "is_core": true, + "host_organization": "https://openalex.org/P4310320104", + "host_organization_name": "PeerJ, Inc.", + "host_organization_lineage": [ + "https://openalex.org/P4310320104" + ], + "host_organization_lineage_names": [ + "PeerJ, Inc." + ], + "type": "journal" + }, + "license": "cc-by", + "license_id": "https://openalex.org/licenses/cc-by", + "version": "publishedVersion", + "is_accepted": true, + "is_published": true + }, + "sustainable_development_goals": [], + "grants": [], + "datasets": [], + "versions": [], + "referenced_works_count": 45, + "referenced_works": [ + "https://openalex.org/W1560783210", + "https://openalex.org/W1724212071", + "https://openalex.org/W1767272795", + "https://openalex.org/W1917633107", + "https://openalex.org/W1931854307", + "https://openalex.org/W1944943415", + "https://openalex.org/W1957687230", + "https://openalex.org/W1989318653", + "https://openalex.org/W2003844967", + "https://openalex.org/W2016860460", + "https://openalex.org/W2020807482", + "https://openalex.org/W2029057325", + "https://openalex.org/W2031754690", + "https://openalex.org/W2048185449", + "https://openalex.org/W2078310052", + "https://openalex.org/W2089123513", + "https://openalex.org/W2115339903", + "https://openalex.org/W2140880926", + "https://openalex.org/W2160597895", + "https://openalex.org/W2231201268", + "https://openalex.org/W2299516731", + "https://openalex.org/W2306268324", + "https://openalex.org/W2322381034", + "https://openalex.org/W2343014812", + "https://openalex.org/W2345375849", + "https://openalex.org/W2463568293", + "https://openalex.org/W2511661767", + "https://openalex.org/W2511663072", + "https://openalex.org/W2520991028", + "https://openalex.org/W2563251083", + "https://openalex.org/W2566143661", + "https://openalex.org/W2587705861", + "https://openalex.org/W2588027260", + "https://openalex.org/W2611818942", + "https://openalex.org/W2737712680", + "https://openalex.org/W2753353163", + "https://openalex.org/W2762597540", + "https://openalex.org/W2785823074", + "https://openalex.org/W2953072907", + "https://openalex.org/W2997143876", + "https://openalex.org/W3012252063", + "https://openalex.org/W3121567788", + "https://openalex.org/W4254015553", + "https://openalex.org/W4298108315", + "https://openalex.org/W4301734034" + ], + "related_works": [ + "https://openalex.org/W3203790917", + "https://openalex.org/W3201736257", + "https://openalex.org/W2904800587", + "https://openalex.org/W2608652318", + "https://openalex.org/W2294604317", + "https://openalex.org/W2285613965", + "https://openalex.org/W2162430746", + "https://openalex.org/W2086473138", + "https://openalex.org/W2060904856", + "https://openalex.org/W203102807" + ], + "abstract_inverted_index": { + "67": [ + 43 + ], + "Despite": [ + 0 + ], + "growing": [ + 1 + ], + "interest": [ + 2 + ], + "in": [ + 3, + 57, + 73, + 110, + 122 + ], + "Open": [ + 4, + 201 + ], + "Access": [ + 5 + ], + "(OA)": [ + 6 + ], + "to": [ + 7, + 54, + 252 + ], + "scholarly": [ + 8, + 105 + ], + "literature,": [ + 9 + ], + "there": [ + 10 + ], + "is": [ + 11, + 107, + 116, + 176 + ], + "an": [ + 12, + 34, + 85, + 185, + 199, + 231 + ], + "unmet": [ + 13 + ], + "need": [ + 14, + 31 + ], + "for": [ + 15, + 42, + 174, + 219 + ], + "large-scale,": [ + 16 + ], + "up-to-date,": [ + 17 + ], + "and": [ + 18, + 24, + 77, + 112, + 124, + 144, + 221, + 237, + 256 + ], + "reproducible": [ + 19 + ], + "studies": [ + 20 + ], + "assessing": [ + 21 + ], + "the": [ + 22, + 104, + 134, + 145, + 170, + 195, + 206, + 213, + 245 + ], + "prevalence": [ + 23 + ], + "characteristics": [ + 25 + ], + "of": [ + 26, + 51, + 75, + 83, + 103, + 137, + 141, + 163, + 209 + ], + "OA.": [ + 27, + 168, + 239 + ], + "We": [ + 28, + 46, + 97, + 203, + 240 + ], + "address": [ + 29 + ], + "this": [ + 30, + 114, + 142 + ], + "using": [ + 32, + 95, + 244 + ], + "oaDOI,": [ + 33 + ], + "open": [ + 35 + ], + "online": [ + 36 + ], + "service": [ + 37 + ], + "that": [ + 38, + 89, + 99, + 113, + 147, + 155 + ], + "determines": [ + 39 + ], + "OA": [ + 40, + 56, + 93, + 108, + 138, + 159, + 175, + 210, + 223, + 254 + ], + "status": [ + 41 + ], + "million": [ + 44 + ], + "articles.": [ + 45 + ], + "use": [ + 47 + ], + "three": [ + 48, + 58 + ], + "samples,": [ + 49 + ], + "each": [ + 50 + ], + "100,000": [ + 52 + ], + "articles,": [ + 53, + 152, + 211 + ], + "investigate": [ + 55 + ], + "populations:": [ + 59 + ], + "(1)": [ + 60 + ], + "all": [ + 61 + ], + "journal": [ + 62, + 70 + ], + "articles": [ + 63, + 71, + 79, + 94, + 164, + 191, + 224 + ], + "assigned": [ + 64 + ], + "a": [ + 65, + 250 + ], + "Crossref": [ + 66 + ], + "DOI,": [ + 67 + ], + "(2)": [ + 68 + ], + "recent": [ + 69, + 128 + ], + "indexed": [ + 72 + ], + "Web": [ + 74 + ], + "Science,": [ + 76 + ], + "(3)": [ + 78 + ], + "viewed": [ + 80 + ], + "by": [ + 81, + 120, + 235 + ], + "users": [ + 82, + 91, + 157 + ], + "Unpaywall,": [ + 84 + ], + "open-source": [ + 86 + ], + "browser": [ + 87 + ], + "extension": [ + 88 + ], + "lets": [ + 90 + ], + "find": [ + 92, + 154 + ], + "oaDOI.": [ + 96 + ], + "estimate": [ + 98 + ], + "at": [ + 100 + ], + "least": [ + 101 + ], + "28%": [ + 102 + ], + "literature": [ + 106 + ], + "(19M": [ + 109 + ], + "total)": [ + 111 + ], + "proportion": [ + 115 + ], + "growing,": [ + 117 + ], + "driven": [ + 118, + 233 + ], + "particularly": [ + 119 + ], + "growth": [ + 121 + ], + "Gold": [ + 123 + ], + "Hybrid.": [ + 125 + ], + "The": [ + 126 + ], + "most": [ + 127, + 171 + ], + "year": [ + 129 + ], + "analyzed": [ + 130 + ], + "(2015)": [ + 131 + ], + "also": [ + 132, + 204 + ], + "has": [ + 133 + ], + "highest": [ + 135 + ], + "percentage": [ + 136 + ], + "(45%).": [ + 139 + ], + "Because": [ + 140 + ], + "growth,": [ + 143 + ], + "fact": [ + 146 + ], + "readers": [ + 148 + ], + "disproportionately": [ + 149 + ], + "access": [ + 150 + ], + "newer": [ + 151 + ], + "we": [ + 153, + 188 + ], + "Unpaywall": [ + 156 + ], + "encounter": [ + 158 + ], + "quite": [ + 160 + ], + "frequently:": [ + 161 + ], + "47%": [ + 162 + ], + "they": [ + 165 + ], + "view": [ + 166 + ], + "are": [ + 167 + ], + "Notably,": [ + 169 + ], + "common": [ + 172 + ], + "mechanism": [ + 173 + ], + "not": [ + 177 + ], + "Gold,": [ + 178 + ], + "Green,": [ + 179 + ], + "or": [ + 180 + ], + "Hybrid": [ + 181, + 238 + ], + "OA,": [ + 182 + ], + "but": [ + 183 + ], + "rather": [ + 184 + ], + "under-discussed": [ + 186 + ], + "category": [ + 187 + ], + "dub": [ + 189 + ], + "Bronze:": [ + 190 + ], + "made": [ + 192 + ], + "free-to-read": [ + 193 + ], + "on": [ + 194 + ], + "publisher": [ + 196 + ], + "website,": [ + 197 + ], + "without": [ + 198 + ], + "explicit": [ + 200 + ], + "license.": [ + 202 + ], + "examine": [ + 205 + ], + "citation": [ + 207, + 216 + ], + "impact": [ + 208 + ], + "corroborating": [ + 212 + ], + "so-called": [ + 214 + ], + "open-access": [ + 215 + ], + "advantage:": [ + 217 + ], + "accounting": [ + 218 + ], + "age": [ + 220 + ], + "discipline,": [ + 222 + ], + "receive": [ + 225 + ], + "18%": [ + 226 + ], + "more": [ + 227 + ], + "citations": [ + 228 + ], + "than": [ + 229 + ], + "average,": [ + 230 + ], + "effect": [ + 232 + ], + "primarily": [ + 234 + ], + "Green": [ + 236 + ], + "encourage": [ + 241 + ], + "further": [ + 242 + ], + "research": [ + 243 + ], + "free": [ + 246 + ], + "oaDOI": [ + 247 + ], + "service,": [ + 248 + ], + "as": [ + 249 + ], + "way": [ + 251 + ], + "inform": [ + 253 + ], + "policy": [ + 255 + ], + "practice.": [ + 257 + ] + }, + "abstract_inverted_index_v3": null, + "cited_by_api_url": "https://api.openalex.org/works?filter=cites:W2741809807", + "counts_by_year": [ + { + "year": 2025, + "cited_by_count": 11 + }, + { + "year": 2024, + "cited_by_count": 118 + }, + { + "year": 2023, + "cited_by_count": 142 + }, + { + "year": 2022, + "cited_by_count": 147 + }, + { + "year": 2021, + "cited_by_count": 146 + }, + { + "year": 2020, + "cited_by_count": 179 + }, + { + "year": 2019, + "cited_by_count": 130 + }, + { + "year": 2018, + "cited_by_count": 59 + }, + { + "year": 2017, + "cited_by_count": 9 + } + ], + "updated_date": "2025-03-01T12:29:37.526079", + "created_date": "2017-08-08" +} \ No newline at end of file diff --git a/test/client/literature-test.js b/test/client/literature-test.js new file mode 100644 index 000000000..35b0c0c26 --- /dev/null +++ b/test/client/literature-test.js @@ -0,0 +1,68 @@ +import {expect} from 'src/external/chai.js'; + +import {AlexPaper} from 'src/client/literature.js' + + + +describe('Literature', () => { + + var alexExampleWork + var paper; + + before(async () => { + alexExampleWork = await fetch(lively4url + '/test/client/literature-alex-work-example.json').then(r => r.json()) + + paper = new AlexPaper(alexExampleWork); + }) + + + describe('AlexPaper', () => { + it('constructor ', () => { + expect(paper.value).to.equal(alexExampleWork) + expect(alexExampleWork.id).to.be.a("string") + }); + + + it('has authors ', () => { + expect(paper.authors).to.be.an("array") + expect(paper.authors.length).to.equal(9) + expect(paper.authors[0].value).to.be.an("object") + expect(paper.authors[0].name, "name").to.be.a("string") + expect(paper.authors[0].id, "id").to.be.a("string") + }); + + it('has a year ', () => { + expect(paper.year).to.be.a("number") + }); + + it('has a title ', () => { + expect(paper.title).to.be.a("string") + }); + + it('has a doi ', () => { + expect(paper.doi).to.be.a("string") + }); + + it('has bibtex type ', () => { + expect(paper.bibtexType).to.equal("article") + }); + + it('has book title ', () => { + expect(paper.booktitle).to.be.a("string") + }); + + + it('has citation keys ', () => { + expect(paper.key).to.be.a("string") + expect(paper.key).to.equal("Piwowar2018SOL") + }); + + + it('has an id', () => { + expect(paper.alexid).to.be.a("string") + expect(paper.alexid).to.equal("W2741809807") + }); + + + }) +}); \ No newline at end of file