Skip to content

Commit

Permalink
fix(open-science-policy): Adapt to new dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
annelhote committed Jan 14, 2025
1 parent c68e3cb commit 0524fbb
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
run: |
IMAGE_ID=ghcr.io/${{ github.repository }}
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
docker build -t $IMAGE_ID:${{ steps.tag.outputs.tag }} -t $IMAGE_ID:latest --build-arg REACT_APP_OPENDATASOFT_API_KEY=${{ secrets.REACT_APP_OPENDATASOFT_API_KEY }} .
docker build -t $IMAGE_ID:${{ steps.tag.outputs.tag }} -t $IMAGE_ID:latest .
- name: 📦 Push Docker image
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: |
IMAGE_ID=ghcr.io/${{ github.repository }}
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
docker build -f Dockerfile-staging -t $IMAGE_ID:${{ steps.tag.outputs.tag }} --build-arg REACT_APP_OPENDATASOFT_API_KEY=${{ secrets.REACT_APP_OPENDATASOFT_API_KEY }} .
docker build -f Dockerfile-staging -t $IMAGE_ID:${{ steps.tag.outputs.tag }} .
- name: 📦 Push Docker image
run: |
Expand Down
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ WORKDIR /app
COPY package*.json ./
RUN npm ci --silent
COPY . .
ARG REACT_APP_OPENDATASOFT_API_KEY
ENV REACT_APP_OPENDATASOFT_API_KEY=$REACT_APP_OPENDATASOFT_API_KEY
RUN npm run build

# production environment
Expand Down
2 changes: 0 additions & 2 deletions Dockerfile-staging
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ WORKDIR /app
COPY package*.json ./
RUN npm ci --silent
COPY . .
ARG REACT_APP_OPENDATASOFT_API_KEY
ENV REACT_APP_OPENDATASOFT_API_KEY=$REACT_APP_OPENDATASOFT_API_KEY
RUN npm run build:staging

