Skip to content

Commit

Permalink
Merge branch 'staging' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
annelhote committed Mar 21, 2022
2 parents 7fd1bf4 + 279e057 commit 00cfbb9
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,10 @@ function useGetData(observationDate, domain = '') {
bsoDomain,
y:
(100
* el.by_is_oa.buckets.find((item) => item.key === 1).doc_count)
/ el.doc_count,
y_abs: el.by_is_oa.buckets.find((item) => item.key === 1).doc_count,
* el.by_is_oa.buckets.find((item) => item.key === 1)?.doc_count
|| 0) / el.doc_count,
y_abs:
el.by_is_oa.buckets.find((item) => item.key === 1)?.doc_count || 0,
y_tot: el.doc_count,
country: intl.formatMessage({ id: `app.country.${el.key}` }),
publicationDate:
Expand Down
36 changes: 15 additions & 21 deletions src/components/DataCardsSection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,10 @@ export default function DataCardSection({ domain, lang }) {
},
documentsByTypesByOA: {
fetch: (buckets) => {
const articles = buckets?.find(
(item) => item.key === 'journal-article',
);
const articlesCount = articles?.doc_count;
const oaArticlesCount = articles?.by_is_oa.buckets?.find(
(item) => item.key === 1,
)?.doc_count;
const articles = buckets?.find((item) => item.key === 'journal-article') || [];
const articlesCount = articles?.doc_count || 0;
const oaArticlesCount = articles?.by_is_oa.buckets?.find((item) => item.key === 1)
?.doc_count || 0;
return `${((oaArticlesCount / articlesCount) * 100).toFixed(0)} %`;
},
get: documentsByTypesByOA,
Expand Down Expand Up @@ -125,7 +122,7 @@ export default function DataCardSection({ domain, lang }) {
},
hostedDocument: {
fetch: (buckets) => formatNumberByLang(
buckets.find((countObj) => countObj.key === 'HAL').doc_count,
buckets?.find((countObj) => countObj.key === 'HAL')?.doc_count || 0,
lang,
),
get: hostedDocuments,
Expand All @@ -147,9 +144,8 @@ export default function DataCardSection({ domain, lang }) {
},
openHealthPublicationPublisherRepository: {
fetch: (buckets) => {
const documentsCount = buckets.find(
(item) => item.key === 'publisher;repository',
).doc_count;
const documentsCount = buckets?.find((item) => item.key === 'publisher;repository')
?.doc_count || 0;
return `${((documentsCount / publicationsNumber) * 100)?.toFixed(
0,
)} %`;
Expand All @@ -165,9 +161,8 @@ export default function DataCardSection({ domain, lang }) {
},
hostedDocumentPMC: {
fetch: (buckets) => {
const documentsCount = buckets.find(
(countObj) => countObj.key === 'PubMed Central',
).doc_count;
const documentsCount = buckets?.find((countObj) => countObj.key === 'PubMed Central')
?.doc_count || 0;
return `${((documentsCount / publicationsNumber) * 100)?.toFixed(
0,
)} %`;
Expand Down Expand Up @@ -228,21 +223,20 @@ export default function DataCardSection({ domain, lang }) {
if (!publicationsNumber) {
const books = aggregations?.by_genre?.buckets?.find(
(item) => item.key === 'book',
);
const booksCount = books?.doc_count;
const oaBooksCount = books?.by_is_oa.buckets?.find(
(item) => item.key === 1,
)?.doc_count;
) || [];
const booksCount = books?.doc_count || 0;
const oaBooksCount = books?.by_is_oa?.buckets?.find((item) => item.key === 1)?.doc_count
|| 0;
setOaBooksRate(((oaBooksCount / booksCount) * 100).toFixed(0));
setPublicationsNumber(
aggregations.by_is_oa.buckets[0].doc_count
+ aggregations.by_is_oa.buckets[1].doc_count,
);
setTotalHostedDocuments(
formatNumberByLang(
aggregations.by_oa_colors.buckets.find(
aggregations.by_oa_colors.buckets?.find(
(item) => item.key === 'green',
).doc_count,
)?.doc_count || 0,
lang,
),
);
Expand Down
8 changes: 4 additions & 4 deletions src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -751,14 +751,14 @@
"app.health-publi.publishers.type-ouverture.description": "The dissemination of open access articles by scientific journal publishers is based on various business models. Some publishers have replaced traditional subscription revenues with the payment of <glossary0>app.glossary.apc-min</glossary0> charged on a per-article basis to researchers, their institutions or their funders. This change of model is usually done at the level of an entire journal (<glossary1>app.glossary.gold-full-apc-min</glossary1>), but sometimes, for certain titles, publishers maintain the subscription while offering authors to open their article in return for the payment of a publication fee (a model known as <glossary2>app.glossary.hybrid-min</glossary2>), thus establishing a particularly unreadable double payment. Some publishers do not charge publication fees but mobilise, in the context of a non-commercial activity, funding from states, public actors, universities or other non-profit organisations, in order to finance the editorial and publication activity upstream: this is the so-called <glossary3>app.glossary.diamond-min</glossary3> route. Finally, other models exist, such as the one where the publisher collects subscriptions for the most recent publications while releasing them in open access after a set period of time (<glossary4>app.glossary.barriere-mobile-min</glossary4>)",
"app.national-publi.publishers.type-ouverture.chart-evolution-repartition.title": "Evolution of business models for open access articles by publisher, by year of publication",
"app.health-publi.publishers.type-ouverture.chart-evolution-repartition.title": "Evolution of economic models for open access health articles by publisher, by year of publication",
"app.national-publi.publishers.type-ouverture.chart-evolution-repartition.tooltip": "<b>{series.name} ({point.bsoDomain})</b><br>{point.y:.2f}% of open access publications ((commentsName)) in the publisher<br>and published in {point.PublicationDate } are in {series.name} ({point.y_abs} / {point.y_tot})",
"app.health-publi.publishers.type-ouverture.chart-evolution-repartition.tooltip": "<b>{series.name} ({point.bsoDomain})</b><br>{point.y:.2f}% of open access publications ((commentsName)) in the publisher<br>and published in {point.PublicationDate } are in {series.name} ({point.y_abs} / {point.y_tot})",
"app.national-publi.publishers.type-ouverture.chart-evolution-repartition.tooltip": "<b>{series.name} ({point.bsoDomain})</b><br>{point.y:.2f}% of open access articles ((commentsName)) in the publisher<br>and published in {point.PublicationDate } are in {series.name} ({point.y_abs} / {point.y_tot})",
"app.health-publi.publishers.type-ouverture.chart-evolution-repartition.tooltip": "<b>{series.name} ({point.bsoDomain})</b><br>{point.y:.2f}% of open access articles ((commentsName)) in the publisher<br>and published in {point.PublicationDate } are in {series.name} ({point.y_abs} / {point.y_tot})",
"app.national-publi.publishers.type-ouverture.chart-evolution-repartition.comments": "This graph shows the distribution of scientific articles published in 2020 and distributed in open access by their publisher, according to the business model of the journal in which they are published. It distinguishes between four types of economic model: articles published in full open access journals that do not charge publication fees (\"diamond\"), articles published in full open access journals that do charge publication fees (\"Gold full APC\"), and articles published in hybrid journals (where only part of the content is open access and the other part is open through individually paid publication fees), and all other cases. The \"Diamant\" part is probably underestimated.<linebreak></linebreak>In particular, we observe that for French publications published in {year3}, diamond represents {diamond3}% of the articles disseminated in open access by their publisher.",
"app.health-publi.publishers.type-ouverture.chart-evolution-repartition.comments": "This graph shows the distribution of scientific articles in health published in 2020 and distributed in open access by their publisher, according to the business model of the journal in which they are published. It distinguishes between four types of economic model: articles published in full open access journals that do not charge publication fees (\"diamond\"), articles published in full open access journals that do charge publication fees (\"Gold full APC\"), and articles published in hybrid journals (where only part of the content is open access and the other part is open through individually paid publication fees), and all other cases. The \"Diamant\" part is probably underestimated.<linebreak></linebreak>In particular, we observe that for French publications published in {year3}, diamond represents {diamond3}% of the articles disseminated in open access by their publisher.",
"app.national-publi.publishers.type-ouverture.chart-repartition-modeles.title": "Distribution of business models for articles published in 2020 and distributed in open access by their publisher",
"app.health-publi.publishers.type-ouverture.chart-repartition-modeles.title": "Distribution of business models for articles in health published in 2020 and distributed in open access by their publisher",
"app.national-publi.publishers.type-ouverture.chart-repartition-modeles.tooltip": "<b>{point.name}</b><br>{point.y_abs} of {point.y_tot} open access publications ((commentsName)) in the publisher<br>and published in {point.publicationDate} are in {series.name} ({point.value:.2f}%)",
"app.health-publi.publishers.type-ouverture.chart-repartition-modeles.tooltip": "<b>{point.name} ({point.bsoDomain})</b> {point.y_abs} {point.y_tot} open access publications ((commentsName)) in the publisher<br>and published in {point.publicationDate} are in {point.name} (ie {point.value:.2f}%)",
"app.national-publi.publishers.type-ouverture.chart-repartition-modeles.tooltip": "<b>{point.name}</b><br>{point.y_abs} of {point.y_tot} open access articles ((commentsName)) in the publisher<br>and published in {point.publicationDate} are in {series.name} ({point.value:.2f}%)",
"app.health-publi.publishers.type-ouverture.chart-repartition-modeles.tooltip": "<b>{point.name} ({point.bsoDomain})</b> {point.y_abs} {point.y_tot} open access articles ((commentsName)) in the publisher<br>and published in {point.publicationDate} are in {point.name} (ie {point.value:.2f}%)",
"app.national-publi.publishers.type-ouverture.chart-repartition-modeles.comments": "This graph shows the distribution of scientific articles published in 2020 and distributed in open access by their publisher, according to the business model of the journal in which they are published. It distinguishes between four types of economic model: articles published in full open access journals that do not charge publication fees (\"diamond\"), articles published in full open access journals that do charge publication fees (\"Gold full APC\"), and articles published in hybrid journals (where only part of the content is open access and the other part is open through individually paid publication fees), and all other cases. The \"Diamant\" part is probably underestimated.<linebreak></linebreak>In particular, we observe that for scientific publications {commentsName} released in {year3}, diamond represents {diamond3}% of the articles disseminated in open access by their publisher.",
"app.health-publi.publishers.type-ouverture.chart-repartition-modeles.comments": "This graph shows the distribution of scientific articles in health published in 2020 and distributed in open access by their publisher, according to the business model of the journal in which they are published. It distinguishes between four types of economic model: articles published in full open access journals that do not charge publication fees (\"diamond\"), articles published in full open access journals that do charge publication fees (\"Gold full APC\"), and articles published in hybrid journals (where only part of the content is open access and the other part is open through individually paid publication fees), and all other cases. The \"Diamant\" part is probably underestimated.<linebreak></linebreak>In particular, we observe that for scientific publications {commentsName} released in {year3}, diamond represents {diamond3}% of the articles disseminated in open access by their publisher.",
"app.national-publi.repositories.dynamique-depot.title": "What is the open repository deposit dynamics?",
Expand Down
Loading

0 comments on commit 00cfbb9

Please sign in to comment.