diff --git a/src/requests.md b/src/requests.md index 931418b..95411a4 100644 --- a/src/requests.md +++ b/src/requests.md @@ -80,6 +80,8 @@ const languageColor = Plot.scale({ }, }) +const requestsGroupedByPreprint = d3.group(requestsSelected, request => request.preprint) + const requestsByField = requestsSelected .flatMap(({ fields, ...request }) => fields.map(field => ({ ...request, field }))) .filter(request => (chosenDomain ? openAlexFields[request.field].domain === chosenDomain : true)) @@ -101,6 +103,9 @@ const requestsBySubfield = requestsSelected

${chosenField ? `${openAlexFields[chosenField].name} requests` : chosenDomain ? `${openAlexDomains[chosenDomain]} requests` : 'Requests'}

${requestsSelected.length.toLocaleString("en-US")} + ${requestsGroupedByPreprint.size !== requestsSelected.length ? html` + for ${requestsGroupedByPreprint.size.toLocaleString("en-US")} preprints + ` : ''} ${chosenField ? html`
${d3.format(".1%")(requestsSelected.length / requests.filter(d => d.domains.includes(chosenDomain)).length)} of all ${openAlexDomains[chosenDomain]} requests
` : ''}