From c7be7251c1a677e61130ef634dd7089177a3abd9 Mon Sep 17 00:00:00 2001 From: Chris Wilkinson Date: Tue, 2 Jul 2024 12:14:35 +0100 Subject: [PATCH] Show the percentage of requests that result in a PREreview Refs #26 --- src/requests.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/requests.md b/src/requests.md index 26345ee..3910a46 100644 --- a/src/requests.md +++ b/src/requests.md @@ -124,6 +124,14 @@ const requestsBySubfield = requestsSelected ${requestsWithAReviewGroupedByPreprint.size !== requestsWithAReview.length ? html` for ${requestsWithAReviewGroupedByPreprint.size.toLocaleString("en-US")} preprints ` : ''} + ${requestsWithAReviewGroupedByPreprint.size === 0 ? '' : + chosenField ? html` +
${d3.format(".1%")(requestsWithAReview.length / requests.filter(d => d.fields.includes(chosenField)).length)} of all ${openAlexFields[chosenField].name} requests
+ ` : chosenDomain ? html` +
${d3.format(".1%")(requestsWithAReview.length / requests.filter(d => d.domains.includes(chosenDomain)).length)} of all ${openAlexDomains[chosenDomain]} requests
+ ` : html` +
${d3.format(".1%")(requestsWithAReview.length / requests.length)} of all requests
+ `}