# staging environment
Expand Down
2 changes: 1 addition & 1 deletion src/components/Footer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default function Footer() {
>
<FooterLink
target='_blank'
href='https://data.enseignementsup-recherche.gouv.fr/pages/explorer/?q=bso&sort=modified'
href='https://data.enseignementsup-recherche.gouv.fr/pages/explorer/?refine.keyword=BSO&sort=modified'
>
<FormattedMessage id='app.footer.link.open-data' />
</FooterLink>
Expand Down
3 changes: 3 additions & 0 deletions src/pages/BaroSante/EssaisCliniques/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ function EssaisCliniques() {
intlKey='app.health-interventional.caracteristiques.types'
backgroundColor={blueSoft25}
anchorId='caracteristiques.types'
ctas={[
'https://clinicaltrials.gov/policy/protocol-definitions#InterventionType',
]}
>
<BSOChart
id='caracteristiques.types.chart-evolution-nombre'
Expand Down
44 changes: 34 additions & 10 deletions src/pages/Declinaisons/Policy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { getCSSValue, getPercentageYAxis } from '../../../utils/helpers';
HCExporting(Highcharts);
HCExportingData(Highcharts);

const { REACT_APP_OPENDATASOFT_API_KEY } = process.env;
const END_YEAR = 2024;
const OPENDATASOFT_LIMIT = 100;
const START_YEAR = 2016;
Expand All @@ -42,7 +41,6 @@ const Policy = () => {
} = {}) => {
let url = 'https://data.enseignementsup-recherche.gouv.fr/api/explore/v2.1/catalog/datasets';
url += `/fr-esr-enquete-etablissements-pnso2/records?limit=${limit}&offset=${offset}&order_by=uo_lib`;
url += `&apikey=${REACT_APP_OPENDATASOFT_API_KEY}`;
const response = await axios.get(url, {
headers: { accept: 'application/json; charset=utf-8' },
});
Expand Down Expand Up @@ -72,8 +70,12 @@ const Policy = () => {
// eslint-disable-next-line no-return-assign
years.forEach((year) => (tmp[year] = { y: 0, y_percent: 0 }));
data.forEach((item) => {
if (item?.['1_annee_publi_doc_cadre']) {
tmp[item['1_annee_publi_doc_cadre']].y += 1;
if (
item?.premiere_annee_de_publication_annees_de_mises_a_jour_du_document_cadre
) {
tmp[
item.premiere_annee_de_publication_annees_de_mises_a_jour_du_document_cadre
].y += 1;
}
});
const series1 = {};
Expand Down Expand Up @@ -129,13 +131,27 @@ const Policy = () => {

let series2 = [];
data.forEach((item) => {
if (!series2.find((serie) => serie.name === item['1_doc_cadre'])) {
if (
!series2.find(
(serie) => serie.name
=== item[
'1_2_existe_t_il_un_document_cadre_charte_politique_precisant_votre_politique_de_science_ouverte'
],
)
) {
series2.push({
name: item['1_doc_cadre'],
name: item[
'1_2_existe_t_il_un_document_cadre_charte_politique_precisant_votre_politique_de_science_ouverte'
],
y: 0,
});
}
series2.find((serie) => serie.name === item['1_doc_cadre']).y += 1;
series2.find(
(serie) => serie.name
=== item[
'1_2_existe_t_il_un_document_cadre_charte_politique_precisant_votre_politique_de_science_ouverte'
],
).y += 1;
});
series2 = series2
.map((item) => ({
Expand Down Expand Up @@ -283,14 +299,22 @@ const Policy = () => {
</thead>
<tbody>
{data
.filter((item) => item?.['1_url_doc_cadre'])
.filter(
(item) => item?.lien_vers_le_document_cadre_le_plus_recent,
)
.map((item) => (
<tr>
<td>{item.uo_lib}</td>
<td>{item['1_annee_publi_doc_cadre']}</td>
<td>
{
item.premiere_annee_de_publication_annees_de_mises_a_jour_du_document_cadre
}
</td>
<td>
<a
href={item['1_url_doc_cadre']}
href={
item.lien_vers_le_document_cadre_le_plus_recent
}
rel='noreferrer'
target='_blank'
>
Expand Down
6 changes: 3 additions & 3 deletions src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@
"app.health-interventional.caracteristiques.quand.chart-repartition-avant-apres.comments": "For clinical trials conducted in France over the past 10 years and registered in a public registry, this graph represents the distribution of trials according to the number of months elapsed between the trial start date and the registration date in the registry. The temporality is expressed in number of months before or after the trial start date.",
"app.health-interventional.caracteristiques.quand.chart-repartition-avant-apres.tooltip": "<b>{point.y}</b> registered clinical trials {point.name} <span style = 'text-transform: lowercase'>{series.name}</span>",
"app.health-interventional.caracteristiques.types.title": "What are the different types of registered clinical trials?",
"app.health-interventional.caracteristiques.types.description": "Clinical trials may involve various types of interventions: delivery of a drug, use of a medical device (such as an implant, prosthesis, etc.), implementation of a diagnostic method, complex intervention, biomedicine, etc.",
"app.health-interventional.caracteristiques.types.description": "Clinical trials may involve various types of interventions: delivery of a drug, use of a medical device (such as an implant, prosthesis, etc.), implementation of a diagnostic method, complex intervention, biomedicine, etc. The types of intervention chosen are those proposed by <cta0>clinicaltrials.gov</cta0>. Clinical trials not included in clinicaltrials.gov are included in \"not known\".",
"app.health-interventional.caracteristiques.types.chart-evolution-nombre.title": "Evolution of the type of intervention performed in registered clinical trials{sponsorTypeTitle}",
"app.health-interventional.caracteristiques.types.chart-evolution-nombre.comments": "For French clinical trials registered in a public registry, this graph presents, for each year of trial initiation, the distribution of the types of interventions studied. It shows the diversity of the types of clinical trials, those in the {category} category represented {value}% of these clinical trials in {year}.",
"app.health-interventional.caracteristiques.types.chart-evolution-nombre.tooltip": "<b>Trial started in {point.x}</b><br>• {series.name}:<br>{point.yLabel}% ({point.yValue} / {point.yTotal})",
Expand Down Expand Up @@ -458,8 +458,8 @@
"app.health-interventional.resultats.delai-diffusion.chart-repartition.tooltip": "<b style = 'text-transform: lowercase'>{point.name} {series.name}:</b><br><b>{point.y} trials</b> rendering available",
"app.health-interventional.resultats.plan-partage.title": "Do registered clinical trials have a data sharing statement?",
"app.health-interventional.resultats.plan-partage.description": "Responsible sharing of individual data from clinical trials is a major challenge for the research community: sharing these data allows great transparency and maximises the value of the data collected with the realisation of :<linebreak></linebreak>• re-analyses with the aim of verifying the conclusions of the trials,<linebreak></linebreak>• secondary analyses exploring new research questions based on existing data,<linebreak></linebreak>• meta-analyses on individual data which, by pooling different studies exploring the same question, make it possible to provide the most precise answer possible.<linebreak></linebreak>The <cta0>International Committee of Medical Journal Editors (ICMJE)</cta0> has stated that responsible sharing of clinical trial data is ethically justified: since research subjects are willing to take risks for uncertain individual benefits, they are expected to make the best use of the data collected, while minimising the risk of re-identification. The ICMJE therefore requires that a data sharing statement specifying the terms of any sharing be included in each publication from July 1, 2018, and that it be specified in advance during clinical trial registration from January 1, 2019. At this point, data sharing is recommended by the ICMJE but is not a requirement.",
"app.health-interventional.resultats.plan-partage.chart-repartition.title": "Share of registered clinical trials with a public data sharing declaration{sponsorTypeTitle}",
"app.health-interventional.resultats.plan-partage.chart-repartition.comments": "This graph shows the number of registered clinical trials with individual data sharing statements by year over the past 10 years.<linebreak></linebreak>There has been a slow increase in the use of this instrument: {value1}% in {year1} and {value2}% in {year2}.",
"app.health-interventional.resultats.plan-partage.chart-repartition.title": "Share of registered clinical trials intending to share their data{sponsorTypeTitle}",
"app.health-interventional.resultats.plan-partage.chart-repartition.comments": "This graph shows the share of registered clinical trials intending to share their data by start year of the trial over the past 10 years.<linebreak></linebreak>There has been a slow increase in the use of this instrument: {value1}% in {year1} and {value2}% in {year2}.",
"app.health-interventional.resultats.plan-partage.chart-repartition.tooltip": "<b>Trials started in {point.year}</b><br>Presence of a data sharing statement: {series.name} for {point.y:.2f}% ({point.y_abs} / {point.y_tot})",
"app.health-interventional.resultats.publication.title": "Are registered clinical trials publications open?",
"app.health-interventional.resultats.publication.chart-repartition-icmje.title": "Distribution of the number of publications in journals adhering to ICMJE",
Expand Down
6 changes: 3 additions & 3 deletions src/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@
"app.health-interventional.caracteristiques.quand.chart-repartition-avant-apres.tooltip": "<b>{point.y}</b> essais cliniques enregistrés {point.name} <span style='text-transform: lowercase'>{series.name}</span>",
"app.health-interventional.caracteristiques.quand.chart-repartition-avant-apres.comments": "Pour les essais cliniques réalisés en France sur les 10 dernières années et enregistrés dans un registre public, ce graphique représente la distribution des essais en fonction du nombre de mois écoulés entre la date de démarrage de l'essai et la date d'enregistrement dans le registre. La temporalité est exprimée en nombre de mois avant ou après la date de démarrage de l'essai.",
"app.health-interventional.caracteristiques.types.title": "Quels sont les différents types d'essais cliniques enregistrés ?",
"app.health-interventional.caracteristiques.types.description": "Les essais cliniques peuvent porter sur des types d'intervention divers : délivrance d'un médicament, utilisation d'un dispositif médical (tel qu'un implant, une prothèse, etc.), mise en œuvre d'une méthode diagnostique, intervention complexe, biomédicament, etc.",
"app.health-interventional.caracteristiques.types.description": "Les essais cliniques peuvent porter sur des types d'intervention divers : délivrance d'un médicament, utilisation d'un dispositif médical (tel qu'un implant, une prothèse, etc.), mise en œuvre d'une méthode diagnostique, intervention complexe, biomédicament, etc. Les types d'intervention choisis sont ceux proposés par <cta0>clinicaltrials.gov</cta0>. Les essais cliniques hors clinicaltrials.gov sont comptabilisés dans \"non renseigné\".",
"app.health-interventional.caracteristiques.types.chart-evolution-nombre.title": "Évolution du type d'intervention réalisé dans les essais cliniques enregistrés{sponsorTypeTitle}",
"app.health-interventional.caracteristiques.types.chart-evolution-nombre.tooltip": "<b>Essai débuté en {point.x}</b><br>• {series.name} :<br>{point.yLabel} % ({point.yValue} / {point.yTotal})",
"app.health-interventional.caracteristiques.types.chart-evolution-nombre.comments": "Pour les essais cliniques français enregistrés dans un registre public, ce graphique présente, pour chaque année de démarrage des essais, la répartition des types d'interventions étudiés. Il montre la diversité des types d'essais cliniques, ceux de la catégorie {category} représentaient {value} % de ces essais cliniques en {year}.",
Expand Down Expand Up @@ -681,9 +681,9 @@
"app.health-interventional.resultats.delai-diffusion.chart-repartition.tooltip": "<b style='text-transform: lowercase'>{point.name} {series.name} :</b><br><b>{point.y} essais</b> rendu(s) disponible(s)",
"app.health-interventional.resultats.plan-partage.title": "Les essais cliniques enregistrés ont-ils une déclaration de partage des données ?",
"app.health-interventional.resultats.plan-partage.description": "Le partage responsable des données individuelles issues des essais cliniques est un enjeu de taille pour la communauté scientifique : partager ces données permet une grande transparence et permet de maximiser la valeur des données collectées avec la réalisation :<linebreak></linebreak>• de ré-analyses dans le but de vérifier les conclusions des essais,<linebreak></linebreak>• d'analyses secondaires explorant de nouvelles questions de recherche à partir des données existantes,<linebreak></linebreak>• de méta-analyses sur données individuelles qui, en poolant entre elles différentes études explorant la même question, permettent d'apporter une réponse la plus précise possible.<linebreak></linebreak>Le <cta0>comité international des rédacteurs de revues médicales (ICMJE)</cta0> a affirmé que le partage responsable des données issues des essais cliniques était justifié d'un point de vue éthique : puisque les personnes se prêtant à la recherche acceptent de prendre des risques, pour des bénéfices individuels incertains, on leur doit en retour de faire le meilleur usage qu'il soit des données collectées, tout en minimisant bien sûr, le risque de ré-identification. L'ICMJE exige donc qu'une déclaration de partage des données précisant les modalités d'un éventuel partage soit incluse dans chaque publication à partir du 1er juillet 2018 et qu'il soit spécifié au préalable lors de l'enregistrement de l'essai clinique à partir du 1er janvier 2019. À ce stade, le partage des données est recommandé par l'ICMJE mais n'est pas une obligation.",
"app.health-interventional.resultats.plan-partage.chart-repartition.title": "Part des essais cliniques enregistrés rendant publique une déclaration de partage des données{sponsorTypeTitle}",
"app.health-interventional.resultats.plan-partage.chart-repartition.title": "Part des essais cliniques enregistrés ayant l'intention de partager leurs données{sponsorTypeTitle}",
"app.health-interventional.resultats.plan-partage.chart-repartition.tooltip": "<b>Essais débutés en {point.year}</b><br>Présence d'une déclaration de partage des données : {series.name} pour {point.y:.2f} % ({point.y_abs} / {point.y_tot})",
"app.health-interventional.resultats.plan-partage.chart-repartition.comments": "Ce graphique expose le nombre d'essais cliniques enregistrés ayant une déclaration de partage des données individuelles, par année, au cours des 10 dernières années.<linebreak></linebreak>On constate une lente progression de l'utilisation de cet instrument : {value1} % en {year1} et {value2} % en {year2}.",
"app.health-interventional.resultats.plan-partage.chart-repartition.comments": "Ce graphique expose la part d'essais cliniques enregistrés ayant l'intention de partager leurs données, par année de début de l'essai, au cours des 10 dernières années.<linebreak></linebreak>On constate une lente progression de l'utilisation de cet instrument : {value1} % en {year1} et {value2} % en {year2}.",
"app.health-interventional.resultats.publication.title": "Les publications issues d'essais enregistrés sont-elles ouvertes ?",
"app.health-interventional.resultats.publication.chart-repartition-icmje.title": "Répartition du nombre de publications dans des revues adhérant à l'ICMJE",
"app.health-interventional.resultats.publication.chart-repartition.title": "Pourcentage d'essais cliniques enregistrés ayant donné suite à une publication en accès ouvert",
Expand Down
2 changes: 1 addition & 1 deletion src/utils/chartFetchOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ export default function getFetchOptions({
by_year: {
terms: {
field: 'study_start_year',
size: 30,
size: 10,
},
aggs: {
by_ipd: {
Expand Down

0 comments on commit 0524fbb

Please sign in to comment.